samples icon indicating copy to clipboard operation
samples copied to clipboard

JS API - Uncaught TypeError: Cannot read property 'digest' of undefined

Open tibinvpaul opened this issue 5 years ago • 6 comments

Hey,

I am trying out the sample JS code locally but getting the error Uncaught TypeError: Cannot read property 'digest' of undefined. As per the document, I have created the app, created the user and using the correct access token. Can you help me to understand what could be wrong?

Uncaught TypeError: Cannot read property 'digest' of undefined
    at $SO (mesibo.js:28)
    at Mesibo.$S.D (mesibo.js:24)
    at $Sf.$S.D (mesibo.js:5)
    at WebSocket.b.f.onmessage (mesibo.js:6)

  | $SO | @ | mesibo.js:28
-- | -- | -- | --
  | $S.D | @ | mesibo.js:24
  | $S.D | @ | mesibo.js:5
  | b.f.onmessage | @ | mesibo.js:6

Also, where can I find the description for each Mesibo_OnConnectionStatus codes? Currently, I am getting 6 first and 4 second. Not getting a 1.

tibinvpaul avatar Sep 10 '19 18:09 tibinvpaul

I have the same issue can anyone please point correct direction on this please

mtetno avatar Sep 29 '19 15:09 mtetno

you have to run it under https context (not http)

mesibo avatar Sep 29 '19 15:09 mesibo

I tried doing that post that i am not getting connection status as 1, below the console log :

TestNotify.prototype.Mesibo_OnConnectionStatus: 6
TestNotify.prototype.Mesibo_OnConnectionStatus: 4

What is status 4 indicating i cannot find any reference of that in mesibo documentation , can you please guide

mtetno avatar Sep 29 '19 16:09 mtetno

ensure that setAppName matches the appid used for generating user token.

mesibo avatar Sep 29 '19 16:09 mesibo

Thx , it got connected. Quick reply is appreciated :) Are the send and receive message visible on app console ? i cannot see it.

mtetno avatar Sep 29 '19 17:09 mtetno

You do not see anything in console. Messages are received in a callback function.

mesibo avatar Sep 30 '19 04:09 mesibo