Skip to content

Sessions are not persisted (accross tabs?) and setPersistence() throwing error  #7251

@falk-stefan

Description

@falk-stefan

I am currently facing the issue that sesions are not persisted correctly and that setting the persistence mode is throwing an exception. Since I am using AngularFire, I have created an issue over there (angular/angularfire#3340).

However, it's possible that this issue is not related to AngularFire but rather with the Firebase JS SDK.

If I'm importing directly from @firebase/auth, fetch the Auth instance and run the native setPersistence() method I'm getting the same exception:

import {setPersistence, getAuth} from "@firebase/auth";
// ..
const auth = getAuth();
if(!auth) {
  throw "Umm...";
}
setPersistence(auth, {type: "LOCAL"}).then();
ERROR Error: Uncaught (in promise): Error: INTERNAL ASSERTION FAILED: Expected a class definition
Error: INTERNAL ASSERTION FAILED: Expected a class definition
    at debugFail (index-3363a72a.js:497:11)
    at debugAssert (index-3363a72a.js:508:9)
    at _getInstance (index-3363a72a.js:530:5)
    at index-3363a72a.js:2461:59

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions