Error with inbuilt loopback user management

34 views
Skip to first unread message

prasanna kankanalapalli

unread,
Dec 6, 2016, 5:32:52 AM12/6/16
to LoopbackJS
I am trying out with basic sample of loopback for user management. I am using inbuilt user management of loopback. Have not written any customized user management yet.

1. basic sample created with loopback node module.
2. Ran the application.
3 . Have browsed the URL with API explorer.
4. Create User - success full  - Create User Post method.
5. Logged in user post method, able to login and loopback giving back access token in response body.
6. Have set the access token in API explorer
7. Tested Logged out. - working

for the first time its working. Then I have stopped Node JS loopback application and restarted again , Repeated above steps , however this time while logging out getting below error in Response body:
{
  "error": { "name": "SyntaxError", "status": 400, "message": "Unexpected token u", "body": "undefined", "statusCode": 400, "stack": "SyntaxError: Unexpected token u\n at Object.parse (native)\n at parse (D:\\Open Source\\NodeJS\\LoopBack\\Basic\\node_modules\\loopback\\node_modules\\body-parser\\lib\\types\\json.js:88:17)\n at D:\\Open Source\\NodeJS\\LoopBack\\Basic\\node_modules\\loopback\\node_modules\\body-parser\\lib\\read.js:116:18\n at invokeCallback (D:\\Open Source\\NodeJS\\LoopBack\\Basic\\node_modules\\loopback\\node_modules\\body-parser\\node_modules\\raw-body\\index.js:262:16)\n at done (D:\\Open Source\\NodeJS\\LoopBack\\Basic\\node_modules\\loopback\\node_modules\\body-parser\\node_modules\\raw-body\\index.js:251:7)\n at IncomingMessage.onEnd (D:\\Open Source\\NodeJS\\LoopBack\\Basic\\node_modules\\loopback\\node_modules\\body-parser\\node_modules\\raw-body\\index.js:307:7)\n at emitNone (events.js:67:13)\n at IncomingMessage.emit (events.js:166:7)\n at endReadableNT (_stream_readable.js:913:12)\n at nextTickCallbackWith2Args (node.js:442:9)\n at process._tickDomainCallback (node.js:397:17)" } }

this is consistently getting repeated. What is the cause of the issue. Any information would be helpful as we are evaluating  loopback as Rest API.

sim...@ca.ibm.com

unread,
Dec 7, 2016, 4:50:56 PM12/7/16
to LoopbackJS

Can you create an issue in the example itself https://github.com/strongloop/loopback-example-user-management/issues with a link to the repo so we can reproduce on our machines? Let's continue the discussion on GitHub.
 
Reply all
Reply to author
Forward
0 new messages