-
Couldn't load subscription status.
- Fork 133
Description
I have installed message_bus by doing
yarn add message_bus
and now in my package.json i can see the package version installed "^2.0.3-beta.2"
in the js i do :
MessageBus.subscribe('/channel', (data) => {
console.log(data);
})and in the console when a event is published to the channel i receive the following error:
VM40:2 Uncaught SyntaxError: Unexpected token | in JSON at position 129
at JSON.parse (<anonymous>)
at Object.success (message-bus.js:175)
at XMLHttpRequest.xhr.onreadystatechangeIf i understand correctly the issue is generated here
after some investigation i can see that the issue is message-bus.js:257
options.success(xhr.responseText);
where
responseText: "[{"global_id":-1,"message_id":-1,"channel":"/__status","data":{"/channel":1}}]
↵|
↵[]
↵|
↵"
which does not look very good to me.
Note
Also the javascript in this repo is different from what i see in the package installed with yarn.
To make a test i just tried to copy-paste the original source of the javascript in the repo and it worked as expected so i guess that the fix here is just release the right version of the javascript client in the npm or wherever is stored
:-)
