socketcluster icon indicating copy to clipboard operation
socketcluster copied to clipboard

Getting unknown error

Open XiaoxiaYao opened this issue 1 year ago • 4 comments

Hi,

somehow, in our server, we always get this weird error periodically.

Image

Anyone is having the same issue?

XiaoxiaYao avatar Jan 20 '25 21:01 XiaoxiaYao

Can you share some code to look at?

maarteNNNN avatar Jan 20 '25 22:01 maarteNNNN

Hi, I am not sure what code I should share? I have some folders like these:

Image

XiaoxiaYao avatar Jan 21 '25 08:01 XiaoxiaYao

To debug this JSON parsing error, I'd recommend:

  1. Create a minimal example that reproduces the error - this will help isolate the issue and make it easier to troubleshoot.

  2. Based on the error message, it specifically mentions '@' character, review all your endpoint calls and responses for that character.

    • JSON payloads in your requests
    • Response data parsing
    • Any fields that might contain special characters like '@'
  3. Try validating your JSON for any errors.

  4. Log your JSON via manually parsing them, e.g. console.log(JSON.parse('@')).

It's unlikely that this error is related to SocketCluster itself.

If you share the minimal example, I can help you identify the root cause.

maarteNNNN avatar Jan 21 '25 10:01 maarteNNNN

Thanks. Let me try to reproduce with minimal exmpale. Maybe take some time.

XiaoxiaYao avatar Jan 21 '25 11:01 XiaoxiaYao