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
The issue starts with the error message being generated: MosDevice "anews.snews.tv_demo" not found, which is unrelated to the actual problem. I discovered this after manually editing the sofie-mos-connection code and adding some try/catch blocks at the points where the message is received, converted from an XML string into an object, and then processed.
I noticed that the XML was being received and converted into an object without issues. However, the object had a structure different from what the rest of the code expected, leading to an internal error in the library. From there, I investigated why the structure had changed.
As I understand it, the sofie-mos-connection library uses another library, xml-js, to convert XML into objects, and xml-js in turn relies on another library, sax. My suspicion at the time was that one of these two libraries had been updated over time, causing the sofie-mos-connection code to break—most likely xml-js.
If you check the version of these libraries in the yarn.lock file within the sofie-mos-connection GitHub project, you'll see that the versions used at the time of implementation were xml-js@npm:^1.6.11 and sax@npm:^1.2.4. Today, newer versions exist, and because of the caret (^) symbol before the version numbers, the exact versions specified won't necessarily be used. When you install the project dependencies, newer compatible versions may be fetched.
When I initially created my example code, I didn’t face this issue. However, after reproducing your setup and installing the dependencies from scratch, the problem occurred.
My proposed solution was to use Yarn to ensure it respects the yarn.lock file from sofie-mos-connection and downloads the same versions of the libraries that were used at the time of implementation, as this is precisely what the yarn.lock file is designed to address.
Expected Behavior
Sofe mos returns the correct message and convert accordingly the xml to ARION system
Version
4.1.0
Severity / Impact
Cant use some MOS events, such as: mosReqObjList, mosReqObj and others
The text was updated successfully, but these errors were encountered:
I'm not able to reproduce this issue, I tried manually updating the sax dependency to its latest version, 1.4.1 (xml-js is already at the latest available version, 1.6.11) and ran the unit tests, but they all seem to be OK.
Do you think you could provide some more info? For example, could you try setting the debug property to true, and past some of your console logs here?
nytamin
changed the title
Receiving a bug inside sofie-mos node_modules
Bug: Bug in XML parsing gives internal error
Dec 5, 2024
About me
Working with MOS servers such as ARION and Sofie
Observed Behavior
A bug happening when integrate with MOS "Arion"
The issue starts with the error message being generated: MosDevice "anews.snews.tv_demo" not found, which is unrelated to the actual problem. I discovered this after manually editing the sofie-mos-connection code and adding some try/catch blocks at the points where the message is received, converted from an XML string into an object, and then processed.
I noticed that the XML was being received and converted into an object without issues. However, the object had a structure different from what the rest of the code expected, leading to an internal error in the library. From there, I investigated why the structure had changed.
As I understand it, the sofie-mos-connection library uses another library, xml-js, to convert XML into objects, and xml-js in turn relies on another library, sax. My suspicion at the time was that one of these two libraries had been updated over time, causing the sofie-mos-connection code to break—most likely xml-js.
If you check the version of these libraries in the yarn.lock file within the sofie-mos-connection GitHub project, you'll see that the versions used at the time of implementation were xml-js@npm:^1.6.11 and sax@npm:^1.2.4. Today, newer versions exist, and because of the caret (^) symbol before the version numbers, the exact versions specified won't necessarily be used. When you install the project dependencies, newer compatible versions may be fetched.
When I initially created my example code, I didn’t face this issue. However, after reproducing your setup and installing the dependencies from scratch, the problem occurred.
My proposed solution was to use Yarn to ensure it respects the yarn.lock file from sofie-mos-connection and downloads the same versions of the libraries that were used at the time of implementation, as this is precisely what the yarn.lock file is designed to address.
Expected Behavior
Sofe mos returns the correct message and convert accordingly the xml to ARION system
Version
4.1.0
Severity / Impact
Cant use some MOS events, such as: mosReqObjList, mosReqObj and others
The text was updated successfully, but these errors were encountered: