sendEmailVerification() - Cannot assign to read only property '_canInitEmulator
See original GitHub issueHi, I’ve spent so much time without finding the answer so I assume it could be a bug. After creation of a new user by createUserWithEmailAndPassword() I’m calling current user from AngularFireAuth instance. Then I call sendEmailVerification() which causes an error:
TypeError: Cannot assign to read only property '_canInitEmulator' of object '[object Object]'
at index-839de510.js:937
at Generator.next (<anonymous>)
at asyncGeneratorStep (asyncToGenerator.js:3)
at _next (asyncToGenerator.js:25)
at asyncToGenerator.js:32
at new ZoneAwarePromise (zone.js:1387)
at asyncToGenerator.js:21
at _performFetchWithErrorHandling (index-839de510.js:936)
at index-839de510.js:913
at Generator.next (<anonymous>)
It happens for angular 12 and 13. Angular: 13.1.0 Firebase: 9.4.0 Angularfire: 7.2.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:11
Top Results From Across the Web
javascript - Cannot create property '_canInitEmulator' on string ...
With new firebase functional approach, you need to include auth parameter like this: createUserWithEmailAndPassword(auth, email, password).
Read more >auth package - JavaScript API reference - Firebase - Google
UserInfo, User profile information, visible only to the Firebase ... Adds a blocking callback that runs before an auth state change sets a...
Read more >firebase: Cannot assign to read only property 'displayName' of ...
I was trying to create a function where users can update their names and avatar photos. For which I used updateProfile() function. But...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mikalcallahan
I didn’t see your code, but probably the error occurs when you pass
User
object (which you get from callingcreateUserWithEmailAndPassword
) tosignupSucces
. I had the same problem and I solved it as suggested in this thread: signout function in ngrx effect with() #3251So I created an interface for user details like this to avoid using
User
interface from firebase:I added also User parsing method
And finally my signup effects look like this:
@artask @Sapython provideAuth was added during automatically installation so there’s no thing I could change at my code.