airbnb / lottie-ios

An iOS library to natively render After Effects vector animations
http://airbnb.io/lottie/
Apache License 2.0
25.72k stars 3.74k forks source link

Failed to run UI test due Library not loaded: @rpath/libswiftQuartzCore.dylib #1141

Closed ppamorim closed 2 years ago

ppamorim commented 4 years ago

Check these before submitting:

This issue is a:

Which Version of Lottie are you using?

Lottie 3.1.6

What Platform are you on?

What Language are you in?

Expected Behavior

Run the UI test without problems in all simulators available.

Actual Behavior

The test is failing when the test runs on a iPhone 6S Plus simulator running iOS 11.4, it works normally for any device based on the iOS 13.x simulator. This is not happening when the UI test runs from Xcode, only using a external library like Fastlane.

Similar issue reported here: https://github.com/CocoaPods/CocoaPods/issues/9165 Already reported here with not enough information: https://github.com/airbnb/lottie-ios/issues/1109

EDIT 1: Also happening to iPad Pro (12.9-inch) (2nd generation) running iOS 11.4, so it's iOS version based.

Testing failed:
        Screenshots_MyApp:
                Screenshots_MyApp-Runner.app (75443) encountered an error (Failed to load the test bundle. (Underlying error: The bundle “Screenshots_MyApp” couldn’t be loaded because it is damaged or missing necessary resources. The bundle is damaged or missing necessary resources. dlopen_preflight(/Users/me/Library/Developer/Xcode/Build/Products/Debug-MyApp-iphonesimulator/Screenshots_MyApp-Runner.app/PlugIns/Screenshots_MyApp.xctest/Screenshots_MyApp): Library not loaded: @rpath/libswiftQuartzCore.dylib
  Referenced from: /Users/me/Library/Developer/Xcode/Build/Products/Debug-MyApp-iphonesimulator/Screenshots_MyApp-Runner.app/PlugIns/Screenshots_MyApp.xctest/Frameworks/Lottie.framework/Lottie
  Reason: image not found))

Error log:

Screenshot 2020-03-05 at 10 42 19

Possible solution

https://github.com/CocoaPods/CocoaPods/issues/9211#issuecomment-537336623

Anything similar to this? Add this line on podspec:

s.xcconfig = { 'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => 'YES' }

Code Example

No applicable

Animation JSON

No applicable

mikegb commented 4 years ago

We just noticed this as well. Same deal, it doesn't happen locally but only within the CI environment. Wondering if it may be some kind of Xcode simulator issue rather than Lottie/Fastlane.

You haven't found any work around have you?

calda commented 2 years ago

Closing since this seems like its potentially either an outdated Xcode build system issue, or a configuration-specific issue. Feel free to re-open if you're still experiencing this issue.