Skip to content
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

Firebase promises stuck in "pending" during next export #4793

Closed
emiljohansson opened this issue Jul 17, 2018 · 5 comments
Closed

Firebase promises stuck in "pending" during next export #4793

emiljohansson opened this issue Jul 17, 2018 · 5 comments

Comments

@emiljohansson
Copy link

Bug report

Describe the bug

Related to #2126

When trying to export any project using firebase, as soon as firebase.database() is called, the export gets stuck and won't finish. As mentioned in issue 2126 if I kill the process, the page works fine, so it seems to complete the main process.
I have tried this both in my own project, as well as the learnnextjs-demo, branch firebase-hn.
I've also tried to force break out of the Promise (where I think is the problem, but can't know for sure) with both Promise.reject/resolve and throwing errors.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to https://nextjs.org/learn/excel/lazy-loading-modules
  2. Follow the instructions
  3. I had to install the latest version of firebase (5.2.0) to get it to install and run in dev
  4. run next build && next export

Expected behavior

To complete the export process.

Screenshots

screenshot-next-export

System information

  • OS: macOS
  • Version of Next.js: 10.5.0 (also tried 9.11.2 and 8.11.3)

Additional context

The the demo project, I added

exportPathMap: function (defaultPathMap) {
  return {
    '/': { page: '/' }
  }
}

...and to my project I'm using nextjs-export-path-map:

exportPathMap: function (defaultPathMap) {
  return defaultPathMap
}

I've experimented with loading all of firebase as well as specific ones:

const firebase: any = await import('firebase')
const firebase: any = await import('firebase/app')
require('firebase/database')
@timneutkens
Copy link
Member

timneutkens commented Jul 17, 2018

I guess this is the same as #4747 fixed by #4749

@emiljohansson
Copy link
Author

@timneutkens I updated both projects to latest release of next (6.1.1-canary.1) and got the same result. Am I suppose to make any other changes?

@timneutkens
Copy link
Member

timneutkens commented Jul 17, 2018

It's not released yet, I merged it when I saw your issue. Will do a new release soon.

@emiljohansson
Copy link
Author

@timneutkens With version 6.1.1-canary.2 the export finish and I get a Export successful message 👍

@timneutkens
Copy link
Member

timneutkens commented Jul 19, 2018

Great, will close this then 🙌

@lock lock bot locked as resolved and limited conversation to collaborators Jul 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants