You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm submitting a ...
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
I'm doing some tests with an iNews Mos Gateway. When there is no MOS object in the stories, everything works fine. When I add a MOS object to a story, I get this error while it converts XML to JSON :
TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n | property 'mos' -> object with constructor 'Object'\n --- property 'parent' closes the circle
The problem seems to be that the iNews MOS object starts with the same <mos> root tag than the iNews story itself :
I did a little digging and it seems like there is a bug in the code that deals with reading the incoming message chunks. I think I've found the root cause and have implemented a fix in the PR #85.
@PascalViauRC would you be able to give that a spin (npm install @mos-connection/connector@3.0.5-nightly-fix-multiple-mos-tags-20231214-120351-59cacb2.0), to see if it helps?
[x] bug report
[ ] feature request
[ ] question about the decisions made in the repository
[ ] question about how to use this project
I'm doing some tests with an iNews Mos Gateway. When there is no MOS object in the stories, everything works fine. When I add a MOS object to a story, I get this error while it converts XML to JSON :
TypeError: Converting circular structure to JSON\n --> starting at object with constructor 'Object'\n | property 'mos' -> object with constructor 'Object'\n --- property 'parent' closes the circle
The problem seems to be that the iNews MOS object starts with the same
<mos>
root tag than the iNews story itself :When I replace the MOS object first tag (
<mos>
) by a modified tag (<_mos>
), it fixes the problem :If you want me to submit a pull request with the code I used to fix the problem, let me know !
The text was updated successfully, but these errors were encountered: