General questions

WebSocket connection to 'wss://cloud.myscript.com/api/v4.0/iink/document' failed: net::ERR_FAILED

I'm using MyScript on React.js.

Sometimes, there's an error with message like this :


WebSocket connection to 'wss://cloud.myscript.com/api/v4.0/iink/document' failed: net::ERR_FAILED

or,

WebSocket connection to 'wss://cloud.myscript.com/api/v4.0/iink/document' failed: Error during WebSocket handshake: Unexpected response code: 503


What is this error, and how to solve? 


Dear Lee Brown,


thank you for your question.


Currently, it seems there was a service interrruption.


Is it occurring with a particular request? If so, could you please forward us the full request?


Best regards,


Olivier

Dear Olivier,

I don't know the exact condition of the error. All I feel is that it is an error that usually occurs between 14:00 and 17:00 (GMT + 9). (Of course, it doesn't mean there's no error in the morning) Frequent access doesn't seem to be a problem either. If this error occurs on WebSocket, RestAPI also suffers from exports. Therefore, it is not necessarily a problem that is limited to Websocket.

Can you check if these errors have been reported around users using React?


Best regards,

Brown

Dear Lee Brown,


currently, it looks like a request causes this crash.


When gettting a 503 error, could you please keep and provide us the  request? This would allow us to understand.


Indeed, it is not likely REACT is the cause of error but rather the request by itself.


Best regards,


Olivier

image

This is the Error log. I await your prompt resolution of this matter.

Thanks.


Brown, Lee.

Dear Lee Brown,


Currently, we are not able to figure out what causes this issue, and we need your collaboration to solve it.


When error 503 occurs, can you please catch the request that is sent to our server, and provide it?


Without it, we will not be able to investigate further.


Best regards,


Olivier

Actually I do nothing special. I just initialize MyScript editor, and doesn't connect to server. That's it.

If you want me the codes, This is it.   

import * as MyScriptJS from 'myscript';

export default function initEditors(
  editors, // this is editorRefs of React.js...
  exportHandler,
  minWidth,
  minHeight
) {
  const config = {
    triggerDelay: 2000,
    processDelay: 0,
    recognitionParams: {
      type: 'MATH',
      protocol: 'WEBSOCKET',
      apiVersion: 'V4',
      server: {
        scheme: 'https',
        applicationKey: 'applicationKey',
        hmacKey: 'hmacKey',
        websocket: {
          pingEnabled: false,
          autoReconnect: true
        }
      },
      v4: {
        math: {
          mimeTypes: ['application/x-latex'],
          solver: {
            enable: false
          },
          smartGuide: true,
          customGrammarContent:
            'symbol = 0 1 2 3 4 5 6 7 8 9 . , = + - x\nsymbol2=+ - .\nexpression ::= identity(symbol)|identity(symbol2)|hpair(symbol2,expression)|hpair(expression,symbol2)|hpair(expression,expression)\nstart(expression)'
        }
      }
    },
    renderingParams: {
      minWidth,
      minHeight
    }
  };
  editors.forEach((editor, idx) => {
    MyScriptJS.register(editor, config);
    editor.addEventListener('exported', exportHandler.bind(null, idx));
  });
} 

Is this right what you need?

Dear Lee Brown,


You also mentionned above a simple REST request could cause the issue.


Would you have one? That will be the fastest way to proceed for us.


Best regards,


Olivier

Dear Lee Brown,


I am updating this thread, as we are currently a bit puzzled: We did not see any request in your account, so were you able to send any request to our server?


If no, are you able to do a simple REST request? If it fails, can you please post it?


In websocket, were you able to do a single request? If no, how do you configure it?


Indeed, we are trying to guess the the issue you are facing, and are also puzzled we do not see any request on your side.


Best regards,


Olivier

Dear Olivier,

Oh, that's because I don't use this account for work. 

This is my private account, but the problem happens in my Company's account.

Maybe it'll happen in 'song@cloubot.com'

Dear Lee Brown,


thank you for the information.


On our side, we keep investigating. I keep you updated.


Best regards,


Olivier

Dear Olivier,

Hi, again :)..

It happens again right now.

So I notice you to know this.

image


Dear Lee Brown,


we were currently able to find out the cause of the issue: with some inks, our core technology crashes, which results in the 503 error you are facing.


This will be solved in a future update of our core technology, but at present we cannot commit when it will be done.


Best regards,


Olivier

Dear Olivier,


Thank you for the quick response.

Regarding the cause of the sporadic technology crashes, we are curious on which inks cause the issue and we are willing to patch the problem up by avoiding said inks.

Also, some clarification will be greatly appreciated as to what 'inks' are exactly and if they are interchangeable, how to do so.

Any information regarding which inks cause the problem will surely be of help.

Sincerely, Brown.

Login or Signup to post a comment