Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Run on iOS Simulator or Device - Deploys App but Doesn't Start Due To Library not loaded: @rpath/AppAuth.framework/AppAuth #2263

Closed
pma07pg opened this issue Jul 12, 2024 · 6 comments
Assignees
Labels
waiting for response Waiting for user's response

Comments

@pma07pg
Copy link

pma07pg commented Jul 12, 2024

Steps to reproduce

Hello,

Just to clarify, it works absolutely fine when my Android device is connected so this is exclusively an iOS bug. I've been through the steps to setup quite a few times but nothing seems to change. My app also builds on both devices no issue and both flavors.

Run test release for iOS:

patrol test ios --release --flavor Dev
• Building app with entrypoint test_bundle.dart for iOS device (release)...
✓ Completed building app with entrypoint test_bundle.dart for iOS device (60.6s)
• Running app with entrypoint test_bundle.dart for iOS device on device Peter’s iPhone...`

Actual results

I see the RunnerTests being moved onto the device but it never opens/runs. I've followed this: https://github.com/leancodepl/patrol/issues/1441 link and get the same result even if I type the commands individually.

Based on some of the logs it seems to be deciding that it's a simulator? I'm really not sure but the iOS versions in my XCode are matching and 14.0...

Logs

Logs
        2024-07-12 11:20:20.501 xcodebuild[76020:1224807] [MT] IDETestOperationsObserverDebug: 10.445 elapsed -- Testing started completed.
        2024-07-12 11:20:20.501 xcodebuild[76020:1224807] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
        2024-07-12 11:20:20.501 xcodebuild[76020:1224807] [MT] IDETestOperationsObserverDebug: 10.445 sec, +10.445 sec -- end
        Testing failed:
        RunnerUITests-Runner (5135) encountered an error (Failed to load the test bundle. (Underlying Error: The bundle “RunnerUITests” couldn’t be loaded. The bundle couldn’t be loaded. Try reinstalling the bundle. dlopen(/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/PlugIns/RunnerUITests.xctest/RunnerUITests, 0x0109): Library not loaded: @rpath/AppAuth.framework/AppAuth
          Referenced from: <D1529D1D-5E07-3899-9607-F0AFDCD1A0F4> /private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/PlugIns/RunnerUITests.xctest/RunnerUITests
          Reason: tried: '/System/Developer/Library/Frameworks/AppAuth.framework/AppAuth' (no such file), '/private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/PlugIns/RunnerUITests.xctest/Frameworks/AppAuth.framework/AppAuth' (no such file), '/usr/lib/swift/AppAuth.framework/AppAuth' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/AppAuth.framework/AppAuth' (no such file), '/private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/Frameworks/AppAuth.framework/AppAuth' (no such file), '/private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/PlugIns/RunnerUITests.xctest/Frameworks/AppAuth.framework/AppAuth' (no such file), '/usr/lib/swift/AppAuth.framework/AppAuth' (no such file, not in dyld cache), '/private/preboot/Cryptexes/OS/usr/lib/swift/AppAuth.framework/AppAuth' (no such file), '/private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/Frameworks/AppAuth.framework/AppAuth' (no such file), '/private/var/containers/Bundle/Application/89DD0E3A-E1A9-4827-8582-7F01DECC2A89/RunnerUITests-Runner.app/Frameworks/AppAuth.framework/AppAuth' (no such file), '/System/Developer/Library/Frameworks/AppAuth.framework/AppAuth' (no such file), '/private/preboot/Cryptexes/OS/System/Developer/Library/Frameworks/AppAuth.framework/AppAuth' (no such file), '/System/Developer/usr/lib/AppAuth.framework/AppAuth' (no such file), '/private/preboot/Cryptexes/OS/System/Developer/usr/lib/AppAuth.framework/AppAuth' (no such file), '/Developer/Library/Frameworks/AppAuth.framework/AppAuth' (no such file), '/private/preboot/Cryptexes/OS/Developer/Library/Frameworks/AppAuth.framework/AppAuth' (no such file), '/Developer/usr/lib/AppAuth.framework/AppAuth' (no such file), '/private/preboot/Cryptexes/OS/Developer/usr/lib/AppAuth.framework/AppAuth' (no such file)))
        
        ** TEST EXECUTE FAILED **

// Commands shown with --verbose flag

Building app with entrypoint test_bundle.dart for iOS device (release)...
$ flutter build ios --no-version-check --suppress-analytics --config-only --no-codesign --release --flavor Dev --target /Users/anon/Development/app/app/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false --dart-define PATROL_TEST_LABEL_ENABLED=true --dart-define PATROL_TEST_SERVER_PORT=8081 --dart-define PATROL_APP_SERVER_PORT=8082
 xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme Dev -configuration Release-Dev -sdk iphoneos -destination generic/platform=iOS -quiet -derivedDataPath ../build/ios_integ OTHER_SWIFT_FLAGS=$(inherited) -D PATROL_ENABLED
$ xcodebuild -showsdks -json
Assuming SDK version 17.5 for iphonesimulator
Looking for .xctestrun matching Dev_*iphoneos17.5*.xctestrun at /Users/anon/Development/app/app/build/ios_integ/Build/Products
Found 1 match(es), the first one will be used
Found /Users/anon/Development/app/app/build/ios_integ/Build/Products/Dev_Dev_iphoneos17.5-arm64.xctestrun
$ xcodebuild test-without-building -xctestrun /Users/anon/Development/app/app/build/ios_integ/Build/Products/Dev_Dev_iphoneos17.5-arm64.xctestrun -only-testing RunnerUITests/RunnerUITests -destination platform=iOS,name=Peter’s iPhone -destination-timeout 1 -resultBundlePath /Users/anon/Development/app/app/build/ios_results_1720776930854.xcresult

Patrol version

2.6.0
Also tried with 2.8.0 and 3.0.0

Patrol Package ^3.9.0

Patrol Doctor output

Patrol Doctor output
Patrol doctor:
Patrol CLI version: 2.6.0
Android: 
• Program adb found in /Users/anon/Library/Android/sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/anon/Library/Android/sdk/platform-tools
iOS / macOS: 
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64 (Rosetta), locale en-DE)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.90.2)
[✓] Connected device (4 available)
[✓] Network resources

@jBorkowska jBorkowska self-assigned this Jul 15, 2024
@jBorkowska
Copy link
Collaborator

Hi @pma07pg, I have some ideas why it may not work:

If it doesn't help, please post whole log from test run (with --verbose option)

@jBorkowska jBorkowska added the waiting for response Waiting for user's response label Jul 15, 2024
Copy link

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.
Feel free to open a new issue with all the required information provided, including a [minimal, reproducible sample]. Make sure to diligently fill out the issue template.
Thanks for your contribution.
[minimal, reproducible sample]: https://stackoverflow.com/help/minimal-reproducible-example

3 similar comments
Copy link

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.
Feel free to open a new issue with all the required information provided, including a [minimal, reproducible sample]. Make sure to diligently fill out the issue template.
Thanks for your contribution.
[minimal, reproducible sample]: https://stackoverflow.com/help/minimal-reproducible-example

Copy link

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.
Feel free to open a new issue with all the required information provided, including a [minimal, reproducible sample]. Make sure to diligently fill out the issue template.
Thanks for your contribution.
[minimal, reproducible sample]: https://stackoverflow.com/help/minimal-reproducible-example

Copy link

Without additional information, we can't resolve this issue. We're therefore reluctantly going to close it.
Feel free to open a new issue with all the required information provided, including a [minimal, reproducible sample]. Make sure to diligently fill out the issue template.
Thanks for your contribution.
[minimal, reproducible sample]: https://stackoverflow.com/help/minimal-reproducible-example

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting for response Waiting for user's response
Projects
None yet
Development

No branches or pull requests

2 participants