krauskopf / node-red-contrib-car-bmw

Node-RED nodes for BMW ConnectedDrive
Other
11 stars 8 forks source link

crashes with "TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters" #2

Closed CONSULitAS closed 5 years ago

CONSULitAS commented 5 years ago
25 May 19:36:28 - [info] Starting flows
25 May 19:36:28 - [info] Started flows
25 May 19:36:29 - [info] Server now running at http://127.0.0.1:1880/
25 May 19:36:29 - [red] Uncaught Exception:
25 May 19:36:29 - TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters
at new ClientRequest (_http_client.js:115:13)
at Object.request (https.js:281:10)
at Object.request (/usr/lib/node_modules/node-red/node_modules/agent-base/patch-core.js:23:20)
at Object.exports.call (/home/pi/.node-red/node_modules/node-red-contrib-car-bmw/lib/bmwrequest.js:26:20)
at onSuccess (/home/pi/.node-red/node_modules/node-red-contrib-car-bmw/car-bmw.js:180:24)
at readTokenData (/home/pi/.node-red/node_modules/node-red-contrib-car-bmw/lib/tokenmanager.js:97:5)
at /home/pi/.node-red/node_modules/node-red-contrib-car-bmw/lib/tokenmanager.js:111:7
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
nodered.service: main process exited, code=exited, status=1/FAILURE
Unit nodered.service entered failed state.
nodered.service holdoff time over, scheduling restart.
Stopping Node-RED graphical event wiring tool...
krauskopf commented 5 years ago

Thanks for your error report. Looks like you entered a VIN (https://de.wikipedia.org/wiki/Fahrzeug-Identifizierungsnummer) with invalid characters in the configuration of the node. Maybe it contains spaces, which is not allowed? I will add some code to show an appropriate error message instead of generating an exception and crashing node.red.

krauskopf commented 5 years ago

Fixed with 52b9b43b6ef88431b36a66085d50b02aaf595e7c

CONSULitAS commented 4 years ago

Fixed with 52b9b43

Thanks a lot, works like a charm! Herzlichen Dank, klappt super! 👍