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

Cannot call method 'toString' of null #115

Open
tris opened this issue Mar 31, 2017 · 1 comment
Open

Cannot call method 'toString' of null #115

tris opened this issue Mar 31, 2017 · 1 comment

Comments

@tris
Copy link

tris commented Mar 31, 2017

7 Mar 09:16:17 - 0 of 6 REST requests since 1488906969222
Error parsing response to oauth token request
7 Mar 09:16:17 - Error: unable to parse vehicle data response as JSON, login failed. Trying again.
7 Mar 09:16:27 - 1 of 6 REST requests since 1488906969222
Error parsing response to oauth token request
7 Mar 09:16:27 - Error: unable to parse vehicle data response as JSON, login failed. Trying again.
7 Mar 09:16:37 - 2 of 6 REST requests since 1488906969222
7 Mar 09:16:48 - Info: car is in (asleep) state, will check again in 1 minutes
7 Mar 09:17:09 - Info: car is napping or sleeping, skipping auxiliary REST data sample
7 Mar 09:17:48 - 0 of 6 REST requests since 1488907029226
7 Mar 09:17:55 - Info: car is in (asleep) state, will check again in 1 minutes
7 Mar 09:18:09 - Info: car is napping or sleeping, skipping auxiliary REST data sample
7 Mar 09:18:55 - 0 of 6 REST requests since 1488907089232
7 Mar 09:18:56 - Error: expecting an array if vehicle data from Tesla but got this:

TypeError: Cannot call method 'toString' of null
    at Object.exports.log (util.js:492:42)
    at Request._callback (/usr/lib/node_modules/teslams/examples/streaming.js:659:18)
    at Request.self.callback (/usr/lib/node_modules/teslams/node_modules/request/request.js:186:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/lib/node_modules/teslams/node_modules/request/request.js:1081:10)
    at Request.emit (events.js:95:17)
    at IncomingMessage.<anonymous> (/usr/lib/node_modules/teslams/node_modules/request/request.js:1001:12)
    at IncomingMessage.g (events.js:180:16)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:944:16
[1]    20900 exit 8     streaming --db tesla -z
@hjespers
Copy link
Owner

hjespers commented Apr 2, 2017

hmm. Looks like your car was asleep and then the Tesla service went down so it returned 'null' instead of valid data. I can see about putting some better error handling around this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants