> firebase --version
4.1.1
MacOS
firebase serve using this script: ./scripts/serve.sh --firebase.The visited page should load.
Note that it loads fine with [email protected].
You'll see this in the browser: 'Unexpected error occurred.', and this in the terminal where the server was launched:
Error: {"redirect":""} is not a recognized responder directive
at Responder._handle (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/superstatic/lib/responder.js:72:22)
at Responder.handle (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/superstatic/lib/responder.js:43:15)
at /Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/superstatic/lib/middleware/files.js:59:36
at tryCatch (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:525:12)
at invokeCallback (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:538:13)
at publish (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:508:7)
at flush (/Users/chalin/.nvm/versions/node/v10.9.0/lib/node_modules/firebase-tools/node_modules/rsvp/dist/rsvp.js:2415:5)
at process._tickCallback (internal/process/next_tick.js:61:11)
The firebase config file is: https://github.com/dart-lang/site-www/blob/master/firebase.json.
Related:
cc @kwalrath @filiph @kevmoo @mbleigh
Getting this same issue with error {"redirect":""} is not a recognized responder directive also. Same behavior, the browser will print out: 'Unexpected error occurred.'
In my case, the only page that is failing is the index.html file, all other pages are loading properly.
Working with firebase 4.2.0 on Windows 10
it's superstatic.js @ line 57 watching to remove trailing slash if its setting is false. Try to set "trailingSlash:true" in firebase.json for a temporary fix
Thanks for pin-pointing that. Both firebase and superstatic have issues. I've reverted to earlier versions for both.
Hitting this issue as well.
@chalin Which versions did you downgrade to? Might be useful for others having the same issue (and who don’t want to change their trailingSlash settings).
@mathiasbynens, these versions:
"firebase-tools": "4.0.3",
"superstatic": "^5.0.2"
I can confirm [email protected] doesn’t have the firebase serve issue. However, it seems firebase deploy no longer works on v4.0.3. I keep getting:
âš Your CLI authentication needs to be updated to take advantage of new features.
âš Please run firebase login --reauth
Then, after doing the firebase login --reauth dance:
Error: An unexpected error has occurred.
Hopefully this can be fixed soon — I’d rather not have to choose between testing locally or deploying ;)
Maybe you can use superstatic for testing locally and firebase for deploying. (FYI, I can deploy locally without issues.)
To anyone experiencing this issue, just re-install npm i -g firebase-tools so it pulls in the latest superstatic as a dependency.
[email protected] was just released containing the fix (https://github.com/firebase/superstatic/pull/262).
Most helpful comment
it's superstatic.js @ line 57 watching to remove trailing slash if its setting is false. Try to set "trailingSlash:true" in firebase.json for a temporary fix