-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Callable function returns 'Unauthenticated' error when using the functions emulator #7783
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
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Thanks for reporting, @maxim04. This might be a permission issue. First off, make sure that you're running the latest CLI version. Also, It seems like the suggested steps here may fix the Unauthenticated error. Make sure as well that you're the owner of the project. Let me know of your findings. |
@rizafran I am running the latest firebase cli Some more info:
I have a function setup as follows:
The iOS app can call the function successfully when the function runs in the cloud. The problem arises when running the functions emulator. When using the functions emulator and the iOS app calls the function using (swift code) |
@samtstern do you know what could be going on here? |
@maxim04 sounds like it might be a Firebase CLI issue. Could you run the Firebase emulators |
@samtstern started the simulators with the debug flag and unfortunately there was no log output when the error occurs. I did however enabled debug logging for firebase using Is there anything else i can do to show additional logging? |
There has to be some output though, right? Can you show all of the debug logs from a run when this error occurs? Don't worry if you don't see any error in the logs. |
@samtstern After further investigation I found that even though in the iOS app I configure the functions to use the emulator like so So it looks like the issue is in the ios sdk where it doesn't use the functions emulator when it is configured. |
@maxim04 can you enable debug logging and share the logs from Xcode when your app is running? |
@morganchen12 here is the output from xcode with debug logging enabled:
|
I had the same issue. If I do this, I get the same
However, the following works.
I don't understand the source code, but it looks like This is weird because you can configure Firebase Auth by calling |
[REQUIRED] Step 1: Describe your environment
CocoaPods
[REQUIRED] Step 2: Describe the problem
When using the emulator for functions and calling a callable function from the app, the request immediately returns an error: Unauthenticated, there are no logs from the emulator when the error is returned so i am guessing the request doesn't even reach the function.
Steps to reproduce:
Actual result: fails with error: Unauthenticated.
Expected result: The callable function is executed successfully.
Relevant Code:
(Swift)
The code above fails with the following details:
error.code:
__C.FIRFunctionsErrorCode
,error.localizedDescription:
Unauthenticated
The text was updated successfully, but these errors were encountered: