copperhead
Occasional Visitor
Was having issues with Skynet v7.6.3 not displaying any stats. The instructions elsewhere didn't help.
The problem began after tapping the Skynet > Update Stats button. Behind the scenes, this action creates / updates the file: /tmp/mnt/<USB>/skynet/webui/stats.js. The file is loaded within the Skynet tab from web location: /ext/skynet/stats.js.
stats.js contained the following line:
The above is a Javascript method, unshift(''), using single quotes. Notice my device name has the label Roe's PC, also containing a single quote. This, obviously, is a JavaScript error. FTR, the browser console log also showed this line to be an error stopping JS execution. Within the Asus Web UI, I hopped over to Network Map > View List to modify the device name from Roe's PC to Roe PC. Next, I went back to Skynet to "Update Stats".
stats.js now shows:
The offending single quote is now removed. After this change, the Skynet stats page is working perfectly (see attached). Feel free to recreate the effect by modifying your Device Name to contain a single quote then head back to Skynet > "Update Stats". No consequences, afaik.
SUMMARY
The problem began after tapping the Skynet > Update Stats button. Behind the scenes, this action creates / updates the file: /tmp/mnt/<USB>/skynet/webui/stats.js. The file is loaded within the Skynet tab from web location: /ext/skynet/stats.js.
stats.js contained the following line:
LabelTCConnHits.unshift('192.168.20.30', '192.168.20.101 (Roe's PC)');
The above is a Javascript method, unshift(''), using single quotes. Notice my device name has the label Roe's PC, also containing a single quote. This, obviously, is a JavaScript error. FTR, the browser console log also showed this line to be an error stopping JS execution. Within the Asus Web UI, I hopped over to Network Map > View List to modify the device name from Roe's PC to Roe PC. Next, I went back to Skynet to "Update Stats".
stats.js now shows:
LabelTCConnHits.unshift('192.168.20.30', '192.168.20.101 (Roe PC)');
The offending single quote is now removed. After this change, the Skynet stats page is working perfectly (see attached). Feel free to recreate the effect by modifying your Device Name to contain a single quote then head back to Skynet > "Update Stats". No consequences, afaik.
SUMMARY
- Avoid using Single Quotes or Double Quotes within your Device Names.
- To @Adamm : Skynet code needs to escape User Data before inserting it into JS or HTML to avoid browser syntax errors.
Attachments
Last edited: