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

Crash ITMS-90863: Macs with Apple silicon support issue #8571

Closed
Kalzem opened this issue May 3, 2024 · 7 comments
Closed

Crash ITMS-90863: Macs with Apple silicon support issue #8571

Kalzem opened this issue May 3, 2024 · 7 comments

Comments

@Kalzem
Copy link

Kalzem commented May 3, 2024

How frequently does the bug occur?

Always

Description

Having updated Realm to 10.49.3 (and 10.50.0 too) via SPM, and still using it as a static library (so I only imported RealmSwift and dropped Realm), I now have the following error when uploading a binary on AppStoreConnect.

ITMS-90863: Macs with Apple silicon support issue - The app links with libraries that aren’t present in macOS:

@rpath/RealmSwift.framework/RealmSwift

The project runs on iOS universal + Mac Silicon.

So I tried to run on xcode using destination "My Mac (Designed for iPad)" (Mac Silicon), and I confirm that it crashes right at launch with the following error.

dyld[43454]: Library not loaded: @rpath/RealmSwift.framework/RealmSwift
  Referenced from: <2B72FA4C-BB7D-36AC-9D23-F3420001FBB9>

/private/var/folders/9s/fqn82tqd1vv6t4j31lhcw6hw0000gn/X/E7DAA30E-6488-5383-9CC0-60FFD2015151/d/Wrapper/KlewosDev.app/KlewosDev
  Reason: tried: '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/RealmSwift.framework/RealmSwift' (no such file), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (code signature in <7C12C84B-F9ED-31FA-B4DC-33F5E2BDFBAE> 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' not valid for use in process: Trying to load an unsigned library), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (code signature in <7C12C84B-F9ED-31FA-B4DC-33F5E2BDFBAE> 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' not valid for use in process: Trying to load an unsigned library), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '/System/iOSSupport/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file, not in dyld cache), 
  '/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file, not in dyld cache), 
  '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file), 
  '/private/var/folders/9s/fqn82tqd1vv6t4j31lhcw6hw0000gn/X/E7DAA30E-6488-5383-9CC0-60FFD2015151/d/Wrapper/KlewosDev.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '/private/var/folders/9s/fqn82tqd1vv6t4j31lhcw6hw0000gn/X/E7DAA30E-6488-5383-9CC0-60FFD2015151/d/Wrapper/KlewosDev.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (code signature in <7C12C84B-F9ED-31FA-B4DC-33F5E2BDFBAE> 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' not valid for use in process: Trying to load an unsigned library), 
  '{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '/System/iOSSupport/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file, not in dyld cache), 
  '/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file, not in dyld cache), 
  '/System/Volumes/Preboot/Cryptexes/OS/usr/lib/swift/RealmSwift.framework/RealmSwift' (no such file), 
  '/private/var/folders/9s/fqn82tqd1vv6t4j31lhcw6hw0000gn/X/E7DAA30E-6488-5383-9CC0-60FFD2015151/d/Wrapper/KlewosDev.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file), 
  '/private/var/folders/9s/fqn82tqd1vv6t4j31lhcw6hw0000gn/X/E7DAA30E-6488-5383-9CC0-60FFD2015151/d/Wrapper/KlewosDev.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file)

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

Upload a binary to AppStoreConnect using Realm 10.49.3+ with SPM as static library (only importing RealmSwift).
Or just run any Mac Silicon project with the same settings.

Version

10.50.0

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Mac Silicon

Build environment

Xcode version: 15.3.0
Dependency manager and version: SPM

Copy link

sync-by-unito bot commented May 3, 2024

➤ PM Bot commented:

Jira ticket: RCOCOA-2348

@shvetsjr
Copy link

shvetsjr commented May 3, 2024

Having same issue on 10.50.0 with similar setup but running on iOS device

Getting right on start:

