-
Notifications
You must be signed in to change notification settings - Fork 941
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
Database Emulator -- Auth token revoked: invalid_token/Unsupported jwt algorithm: none #3309
Comments
@mdo5004 what's happening here is that you're sending an Auth emulator token to the production Realtime Database server, which is causing an error (as it should). Can you show some of your code where you call |
Thanks for your reply @samtstern! Here is my init code:
|
Hmmm nothing looks obviously wrong, but can you try changing your |
Can confirm this is happening to me as well. Using |
Changing my code to this does not fix the issue, unfortunately.
|
This sounds like it may be related to firebase/firebase-js-sdk#4110 Try putting your auth emulator line first, before the other emulators. |
Thanks for your reply, but that did not work :-/ |
The issue seems to be isolated to the client-to-rtdb connection. Starting the functions emulator and adding a |
Managed to get it working by overriding the config: const config = {
// your config
};
if (location.hostname === 'localhost') {
config.databaseURL = 'http://127.0.0.1:9000/?ns=firebase-project-id';
} For some reason, const fire = !firebase.apps.length ? firebase.initializeApp(firebaseConfig) : firebase.app(); |
This has kept me from using the database emulator for a while, @sincraianul fix fixes it for me too. |
[REQUIRED] Environment info
macOS 11.2.3
node 12.20.1
firebase-tools 9.10.0
firebase JS SDK 8.4.2
[REQUEST] Test case
Not receiving data from database emulator when used with Auth emulator.
Database emulator logs:
[REQUIRED] Steps to reproduce
[REQUIRED] Expected behavior
Data should be received by web app
[REQUIRED] Actual behavior
Web app does not receive data from database
Originally posted by @mdo5004 in #2758 (comment)
Edit: dependencies
The text was updated successfully, but these errors were encountered: