Closed mynona closed 10 months ago
Routing kits needs:
.package(url: "https://github.com/vapor/routing-kit.git", from: "4.8.2"),
Next build issue is with Fluent Kit
bumping it manually up to didn't fix the issue: .package(url: "https://github.com/vapor/fluent-kit.git", from: "1.45.0"),
184.2 [953/956] Compiling VaporOAuth EmptyAuthorizationHandler.swift
184.2 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:22: error: cannot find 'SecRandomCopyBytes' in scope
184.2 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
184.2 ^~~~~~~~~~~~~~~~~~
184.2 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:41: error: cannot find 'kSecRandomDefault' in scope
184.2 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
184.2 ^~~~~~~~~~~~~~~~~
184.2 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:57:25: error: cannot find 'errSecSuccess' in scope
184.2 guard status == errSecSuccess else {
184.2 ^~~~~~~~~~~~~
184.2 error: fatalError
184.2 /build/.build/checkouts/fluent/Sources/Fluent/Fluent+Sessions.swift:4:1: remark: add '@preconcurrency' to suppress 'Sendable'-related warnings from module 'FluentKit'
184.2 import FluentKit
184.2 ^
184.2 @preconcurrency
------
failed to solve: process "/bin/sh -c swift build -c release" did not complete successfully: exit code: 1
Tried to use vapor_auth with the current vapor version (4.89.1). Sorry for bringing this topic up but I wanted to use this repository but it fails during build time.
Tried also to build in debug mode
// build -c release build
This also didn't fix the issue. It is weird though, that it runs in Xcode and that the fatal error only shows up when it is build.
This is the error when it is build for debug → no difference:
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:22: error: cannot find 'SecRandomCopyBytes' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:41: error: cannot find 'kSecRandomDefault' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:57:25: error: cannot find 'errSecSuccess' in scope
101.5 guard status == errSecSuccess else {
101.5 ^~~~~~~~~~~~~
101.5 [2277/2286] Compiling VaporOAuth UserManager.swift
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:22: error: cannot find 'SecRandomCopyBytes' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:41: error: cannot find 'kSecRandomDefault' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:57:25: error: cannot find 'errSecSuccess' in scope
101.5 guard status == errSecSuccess else {
101.5 ^~~~~~~~~~~~~
101.5 [2278/2286] Compiling VaporOAuth AuthorizeGetHandler.swift
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:22: error: cannot find 'SecRandomCopyBytes' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:55:41: error: cannot find 'kSecRandomDefault' in scope
101.5 let status = SecRandomCopyBytes(kSecRandomDefault, 32, &bytes)
101.5 ^~~~~~~~~~~~~~~~~
101.5 /build/.build/checkouts/vapor-oauth/Sources/VaporOAuth/RouteHandlers/AuthorizeGetHandler.swift:57:25: error: cannot find 'errSecSuccess' in scope
101.5 guard status == errSecSuccess else {
101.5 ^~~~~~~~~~~~~
102.0 [2280/2290] Wrapping AST for Leaf for debugging
102.0 [2282/2290] Compiling Fluent PageLimit.swift
102.3 [2284/2292] Compiling VaporOAuth CodeValidator.swift
102.3 [2285/2292] Compiling VaporOAuth ResourceServerAuthenticator.swift
102.3 [2286/2292] Compiling VaporOAuth ScopeValidator.swift
102.4 error: fatalError
Can it be connected to the issue that was fixed by this commit by @Brett-Best but unfortunately never merged?
Fixed in this repo: https://github.com/vamsii777/vapor-oauth/releases