Closed PascalViauRC closed 9 months ago
hmm, that's a strange bug indeed!
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?
@nytamin It fixes the problem, thanks !
The fix for this is now published in version 3.0.6
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 !