Closed mczachurski closed 4 years ago
Hmm I'm not able to reproduce this. I've added a test (https://github.com/vapor/jwt/pull/129) with the exact code you supplied and it's working correctly on all platforms. It's possible this was a bug in JWT / JWTKit that has been fixed already. If you still experience this after running swift package update
, report to bugs.swift.org.
@mczachurski Did you solve it? I'm facing the same issue. Signing works fine in XCode, but doesn't when running the app form terminal. Updating packages did not help.
@jstorm31 hmm that might be related to https://bugs.swift.org/browse/SR-12424. It works fine in Xcode and on Linux?
@tanner0101 It might be the same problem. I don't get a segfault though. I get this error both when running swift test
and swift run
. It could also be related to Vapor FCM package.
Fatal error: FCM Unable to generate JWT: JWTKit error: signing algorithm error: signFailure: file /Users/jstorm31/Dev/XCode/swapper-api/.build/checkouts/FCM/Sources/FCM/FCM.swift, line 72
It works on XCode macOS. I haven't tried on Linux. I've been trying to run the app inside a Docker Linux container, but the setup is still in progress so I haven't got this error so far due to fixing other issues.
UPDATE: There is a related issue (not resolved) in the Vapor FCM repo - https://github.com/MihaelIsaev/FCM/issues/24
I managed to reproduce the issue in an isolated repo, see https://github.com/MihaelIsaev/FCM/issues/24#issuecomment-663140367. It probably really is the issue you reported @tanner0101.
@jstorm31 I checked today and I still have the same error.
Version of libraries:
Swift version:
Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)
Target: x86_64-apple-darwin20.0.0
I can confirm that the bug occurs only from macOS terminal. On Xcode and in Linux there is no this bug.
Hello,
I have a strange error only when I'm building application by "swift build" in terminal. When I'm using XCode everything is working.
Steps to reproduce:
Package.swift
routes.swift
configure.swift
I have the following logs here:
Run application (
.build/debug/Run
) and open http://127.0.0.1:8080 page. I have following error:or
My Swift version:
Do you have same error after these steps or it's only something wrong in my macOS installation? Do you know what can be a reason of that error?