-
Notifications
You must be signed in to change notification settings - Fork 2.2k
SSR => @firebase/auth: Auth (9.6.8): INTERNAL ASSERTION FAILED: Expected a class definition #3181
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
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
There seems to be a resolve in here. however I dont know how to apply it to my |
any workaround for the above issue ? |
None that i have found but still working on it. |
Hello, hope you are doing well. |
firebase/firebase-js-sdk#5475 (comment) This seems to be the best lead however i have not figured out how to implement with We had to use scully. But I will get start debugging this again soon. |
Also encountering this. I tried to use |
I am encountering same issue. Any solution yet ? I tried creating webpack.config.js
|
"firebase": "^9.8.1", |
This will solve the issue for you if you are getting it when server side rendering (we are using Angular Universal)
|
Thank you. May I ask you what the implementation for Angular 13 / Angularfire 7.3.0 should look like? |
What I shared above is working for me with angular 13 and angularfire 7 |
Where this initializeAuth has to be mentioned ? I tried replacing all getAuth with this but it throws error saying initializeAuth can only be intialize one. |
Thanks @yharaskrik. It worked fine with modular firebase 9 We were in a process to update our firebase from 8 to 9. We had manage to remove compat version and run our application on modular version. Its working fine with Angular Universal + Angular version 14 and firebase 9 |
😎😍😋😄🤔
…On Tue, 28 Jun 2022 at 23:30, Santosh ***@***.***> wrote:
Thanks @yharaskrik <https://github.com/yharaskrik>. It worked fine with
modular firebase 9
We were in a process to update our firebase from 8 to 9. We had manage to
remove compat version and run our application on modular version. Its
working fine with Angular Universal + Angular version 14 and firebase 9
—
Reply to this email directly, view it on GitHub
<#3181 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXJPNYZXTVZUWNZKZGV24ILVRO7OJANCNFSM5Q775GQA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Qui a une solution SSR 13 j'ai cauchemar pour ce probleme |
LIKEWISE. does anyone have a solution already? |
Try my solution from above. It worked for me and others in the thread |
@Santoshah the solution above doesn't work on my end. const IMPORTS = [
provideFirebaseApp(() => initializeApp(env.firebase)),
provideStorage(() => getStorage(initializeApp(env.firebase))),
// provideAuth(() => initializeAuth(initializeApp(env.firebase), {
// persistence: [ indexedDBLocalPersistence, browserLocalPersistence, browserSessionPersistence ],
// popupRedirectResolver: browserPopupRedirectResolver
// }))
provideAuth(() => {
if (typeof document !== 'undefined') {
return initializeAuth(getApp(), {
persistence: browserLocalPersistence,
popupRedirectResolver: browserPopupRedirectResolver,
});
}
return getAuth(getApp());
}),
]; |
nevermind anyways, I already resolve the issue. |
Would you care to share what did you do to resolved the error. It might helped someone. |
const IMPORTS = [
provideFirebaseApp(() => initializeApp(env.firebase)),
provideStorage(() => getStorage(getApp())),
provideAuth(() => (typeof document === 'undefined'
? getAuth(getApp())
: initializeAuth(getApp(), {
persistence: browserLocalPersistence,
popupRedirectResolver: browserPopupRedirectResolver
})
))
]; |
Where this initializeAuth has to be mentioned ? I am using angular 14 and firebase 9 |
I am in the same boat and trying to build ssr. We do not have Is there any way to solve it while using compat. We are on angular/[email protected] and "firebase": "^9.23.0", We have this in our app.module.ts
Error that we are getting
|
Firebase:
AngularFire:
How to reproduce these conditions
run habitat-commons:serve-ssr:development
node dist/apps/habitat-commons/server/main.js
First Error
i looked into the
_getInstance
mentioned in the callstack. it takes an arg that should be a class instance. hence the error.Here is what
_getInstance
looked like in my ssr bootstrap (main.js
)The log i added(see above) revealed that an error instead of a class was passed in the 3 rd time.see out put below
of course all my servers and test requests are on local host...Do you know anything that can help me understand either error
or
Expected behavior
I expected to send a universal rendered view to the browser
Actual behavior
Firebase auth prevents universal from performing its task.
The text was updated successfully, but these errors were encountered: