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

It starts, but while loading data, it stops with: «SyntaxError: Unexpected token n in JSON at position 15689» #30

Open
siers opened this issue Jan 26, 2017 · 1 comment

Comments

@siers
Copy link

siers commented Jan 26, 2017

s|terminal-slack master % node main.js
Error: SLACK_TOKEN undefined. Please add SLACK_TOKEN to the environment variables.
s|terminal-slack master % vim ~/work/notes/slack-token
s|terminal-slack master % SLACK_TOKEN="$(cat ~/work/notes/slack-token)" node main.js
SyntaxError: Unexpected token n in JSON at position 15689
    at JSON.parse (<anonymous>)
    at Request._callback (/home/s/terminal-slack/slackClient.js:31:29)
    at Request.self.callback (/home/s/terminal-slack/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/home/s/terminal-slack/node_modules/request/request.js:1081:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/home/s/terminal-slack/node_modules/request/request.js:1001:12)
    at Object.onceWrapper (events.js:290:19)
s|terminal-slack master % g pl
Current branch master is up to date.
s|terminal-slack master % date
Thu Jan 26 18:02:31 EET 2017
@evanyeung
Copy link
Owner

Hi @siers, I followed your repro steps here and didn't end up with any errors. If this is still unsolved, is there a way you could log the error, response, and data variables from line 20 of slackClient.js (remove any personal information first if needed)? You should be able to write them to a file as done in line 22. This might help in debugging the issue. Thanks!

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