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

JSON parsing issue when we have message sent with open connection #8

Open
iosnewbie2016 opened this issue Jul 16, 2019 · 0 comments
Open

Comments

@iosnewbie2016
Copy link

Hi - Thanks for the code. The client project works fine when there is no message sent from server (our own server) with open connection. But when there is a message sent with open connection, it throws a json parsing error. Could you pls help?

SyntaxError: Unexpected token H in JSON at position 0
    at JSON.parse (<anonymous>)
    at deserializer (WebSocketSubject.js:12)
    at tryCatcher (tryCatch.js:6)
    at WebSocket.socket.onmessage [as __zone_symbol__ON_PROPERTYmessage] (WebSocketSubject.js:174)
    at WebSocket.wrapFn (zone.js:1188)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421)
    at Object.onInvokeTask (core.js:3815)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)
    at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:496)
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

1 participant