In response to the following Firebase Objective-C/Xcode code:
Firebase *myRootRef = [[Firebase alloc] initWithUrl:#"https://home.FirebaseTest.firebaseio.com"];
note: home.FirebaseTest is my Firebase app name (see link below)
https://www.firebase.com/docs/ios/quickstart.html
I receive the following exception/error:
Terminating app due to uncaught exception 'No Firebase namespace
specified.', reason: 'No Firebase namespace found for input: '
How can I resolve this problem?
I'm pretty sure that your problem relies on your URL.
Didn't get how you named your project home.FirebaseTest and what this home. stands for.
But you can get the proper url going to firebase console and on "Database" tab you should be able to see your firebaseio.com url.
For example in an app called "myfirebasetest" it would be
https://myfirebasetest.firebaseio.com
On legacy UI it is the url you use to access the console.
Related
I have recently added Firebase App Check in my Flutter app.
I am calling Cloud functions with the https.onCall() method. However i am receiving this error :
> {"severity":"WARNING","message":"Failed to validate AppCheck token. FirebaseAppCheckError: Decoding App Check token failed. Make sure you passed the entire string JWT which represents the Firebase App Check token.
at FirebaseAppCheckError.FirebaseError [as constructor] (/Users/foxtom/Desktop/Cloud Functions/functions/node_modules/firebase-admin/lib/utils/error.js:44:28)
at FirebaseAppCheckError.PrefixedFirebaseError [as constructor] (/Users/foxtom/Desktop/Cloud Functions/functions/node_modules/firebase-admin/lib/utils/error.js:90:28)
at new FirebaseAppCheckError (/Users/foxtom/Desktop/Cloud Functions/functions/node_modules/firebase-admin/lib/app-check/app-check-api-client-internal.js:187:28)
at /Users/foxtom/Desktop/Cloud Functions/functions/node_modules/firebase-admin/lib/app-check/token-verifier.js:82:19
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errorInfo: {
code: 'app-check/invalid-argument',
message: 'Decoding App Check token failed. Make sure you passed the entire string JWT which represents the Firebase App Check token.'
},
codePrefix: 'app-check'
}"}
> {"verifications":{"app":"INVALID","auth":"MISSING"},"logging.googleapis.com/labels":{"firebase-log-type":"callable-request-verification"},"severity":"WARNING","message":"Callable request verification failed: AppCheck token was rejected."}
The severity seems to be WARNING only but it doesn't execute the function. My function only contains a console.log()
In my app i have this error :
W/FirebaseContextProvider( 6788): Error getting App Check token; using placeholder token instead. Error: com.google.firebase.FirebaseException: Error returned from API. code: 403 body: App attestation failed.
I/flutter ( 6788): Error is : [firebase_functions/unauthenticated] Unauthenticated
I have not enforced anything like suggested in the documentation
This is preventing me from using Cloud Functions and i can disable App Check for my app anymore...
EDIT :
I add that Firebase Storage and RealTime Database are working fine without any debug AppCheck token when it's not enforced.
What can I do ?
I created a reproducible code sample, which you see here: https://github.com/nilsreichardt/playground/tree/firebase-app-check-cloud-function-unauthenticated-issue/firebase-app-check-cloud-functions-unauthentificated
Therefore, I created a detailed issue in the FlutterFire repository: https://github.com/FirebaseExtended/flutterfire/issues/6794
A first workaround already posted as a comment and I'm sure that more workarounds or solutions will follow.
Firebaser here.
Thank you for reporting this issue -- we have now released a fix to all platforms that should resolve this issue. Please refer to the Github issue for full details.
When I do a auth call using email, the function returns successful including the data expected, however leaves this console.error from shared.js (I assuming this is a Firebase file).
TypeError: undefined is not an object (evaluating 'b.currentSelfServiceAppID.signUpAppId')
I am using version "firebase": "^6.6.1", and added the email I am using to auth my app via the Firebase console. The email has not been verified.
Is this error expected when the email has not been verified? Or is there another set up error I have missed?
I have found where this error is coming from. I have an Okta extension installed on my browser, and this is causing the error. It has nothing to do with Firebase, it's a bug with the extension.
I'm following tutorial on http://martinabbott.azurewebsites.net/2016/06/11/fun-with-azure-functions-and-the-emotion-api/
Finally got solvet issue with blob trigger. I have verified that my jpg file can be succesfully processed with my API key in the Open API Test console. I have upload project.json file include dependancies to "Microsoft.ProjectOxford.Emotion": "1.0.251"
I'm getting now error. How to solve?
2016-11-07T06:53:44.951 C# Blob Emotion function processed: Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob
2016-11-07T06:53:45.076 Function completed (Failure, Id=c0c50024-7830-4595-b749-56f58ec79d0b)
2016-11-07T06:53:45.107 Exception while executing function: Functions.BlobTriggerEmotionFunction. Microsoft.ProjectOxford.Common: Exception of type 'Microsoft.ProjectOxford.Common.ClientException' was thrown.
Based on the tutorial you are referencing, for the line of code,
var apiKey = WebConfigurationManager.AppSettings["EMOTION_API_KEY"];
did you set the EMOTION_API_KEY in your Function app's App settings?
You may verify with the following steps:
Visit your Function app through the Functions portal.
Click Function app settings -> Configure app settings.
Verify that the EMOTION_API_KEY exists and that its value matches the one you used in the Open API Test console.
I just made a firebase project, installed the pods and got the googleplist in, configured it in the app delegate, and set it up exactly like I have other projects.
For my pods, I've got exactly what I have in my main other project :
pod 'Firebase/Core’
pod ‘Firebase/Auth’
pod ‘Firebase/Database’
When I run this code :
let ref = FIRDatabase.database().reference()
ref.setValue("hello")
I get an error that pops up like 50 times that says :
MyProjectName[209384092:9028304928034randomnumbers] [FirebaseDatabase] Autentication failed: Invalid_token (audience was project 'a random project from my firebase console' but should have been project 'myProjectName'.
I thought maybe I had done something really goofy at first, so I deleted my project entirely and reinstalled a new google.plist and redid everything, but the only thing that has changed is now I'm just getting a different random project from my firebase project list.
What's goin' on here?
I had the same error as you got, but it only occurred in simulator.
To fix this issue I had to reset my simulators content and settings.
If anyone is experiencing this issue on an actual iPhone device rather than the simulator the root cause of this issue is provided in another SO thread:
Swift/Firebase Database invalid token error
It looks Firebase plan to address it in a future SDK update but to resolve it for now you must sign-out + invalidate your Firebase Database session in your 'old' project first:
NSError *error;
[[FIRAuth auth] signOut:&error];
if (error) {
ELog(#"Firebase Logout failed: %#", error.localizedDescription);
}
Your 'new' project should then now function as expected.
Maybe you are not taking the correct apiKey and authDomain. Go to Firebase, select the project go to Authentication and then Web Setup and see if the apiKey and authDomain are the same keys that you are using in the firebase.initializeApp({});
I've setup Google login in my Firebase app (I'm using the new Firebase console), but each time I try with Google, I get the following error:
#<NSError:0x11f0625a0, description="An internal error has occurred, print and inspect the error details for more information.", code=17999, domain="FIRAuthErrorDomain", userInfo={"NSUnderlyingError"=>#<NSError:0x122278130, description="The operation couldn’t be completed. (FIRAuthInternalErrorDomain error 3.)", code=3, domain="FIRAuthInternalErrorDomain", userInfo={"FIRAuthErrorUserInfoDeserializedResponseKey"=>{"message"=>"", "errors"=>[{"reason"=>"invalid", "message"=>"", "domain"=>"global"}], "code"=>400}}>, "error_name"=>"ERROR_INTERNAL_ERROR", "NSLocalizedDescription"=>"An internal error has occurred, print and inspect the error details for more information."}>
I don't really know where yo go from here, since there's no message in the message field. Any guesses on what this could be?
I've recently migrated to the new version of Firebase btw. I'm using the new SDK in my iOS app. Furthermore, I setup Google authentication a week before I migrated. I'm not sure if any keys have been overwritten in the migration. How do I check if I have the right keys in my console vs my GoogleService plist file?