dyld[3919]: Library not loaded: @rpath/RealmSwift.framework/RealmSwift
  Referenced from: <84157580-198A-3981-B2DA-C7D6A3D75B11> /private/var/containers/Bundle/Application/A26D1AE5-4674-46EA-903F-11960F7114CD/App.app/Frameworks/ProjectSDK.framework/ProjectSDK
  Reason: tried: '/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/preboot/Cryptexes/OS/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/var/containers/Bundle/Application/A26D1AE5-4674-46EA-903F-11960F7114CD/App.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/var/containers/Bundle/Application/A26D1AE5-4674-46EA-903F-11960F7114CD/App.app/Frameworks/ProjectSDK.framework/Frameworks/RealmSwift.framework/RealmSwift' (no such file), '/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/preboot/Cryptexes/OS/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/var/containers/Bundle/Application/A26D1AE5-4674-46EA-903F-11960F7114CD/App.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file), '/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/preboot/Cryptexes/OS/Users/user/Library/Developer/Xcode/DerivedData/ProjectSDK-einggkreqsykevexdcvaooepttuu/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework/RealmSwift' (no such file), '/private/var/containers/Bundle/Application/A26D1AE5-4674-46EA-903F-11960F7114CD/App.app/Frameworks/RealmSwift.framework/RealmSwift' (no such file)

@shvetsjr
Copy link

shvetsjr commented May 3, 2024

@Kalzem In your case I think you can just select Embed & Sign next to realm framework in your project settings, in my case it will be a bit more complicated as I use realm framework within my own framework

@Kalzem
Copy link
Author

Kalzem commented May 4, 2024

@shvetsjr

By selecting Embed & Sign, I'll be using Realm as a dynamic library instead of static, which would only be a temporary workaround.
But even this workaround doesn't work in my case. I get the following error

Cycle inside Project; building could produce unreliable results.
Cycle details:
→ Target 'Project' has copy command from ‘{path}/Library/Developer/Xcode/DerivedData/Klewos-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework' to '{path}/Library/Developer/Xcode/DerivedData/Project-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/Project.app/Frameworks/RealmSwift.framework'
○ Target 'Project'
○ That command depends on command in Target 'Project': script phase “Upload dSym to Firebase”
○ Target 'Project' has a command with output ‘{path}/Library/Developer/Xcode/DerivedData/Project-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/Project.app.dSYM'
○ Target 'Project' has process command with output ‘{path}/Library/Developer/Xcode/DerivedData/Project-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/Project.app/Info.plist'
○ Target 'Project' has copy command from ‘{path}/Library/Developer/Xcode/DerivedData/Project-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/PackageFrameworks/RealmSwift.framework' to ‘{path}/Library/Developer/Xcode/DerivedData/Project-dutkslliiuiushfoeqzurfcmcwrp/Build/Products/Debug-iphoneos/Project.app/Frameworks/RealmSwift.framework'

Note that the "Upload dSym to Firebase" command mentioned in the cycle issue is the official command from Firebase documentation.

"${BUILD_DIR%/Build/*}/SourcePackages/checkouts/firebase-ios-sdk/Crashlytics/run"

@Kalzem
Copy link
Author

Kalzem commented May 4, 2024

A functional workaround in my case was removing Realm from SPM and install it with Cocoapods. Don't forget to clean Package (Xcode > File > Packages > Reset Cache) and to clean Build.

@shvetsjr
Copy link

shvetsjr commented May 9, 2024

A functional workaround in my case was removing Realm from SPM and install it with Cocoapods. Don't forget to clean Package (Xcode > File > Packages > Reset Cache) and to clean Build.

That sucks.. Our project just got super clean and we just dropped Cocoapods..

@nirinchev
Copy link
Member

We're going to investigate providing the option to build statically via SPM. This is tracked by #8588.

I'm not sure why the firebase upload symbols command is causing a cycle, but you can probably reach out to their team for guidance.

@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@sync-by-unito sync-by-unito bot closed this as completed May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants