Bug #4103
closedSaxon-JS dynamic loading errors > it won't run on Tizen OS in a webapp browser (on Smartwatches and TVs)
100%
Description
Hi Guys,
Thanks for creating the Saxon-JS product which is a great product! Although I have had a lot of success running it in conventional browsers I wanted to report Saxon-JS failing to run in the Tizen OS (linux based) web browser that is used in many of the leading TVs and Smartwatches.
It seems it should run as Tizen uses a webkit based browser very similar to Chrome but it fails as the file loading is not working to pull in the additional files ( 'XPathJS.min.js', 'functions.json', and 'categories.json').
When I log-to-console the base url from a standalone APP on a smartwatch, TV or mobile I usually get something like ‘file:///’ rather than ‘/’ as the APPS run on the device (rather than client/server on a webserver or some kind of companion app). I think the 'browser magic at work here' in Saxon-JS fails in the assumptions it makes about how to find and load libraries in this context.
Other JavaScript libraries I use in this environment such as those that use require.js seem to load all their dependencies OK and I have had a several attempts at changing the SaxonJS code but haven't manage to fix the problem. I wonder if it would be possible to get a version of SaxonJS.js to test with the 'XPathJS.min.js', 'functions.json', and 'categories.json' external loads all in the same file. I think this could help isolate if the dynamic loading is the only major issue for these 'standalone apps'.
Typically I am seeing 'SXJS0006' errors in the browser console debugging for the watch/TV e.g.
SaxonJS.js:108 Uncaught XError {name: "XError", message: ": file:///js/watch.sef.xml", code: "SXJS0006", stack: "Error↵ at new XError (file:///js/SaxonJS.js:512…pRequest.xhr.onload (file:///js/SaxonJS.js:52:34)"} code: "SXJS0006" message: ": file:///js/watch.sef.xml" name: "XError" stack: "Error↵ at new XError (file:///js/SaxonJS.js:5127:19)↵ at XMLHttpRequest.xhr.onload (file:///js/SaxonJS.js:52:34)" proto:Error
In addition to changing the code I also tried loading the modules ( 'XPathJS.min.js', 'functions.json', and 'categories.json' ) into the browser with require.js in JavaScript before SaxonJS runs but the logic in SaxonJS continues to identify a loading error and bombs out.
I hope you can provide some help or pointers in how I can resolve this problem? We would like to use the Saxon-JS/SVG integration to help us create a range of analogue clock faces on smart watches tailored for those with dementia along the lines https://dementia.watch/ and resolving this issue would be a great help for us. I think the JS/SVG integration is really useful in these types of environments where screen sizes change and it would be great to have this work.
Kindest Regards Gary
Gary Cornelius Solution Architect
Rapport Network CIC Registered in Scotland: SC458540
Assisted living technology for frailty and dementia.
Related issues
Updated by Debbie Lockett over 4 years ago
- Has duplicate Feature #4492: Saxon-JS cannot find '/lib/xpath/XPathJS.min.js' dependency running on some web browsers added
Updated by Debbie Lockett over 4 years ago
The problem is indeed dynamic loading of Saxon-JS internal resources (lib/xpath/XPathJS.min.js, and the contents of the 'opt' directory).
For Saxon-JS 2.0, we have got rid of this dynamic loading; everything is in-built. So hopefully it should work on these other browsers (TV and smartwatches), not that we have tested those yet.
Updated by Debbie Lockett over 4 years ago
- Status changed from New to Resolved
- Fix Committed on JS Branch Trunk added
Marking this as resolved in Saxon-JS 2.0. Hopefully it will indeed work correctly in Tizen (Gary tested a prerelease version a while ago).
Updated by Debbie Lockett over 4 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
Please register to edit this issue
Also available in: Atom PDF Tracking page