-
Notifications
You must be signed in to change notification settings - Fork 907
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
[v9.0.2 auth] INTERNAL ASSERTION FAILED: Expected a class definition #5475
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I am experiencing the same issue. |
Hi @bvanneerven, thanks for reporting this. I followed the steps and both codes for Auth is working. I was able to run the app by using this snippet:
Let me know if you're still experiencing the issue. |
@jbalidiong are you using client-side rendering? And development mode? I am facing this issue in production mode after running build, on dev mode without ssr it works fine. |
Facing the same issue with Angular Universal SSR:
All works fine in dev mode without SSR (that is, client-side rendering). EDIT: No idea why it says 9.0.0, my package.json says EDIT 2: Initially I got the following error during server-side rendering when upgrading to firebase 9:
So I tried adding a domino implementation to make navigator and other globals available:
Could the problem be domino related? |
I am currently using the following workaround. import {
browserLocalPersistence,
inMemoryPersistence,
indexedDBLocalPersistence,
initializeAuth,
} from 'firebase/auth';
const auth = initializeAuth(app, {
persistence:
typeof window === 'undefined'
? inMemoryPersistence
: [indexedDBLocalPersistence, browserLocalPersistence],
}); |
For the time being, I am using @bvanneerven 's workaround. |
Unfortunately, I still wasn’t able to replicate the issue when running using the production mode. Please share a minimal, but complete sample of a project that I can run locally. |
https://github.com/archevis/firebase-issue-5475 I've done some more investigating, and from what I've found it looks like the errors are linked to Analytics. But as mentioned, I'm using @angular/fire and the problem may reside here for all I know. In order to test the example project:
(Note that I have also deleted |
The short answer is that If you console.log the value of We usually advise users to modify their SSR (or test) configuration so that it picks up the
I do think we should probably find a better way to log this error, since the useful message ("Firebase: Error (auth/operation-not-supported-in-this-environment)") isn't visible unless you think to console.log the For myself/team, the export is:
It just exports the error object. I think that perhaps |
It would be nice if @sam-gc @jamesdaniels WDYT? |
Seems reasonable to me. That's essentially what happens if you use |
In an effort to reduce the dependencies of the authentication code I use, I tried the following:
Error output
package.json
The problem seems to be here:
firebase-js-sdk/packages/auth/src/core/util/instantiator.ts
Line 34 in cdada6c
I did have a quick look, but could not really find the actual problem myself.
The text was updated successfully, but these errors were encountered: