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
I'm receiving the following error after trying to use the client to get all items. Here is the following error stack trace.
SyntaxError: Unexpected token o in JSON at position 0
at Object.parse (native)
at self.oa.get.stream (/user_code/node_modules/xero-node/lib/application.js:303:33)
at passBackControl (/user_code/node_modules/xero-node/lib/oauth/oauth.js:406:25)
at IncomingMessage.<anonymous> (/user_code/node_modules/xero-node/lib/oauth/oauth.js:422:17)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
Yes, this is because the data coming back for oauth errors is not valid JSON.
This is going to be because your oauth token is either invalid, expired, or the signature validation has failed.
To debug I suggest you sign up for a runscope account and place the runscope bucket ID in your config.json. This will allow you to log the requests and see the exact content so you can resolve your issue.
In the mean time I'll figure out a way to convert the non-json to json for responding.
I'm receiving the following error after trying to use the client to get all items. Here is the following error stack trace.
xero-node/lib/application.js
Line 304 in 910dd1a
The text was updated successfully, but these errors were encountered: