Aman-US-Punjabi / FireBase-Auth-AmanGarry

To use FireBase Auth in Vapor by verifing Firebase ID Token
3 stars 0 forks source link

Fatal error straight after Run #1

Open davidseek opened 6 years ago

davidseek commented 6 years ago

added as in readme. getting:

fatal error: Error raised at top level: Configuration error: Config/firebaseauth.json required.: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.65.2/src/swift/stdlib/public/core/ErrorType.swift, line 187
2017-10-24 08:32:40.654839-0700 Run[88828:5911734] fatal error: Error raised at top level: Configuration error: Config/firebaseauth.json required.: file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-900.0.65.2/src/swift/stdlib/public/core/ErrorType.swift, line 187
(lldb) 

any ideas?

davidseek commented 6 years ago

The error occurs in:

/// Configure providers
    private func setupProviders() throws {
        try addProvider(LeafProvider.Provider.self)
        try addProvider(FirebaseAuthAmanGarry.Provider.self)
    }

If I remove try addProvider(FirebaseAuthAmanGarry.Provider.self), the crash does not occur

davidseek commented 6 years ago

While trying to figure it out I came to the conclusion that the error must be here:

guard let firebaseAuthConfig = config["firebaseauth"] else {
            throw ConfigError.missingFile("firebaseauth")
        }

in

// Add FireBase-Auth-AmanGarry to the Vapor application
public final class Provider: Vapor.Provider {