-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: JSON.stringify cannot serialize cyclic structures. #205
base: master
Are you sure you want to change the base?
Conversation
where is this error originating from? specifically which function call and payload is causing this issue? |
from payload after adding and send playing song, There will be corrections in every relevant situation. |
This do look like a bug, but I dont think going the route of removing the circular reference is also the best solution, cc: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value I propose that we should take account circular references and use / implement something that can serialize those Edit: though I'm open for suggestions, do we want to take those into account, or should we just remove it |
I'm not sure, it depends on the way. Is there anything else that can be fixed? |
I don't believe shoukaku without modifications is able to have circular references in data being sent, can you send a sample payload? Are you using a modification/extension of shoukaku (like kazagumo)? |
I have changed my payload. But if you use this just in case, there won't be any problems in the future. you can close this |
For the meantime I'm blocking this, serializing cyclic references can cause some issues, like possibly a very big payload to serialize, that can cause event loop hangs |
I would suggest to catch this specific error and rethrow it with a reference to this PR |
JSON.stringify cannot serialize cyclic structures.
with functionremoveCircularReferences