newrelic/newrelic-flutter-agent

Can't build for iOS Simulator on v1.0.2+

Closed this issue · 10 comments

After upgrading from newrelic_mobile: 1.0.1 to 1.0.2 or 1.0.3 I'm no longer able to build our app on the iOS simulator. Version 1.0.1 and below work as expected. The following error is thrown:

Failed to build iOS app
Error output from Xcode build:
↳
    2023-07-26 17:05:18.207 xcodebuild[85265:514413] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)

Hey @ndesai-newrelic, we have the debug configuration set and -f in our readLink command. Our application runs fine with new_relic: 1.0.1. This only happens when we upgrade to 1.0.2 or 1.0.3

please provide your Xcode Version, Dart Version and Flutter Version Information.

[✓] Flutter (Channel stable, 3.10.6, on macOS 13.4.1 22F770820d darwin-arm64,
    locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.80.1)
[✓] Connected device (3 available)
[✓] Network resources

@rpekarek-tc can you share your pubspec.yaml file? i am unable to reproduce on my example app. can you also try to build app without newrelic plugin?

Confirmed app builds without the new_relic plugin (after deleting associated code)

publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1000

environment:
  sdk: ">=3.0.0 <4.0.0"
  flutter: "3.10.6" # update build.yml when updating this value

dependencies:
  [Redacted]

@rpekarek-tc i am still unable to reproduce it with all these dependencies but can you check this link also? flutter/flutter#124781

No luck. Still running to this error only when we update the new relic sdk and is reproducible on multiple machines. When we run from Xcode we see it failing with the error: /bin/sh: : No such file or directory. It looks like it can't find the script referenced in /Library/Developer/Xcode/DerivedData/Runner-bcpcivvtzvccuqcrxeyhktawtpio/Build/Intermediates.noindex/Runner.build/Debug-iphonesimulator/Runner.build/Script-17C67AFF2824B951007F5D78.sh

This file is regenerated after we delete derived data and rebuild. It contains the following lines:

#!/bin/sh
SCRIPT=`/usr/bin/find "${SRCROOT}" -name newrelic_postbuild.sh | head -n 1`
/bin/sh "${SCRIPT}" "[Redacted]"

In versions v1.0.1 and lower we see the newrelic_postbuild.sh file at the path /Pods/NewRelicAgent/NewRelic.xcframework/Resources/newrelic_postbuild.sh but it and the Resources directory no longer exist in v1.0.2+

@rpekarek-tc can you share sample app where you can reproduce the issue? I am still unable to reproduce on our side.

@ndesai-newrelic we were able to fix the issue by following the dsym upload instructions in the iOS agent v7.4.6 migration guide: https://docs.newrelic.com/docs/release-notes/mobile-release-notes/ios-release-notes/