-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cloud_functions] Unauthenticated error on .call() #2374
Comments
Hi @Ishtmeet-Singh |
@TahaTesser Here's what I get after running
|
I am using VS Code's flutter extension to run the project. |
What version of the Firebase CLI are you uploading the functions with? See this page: https://firebase.google.com/docs/functions/callable : |
@Ehesp Thank you very much. I was using 7.3.1. Upgrading solved the issue for me. |
I am trying to call a Callable function using the cloud_functions package. I've tried using the example code as well and still getting the same error -
PlatformException(functionsError, Cloud function failed with exception., {code: UNAUTHENTICATED, details: null, message: UNAUTHENTICATED})
The firebase app is on spark plan (Just in case if that matters?). I've tried using Node version 8 and 10, but no luck.
The dart code -
CloudFunctions(region: 'asia-east2').getHttpsCallable(functionName: 'addUser').call({ "name": "Test", "email": "abc@example.com" })
Callable function's code -
exports.addUser = functions.region('asia-east2').https.onCall((data, context) => { const users = admin.firestore().collection('users'); return users.add({ name: data["name"], email: data["email"] }); });
Aditional info:
Device - Asus Zenfone 5z
Flutter Doctor:
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.44.1)
[√] Connected device (1 available)
The text was updated successfully, but these errors were encountered: