You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UPDATE: - Just tested on 6.5.0 and there is no such bug. But on 6.9.2 I have this error UPDATE2: - Just tested on 6.8.0 and there is no such bug. But on 6.9.2 I have this error
Function onRequest gives error when receiving data on local system and no error when deployed.
I have system which was working no problem but then I updated my firebase-tools.
And now I cant test onRequest functions with my postman. When I send any data to it like
I have error UnhandledPromiseRejectionWarning.
But if I deploy this function and send this request to deployed function then there is no error.
firebase serve --only functions
postman send post request with Content-Type: application/x-www-form-urlencoded {name: john}
[REQUIRED] Expected behavior
print Body: name: john
print Hello from Firebase!
[REQUIRED] Actual behavior
(node:8692) UnhandledPromiseRejectionWarning: SyntaxError: Unexpected token a in JSON at position 1
at JSON.parse (<anonymous>)
at FunctionsEmulator.<anonymous> (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:80:46)
at Generator.next (<anonymous>)
at ....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:7:71
at new Promise (<anonymous>)
at __awaiter (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:3:12)
at handler (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/lib/emulator/functionsEmulator.js:75:43)
at Layer.handle [as handle_request] (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/node_modules/express/lib/router/layer.js:95:5)
at next (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (....nvm/versions/node/v8.11.1/lib/node_modules/firebase-tools/node_modules/express/lib/router/route.js:112:3)
(node:8692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
The text was updated successfully, but these errors were encountered:
rendomnet
changed the title
function onRequest gives error when sending data on local system and no error when deployed
function onRequest gives error when receiving data on local system and no error when deployed
May 13, 2019
rendomnet
changed the title
function onRequest gives error when receiving data on local system and no error when deployed
[v6.9.2]function onRequest error when receiving data on local system. When deployed not bug and on 6.8.0 NO bug
May 13, 2019
abeisgoat
changed the title
[v6.9.2]function onRequest error when receiving data on local system. When deployed not bug and on 6.8.0 NO bug
SImpleBodyParser doesn't handle x-www-form-urlencoded properly
May 13, 2019
UPDATE: - Just tested on 6.5.0 and there is no such bug. But on 6.9.2 I have this error
UPDATE2: - Just tested on 6.8.0 and there is no such bug. But on 6.9.2 I have this error
Function onRequest gives error when receiving data on local system and no error when deployed.
I have system which was working no problem but then I updated my firebase-tools.
And now I cant test onRequest functions with my postman. When I send any data to it like
I have error UnhandledPromiseRejectionWarning.
But if I deploy this function and send this request to deployed function then there is no error.
[REQUIRED] Environment info
**firebase-tools: 5.9.2
**Platform: macOs
[REQUIRED] Test case
[REQUIRED] Steps to reproduce
firebase serve --only functions
postman send post request with Content-Type: application/x-www-form-urlencoded {name: john}
[REQUIRED] Expected behavior
print Body: name: john
print Hello from Firebase!
[REQUIRED] Actual behavior
The text was updated successfully, but these errors were encountered: