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

TypeError: handler is not a function only when deployed to firebase but not when serve #10227

Open
jojonarte opened this issue Jan 23, 2020 · 5 comments
Labels
examples Issue was opened via the examples template. good first issue Easy to fix issues, good for newcomers

Comments

@jojonarte
Copy link

Examples bug report

with-firebase-hosting

Error: > handler is not a function

  • Downloaded the sample using the instructions in the description and ensuring everything works
  • Integrated custom express server to handle redirection see https://github.com/jojonarte/with-express-firebasehosting-next
  • Tested the application okay with npm run serve everything in the application works
  • Tested with npm run deploy, deployment was successful however opening the hosting URL results in Error: could not handle the request and in firebase functions log TypeError: handler is not a function at cloudFunction (/srv/node_modules/firebase-functions/lib/providers/https.js:57:9) at /worker/worker.js:783:7 at /worker/worker.js:766:11 at _combinedTickCallback (internal/process/next_tick.js:132:7) at process._tickDomainCallback (internal/process/next_tick.js:219:9)

To Reproduce

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

  1. Go to https://github.com/jojonarte/with-express-firebasehosting-next
  2. follow manual download instructions
  3. follow firebase setup instructions
  4. npm install
  5. npm run serve should make the app work
  6. npm run deploy
  7. view the URL

should build and upload to hosting and firebase functions and error shouldn't show just like in npm run serve

I expected it should build and deploy the cloud function and hosting properly to firebase just like how it works using npm run serve

System information

  • OS: macOS
  • Version of Next.js: "^9.1.7"
@Timer Timer added good first issue Easy to fix issues, good for newcomers help wanted examples Issue was opened via the examples template. labels Feb 3, 2020
@Timer Timer removed the help wanted label Jun 3, 2020
@thevvv36
Copy link

thevvv36 commented Jul 6, 2020

hey can i contribute a take this issue

@jojonarte

This comment has been minimized.

@shivgodi7

This comment has been minimized.

@balazsorban44
Copy link
Member

@thevvv36 do you still have interest in helping out on this?

@aayank13

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue was opened via the examples template. good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants