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 get this error when im trying to message the bot
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at _clone (somepath\BotlyBot\node_modules\botly\lib\Botly.js:575:17)
at Botly.handleMessage (somepath\BotlyBot\node_modules\botly\lib\Botly.js:494:18)
at router.post (somepath\BotlyBot\node_modules\botly\lib\Botly.js:99:18)
at Layer.handle [as handle_request] (somepath\BotlyBot\node_modules\express\lib\router\layer.
js:95:5)
at next (somepath\BotlyBot\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (somepath\BotlyBot\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (somepath\BotlyBot\node_modules\express\lib\router\layer.
js:95:5)
at somepath\BotlyBot\node_modules\express\lib\router\index.js:281:22
at Function.process_params (somepath\BotlyBot\node_modules\express\lib\router\index.js:335:12
)
The text was updated successfully, but these errors were encountered:
Hello @ryancabansag , it's an issue concerning your webhook JSON response.
I had a problem like this at the beginning.
Try app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: false }));
before the app.use("/webhook", botly.router());
(end of your app.js)
if i remember well it resolved the issue.
If it didn't , just look at the exemple (https://github.com/miki2826/botly/blob/master/example/app.js) or show me your code ! :)
I hope you will resolve this soon 👍
I get this error when im trying to message the bot
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse ()
at _clone (somepath\BotlyBot\node_modules\botly\lib\Botly.js:575:17)
at Botly.handleMessage (somepath\BotlyBot\node_modules\botly\lib\Botly.js:494:18)
at router.post (somepath\BotlyBot\node_modules\botly\lib\Botly.js:99:18)
at Layer.handle [as handle_request] (somepath\BotlyBot\node_modules\express\lib\router\layer.
js:95:5)
at next (somepath\BotlyBot\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (somepath\BotlyBot\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (somepath\BotlyBot\node_modules\express\lib\router\layer.
js:95:5)
at somepath\BotlyBot\node_modules\express\lib\router\index.js:281:22
at Function.process_params (somepath\BotlyBot\node_modules\express\lib\router\index.js:335:12
)
The text was updated successfully, but these errors were encountered: