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

restler error in faceplate #114

Closed
otogen opened this issue Mar 27, 2013 · 4 comments
Closed

restler error in faceplate #114

otogen opened this issue Mar 27, 2013 · 4 comments

Comments

@otogen
Copy link

otogen commented Mar 27, 2013

Hello, I am a Node.js & Express.js beginner

I got a similar error below today. The program is going to clash after that. It is very weird because I have never got this error before.
I am using Facebook-Template-Nodejs including Faceplate 0.0.4 , Restler 2.0.0, and b64url 1.0.3
Also using Node v0.8.18
I have tried npm install restler2.0.1, but could not get solution.

I am glad if I could get solution.

Thank you for your thoughts !

-------------------- Error message ---------------------
undefined:1
SyntaxError:Failed to parse JSON body:Unexpected token o

SyntaxError: Unexpected token S
at Object.parse(native)
at EventEmitter.FaceplateSession.get(../node_modules/faceplate/index.js:121:25)
at EventEmitter.emit(events.js:99:17)
at EventEmitter.mixin._fireError(../....../node_modules/restler/lib/restler.js:192:10)
at mixin._responseHandler(../......./node_modules/restler/lib/restler.js:142:20)

.

@machunter
Copy link

i am also having multiple problems recently. I think your specific problem is due to the fact that now on certain requests what you are getting is a javascript object not a string. so anywhere you have a call JSON.parse() on the return could create the issue. my particular problem is that the on('success') calls are called across different requests… not sure why.

@machunter
Copy link

my other problem was related to issue #113

@otogen
Copy link
Author

otogen commented Mar 28, 2013

Thank you machunter San! I will check this and report you here soon !!!

@otogen
Copy link
Author

otogen commented Mar 28, 2013

Hi Machunter San !

I have just tried your comments along Henddher San's comments at heroku/faceplate#26
Yes, that is the problem and got solutions.
Thank you so much for your great comments !!!

In my case, res.cookie, req.session.cookies also does not work. I appreciate if you have any knowledge about that.

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

3 participants