-
Notifications
You must be signed in to change notification settings - Fork 900
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
Emulator functionality is not clear and causes auth errors which look like bugs #1299
Comments
This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information. |
Hmmm ok something is way off here. First could you try running "firebase init firestore" and then starting the emulators again? |
I did notice that when running through the various documentation that firestore wasn't there when other places reference it https://firebase.google.com/docs/cli#initialize_a_firebase_project The However when I go to run
|
Realized that was just a JRE. Going to get the JDK 8u211 from https://www.oracle.com/technetwork/java/javase/downloads/index.html and report back |
After installing the JDK, I'm getting NOTE I replaced actual function names with "FUNCTION"
|
I've also tried generating my own service account keys and initializing using
And it seems to work a little better, but my functions don't work still. Trying to trigger my HTTP function locally gives me an error, but using the cloud deployed function it responds normally. I generated the keys using the below. Let me know if I should use firebase-adminsdk credentials. the NOT
|
This is actually more of a documentation / logging issue than anything else. There is a split in functionality, between running your code via You were able to work around this the sandboxing by providing a service account because the protection we currently offer is done by removing application default credentials from the environment, when you supplied them directly that safeguard no longer functioned. In a future release, you'll be able to pass a flag to get into an unsafe emulator mode where you'll be able to access anything you like, but we haven't passed the CLI flags or In regards to your HTTPS function throwing an error, that's a separate issue, if the function you're attempting to invoke is an Express app, then that was a known issue which will be patched in |
Hmmmm yes the HTTP function is using an Express app. The endpoint/API works fine in cloud environment but fails on local emulation. Will see if it works on 6.9.3. Any idea on when that might be? (realized you released 6.9.2 only 5 days ago so appreciate all the help) |
Yes it should work in Thanks for testing stuff and helping us work out all the issues! We'll get this thing to be useful soon :) |
Closing this in favor of tracking error improvements in #1310 |
@abeisgoat Is there a way to run emulated cloud functions ( When I do, I get a bunch of errors: |
@grrrian you're doing it right, are you on the latest version of If you update to the latest version then you can do exactly what you wanted: running |
[REQUIRED] Environment info
firebase-tools: 6.9.2
in package.json
"firebase-admin": "^7.3.0",
"firebase-functions": "^2.3.1",
Platform: macOS
[REQUIRED] Test case
I'm trying to test my functions locally using the guide listed here.
https://firebase.google.com/docs/functions/local-emulator
I have 37 functions (mostly Firestore, but some RTDB, some Storage, 1 HTTP and 1 Auth) and they all work perfectly when deploying to the cloud environment. But when I deploy locally major errors happen and only the HTTP Function seems to (initially) work. See additional errors below when trying to ping the HTTP function.
[REQUIRED] Steps to reproduce
I have installed the latest firebase-tools using
In my
package.json
I confirmed to be runningI've initialized my admin using the below.
When I try to run my functions using
[REQUIRED] Expected behavior
Not have a ton of errors.
[REQUIRED] Actual behavior
Starting the emulator
When I try to ping the HTTP Function ("FUNCTIONXYZ") it results in the below error
The text was updated successfully, but these errors were encountered: