question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"updateCurrentUser failed" error on screen, after using 4.7.1 via ES module import

See original GitHub issue

Describe your environment

  • Operating System version: macOS
  • Browser version: Chrome 85
  • Firebase UI version: 4.7.1
  • Firebase SDK version: 8.0.0

Describe the problem

The ability to import as ES module in 4.7.1 is something I have been looking forward to. Bringing it in in my application, I found two problems. This issue describes the more crucial one, which I don’t understand and can not find a way around.

After changing my code to use import instead of loading via the globals, and signing in with Google account, I see this:

image

I have no idea, where it comes from.

Steps to reproduce:

  1. Clone https://github.com/akauppi/GroundLevel-es-firebase-app
  2. Set up a Firebase project to work against (please read the README, until you can npm run dev:online).
  3. npm run dev:online

Open the browser at http://localhost:3001 and try Google sign-in.

Expected: one should get to the app Actual: the above error is shown

Relevant Code:

Unfortunately, I don’t have a minimum reproducing project available. Merely scouting, if other are also seeing this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
beardsleymcommented, Apr 2, 2021

Same, local not working. Production seems fine. edit: seems to be the buildDir location being within firebase functions folder

"@nuxtjs/firebase": "^7.5.0",
    "firebase": "^8.3.1",
    "firebaseui": "^4.8.0",
    // nuxt.config.js
     target: "static",

    services: {
      auth: {
        persistence: "local",
        initialize: {
          onAuthStateChangedAction: "onAuthStateChanged"
        },
        ssr: false // true doesn't work either...
      },
     buildDir: "../functions/.nuxt",  // It is this line that breaks it when running locally. 
2reactions
Scinocommented, Nov 18, 2020

I have the same problem, in localhost only, using npm nuxtjs/firebase with npm firebase and npm firebaseui.

"@nuxtjs/firebase": "^7.1.1",
"firebase": "^8.0.2",
"firebaseui": "^4.7.1",

While it perfectly works in production.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase UI: updateCurrentUser failed: First argument "user ...
This workaround is to list firebaseui in the project's packages.json : ... and then import the firebase modules from firebaseui's ...
Read more >
“create element from array” Code Answer
server/server.js Module build failed (from . ... npx create react app Must use import to load ES Module error · mongodb mongoose document...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found