-
Notifications
You must be signed in to change notification settings - Fork 950
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
firestore#delete not working with the emulator after more or less recent change #3084
Comments
@NeverwinterMoon thanks for the detailed bug! What happens if you don't set Assigning to @bkendall since this looks like an apiv2 regression. |
Without setting I actually found out that setting Overall, I think it might make sense to at least document these things. I love the possibility to use emulators not only for local development (in this case I have firebase login, so no token setting is necessary) but also for the automated tests and setting up some of the things, like using Firebase CLI tools against the emulator, is somewhat troublesome. |
I was wrong, the above does not help, must have mixed some up. apiv2 just fails after response Anyway, my idea was to be able to run tests against emulators without the need to having the actual authentication. As far as I read, only the hosting emulator requires the authentication. Furthermore, this did work for me for some time before I've updated firebase-tools. |
[REQUIRED] Environment info
firebase-tools:9.2.2
Platform:macOS
[REQUIRED] Test case
Check the steps to reproduce. It does not require anything else. Downgrading firebase-tools to, say, 8.16.2, works with that same code.
[REQUIRED] Steps to reproduce
Have emulators running, then
[REQUIRED] Expected behavior
Before this commit (9d90a94), which added apiv2 to requireAuth.ts, having
process.env.FIREBASE_TOKEN = 'FAKE_TOKEN'
was enough to work with the local emulator. After this change, it's not possible.There was a fix for api.js here (https://github.com/firebase/firebase-tools/pull/2211/files/3a7515e2339c571d1f389ecd42dfc597703ea06e#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed) which uses
var getTokenPromise = secureRequest ? api.getAccessToken() : Promise.resolve({ access_token: "owner" });
. apiv2 on the other hand has justconst token = await this.getAccessToken()
[REQUIRED] Actual behavior
Error is returned: "Failed to fetch page after undefined FirebaseError: HTTP Error: 400, invalid jwt" from apiv2.js
The text was updated successfully, but these errors were encountered: