Skip to content
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

upgrade to angularFire 7.0.3 and 4 new error #2929

Closed
LanderBeeuwsaert opened this issue Sep 7, 2021 · 7 comments
Closed

upgrade to angularFire 7.0.3 and 4 new error #2929

LanderBeeuwsaert opened this issue Sep 7, 2021 · 7 comments

Comments

@LanderBeeuwsaert
Copy link

An error after upgrading firebase & angularFire (still using the compat library :)):
Any idea?

**Angular: 12.2.0

**Firebase: 9.0.1

**AngularFire: 7.0.3 and 7.0.4

Other (e.g. Ionic/Cordova, Node, browser, operating system):
node 14
windows 10
chrome

How to reproduce these conditions

Failing test unit, Stackblitz demonstrating the problem

error when looking in chrome devtools:
Emulator URL must start with a valid scheme (http:// or https://). (auth/invalid-emulator-scheme).
image

code in app module:
image

@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@tja4472
Copy link

tja4472 commented Sep 7, 2021

The format has changed.
['localhost', 9099] becomes ['http://localhost:9099']

@jamesdaniels
Copy link
Member

@tja4472 is correct. In 7.0 we broke the USE_EMULATOR token for auth, instead taking it in a form that the JS SDK expects now that we have a typescript version that allows Parameters<>; rather than smoothing over this API inconsistency.

This seems trivial and annoying but means we no longer have to take feature requests and cut minor releases when the auth SDK adds new options to the useEmulator function.

@falk-stefan
Copy link

@tja4472 Can you take a look at #2932?

@LanderBeeuwsaert
Copy link
Author

just for reference, changing as suggested solved the issue

@dapptain
Copy link

Second, confirm. Docs should be updated. I can make a PR if you'll like.

https://github.com/angular/angularfire/blob/master/docs/emulators/emulators.md

Mikael-Eliasson added a commit to Mikael-Eliasson/FirebaseUI-Angular that referenced this issue Feb 23, 2022
According to the issue the format of  USE_EMULATOR have changed. 
angular/angularfire#2929 (comment)

This seems to have broken FirebaseUI-Angular in that it can no longer connect to the emulator. This change fixes the issue. However it is not backwards compatible which I don't know if it is a requirement.
RaphaelJenni pushed a commit to RaphaelJenni/FirebaseUI-Angular that referenced this issue Feb 25, 2022
According to the issue the format of  USE_EMULATOR have changed. 
angular/angularfire#2929 (comment)

This seems to have broken FirebaseUI-Angular in that it can no longer connect to the emulator. This change fixes the issue. However it is not backwards compatible which I don't know if it is a requirement.
@rami-alloush
Copy link

rami-alloush commented Feb 23, 2023

I had to use the following in my app.module:

{ provide: USE_FIRESTORE_EMULATOR, useValue: environment.useEmulators ? ['127.0.0.1', 8080] : undefined },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants