Kitura / Swift-JWT

JSON Web Tokens in Swift
Apache License 2.0
551 stars 106 forks source link

Release build fails execution #90

Open Blackjacx opened 3 years ago

Blackjacx commented 3 years ago

When I integrate SwiftJWT into my App Store Connect CLI tool asc (included in the Assist repo) using Swift Package Manager I get the following runtime error:

objc[57587]: Class _TtGCs18_DictionaryStorageaSo11CFStringRefS0__$ is implemented in both /usr/lib/swift/libswiftCore.dylib (0x7fff9773bfb0) and /usr/lib/swift/libswiftCore.dylib (0x7fff9773c2c8). One of the two will be used. Which one is undefined.
Fatal error: invalid unsafeDowncast: file /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1103.8.25.8/swift/stdlib/public/core/Builtin.swift, line 235
[1]    57587 illegal hardware instruction  mint run blackjacx/assist@develop asc

To reproduce this:

  1. Clone repo: git clone git@github.com:Blackjacx/Assist.git && cd Assist
  2. Build and run in release mode: swift run -c release asc

Alternatively you can use mint to run (which compiles the package in release mode): mint run blackjacx/assist.git@develop asc

When I enter swift run asc in the locally checked out folder it works without problems. The difference is, that this time it is compiled in debug mode. When using another JWT library I can confirm that it works with another JWT library so SwiftJWT must be the reason for this.

Find my package manifest file at Package.swift.

Help very appreciated 👍

starpl commented 2 years ago

Same error, app crashes only in Testflight, but not when debugging on a real device / simulator