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

Unexpected token u in JSON at position 0 #15

Closed
chinlun opened this issue Feb 5, 2017 · 4 comments
Closed

Unexpected token u in JSON at position 0 #15

chinlun opened this issue Feb 5, 2017 · 4 comments

Comments

@chinlun
Copy link

chinlun commented Feb 5, 2017

Hi, I just trying the sample code and keep getting the following error when I try to sent message to the bot. Could not figure out what caused it.

SyntaxError: Unexpected token u in JSON at position 0
at Object.parse (native)
at _clone (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/botly/lib/Botly.js:569:17)
at Botly.handleMessage (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/botly/lib/Botly.js:488:18)
at router.post.ex (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/botly/lib/Botly.js:94:18)
at Layer.handle [as handle_request] (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/route.js:131:13)
at Route.dispatch (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/layer.js:95:5)
at /opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/index.js:277:22
at Function.process_params (/opt/bitnami/apps/yeepee-messenger-bot/node_modules/express/lib/router/index.js:330:12)

@chinlun chinlun closed this as completed Feb 5, 2017
@cAstraea
Copy link

Did you figure it out ? Having the same issue. I think it's a difference between the npm version ?

@kyputer
Copy link

kyputer commented Aug 1, 2017

I am having this issue too. Why did you close it and not follow up? @chinlun

@aellanglet
Copy link

@KST123ABC look here : #31
Same issue and it seems that my answer worked. 👍 😄
Hope it will be the same for you ;)

@cAstraea
Copy link

cAstraea commented Aug 1, 2017

@KST123ABC Yes @aellanglet is correct! :) Was missing the body parser

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

4 participants