You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System version: Arch Linux 5.7.4-arch1-1
Browser version: Google Chrome Version 83.0.4103.116 (Official Build) (64-bit)
Firebase SDK version: 7.15.5
Firebase Product: firestore + testing
[REQUIRED] Describe the problem
Steps to reproduce:
Calling app.firestore().settings({ /* ... */ }) overrides the initial settings defined by @firebase/testing's initializeTestApp (as mentioned in this comment), so the tests stop working because it cannot connect to the local emulator anymore.
Logs
[2020-07-03T16:30:02.104Z] @firebase/firestore: Firestore (7.15.5): FirestoreClient Initializing. user= null
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.192Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: Get next mutation batch
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.193Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: Get next mutation batch
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.194Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: Locally write mutations
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.196Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: notifyLocalViewChanges
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.196Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: Get next mutation batch
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.196Z] @firebase/firestore: Firestore (7.15.5): MemoryPersistence Starting transaction: Get next mutation batch
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.197Z] @firebase/firestore: Firestore (7.15.5): Connection Creating Firestore stub.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.207Z] @firebase/firestore: Firestore (7.15.5): Connection Opening GRPC stream
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:02.211Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream sending: { database: 'projects/test-1593793802077/databases/(default)' }
console.warn node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.228Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream error. Code: 16 Message: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.230Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream ended.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.231Z] @firebase/firestore: Firestore (7.15.5): PersistentStream close with error: FirebaseError: [code=unauthenticated]: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.235Z] @firebase/firestore: Firestore (7.15.5): Connection Opening GRPC stream
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.235Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream sending: { database: 'projects/test-1593793802077/databases/(default)' }
console.warn node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.380Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream error. Code: 16 Message: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.381Z] @firebase/firestore: Firestore (7.15.5): Connection GRPC stream ended.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.381Z] @firebase/firestore: Firestore (7.15.5): PersistentStream close with error: FirebaseError: [code=unauthenticated]: 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
console.log node_modules/@firebase/logger/dist/index.cjs.js:98
[2020-07-03T16:30:03.381Z] @firebase/firestore: Firestore (7.15.5): ExponentialBackoff Backing off for 361 ms (base delay: 1000 ms, delay with jitter: 508 ms, last attempt: 147 ms ago)
@gustavopch Thanks for reporting the issue and the workaround! The current behavior can definitely cause developer confusion because it's not straightforward to debug. We're currently thinking that we can either expose a getter for the settings object, or add an option to merge settings so that you don't have to use the workaround. I'm going to discuss with the team, and circle back to you soon.
Just to circle back, we are planning to add a way to allow developers to merge their settings objects together when calling settings(), which should eliminate the need for such a hacky workaround. I'll update the issue when we get around to adding that feature.
[REQUIRED] Describe your environment
[REQUIRED] Describe the problem
Steps to reproduce:
Calling
app.firestore().settings({ /* ... */ })
overrides the initial settings defined by@firebase/testing
'sinitializeTestApp
(as mentioned in this comment), so the tests stop working because it cannot connect to the local emulator anymore.Logs
Relevant Code:
The text was updated successfully, but these errors were encountered: