raphaelquintao / QRedshiftCinnamon

Linux Cinnamon applet to change screen color temperature
https://cinnamon-spices.linuxmint.com/applets/view/313
Apache License 2.0
100 stars 13 forks source link

warnings in logs #29

Closed dilinger closed 3 years ago

dilinger commented 3 years ago

Cinnamon is giving a bunch of warnings about QRedshift in the logs. In the applet window, it also has a warning saying that "this applet contains function calls that could potentially cause Cinnamon to crash or freeze." I'm assuming that's related to the warnings in the logs. This is with Cinnamon 4.8.6-1:

Cjs-Message: 20:29:35.121: JS LOG: [LookingGlass/warning] QRedshift Disabling Service:

(cinnamon:1073): Cjs-WARNING **: 20:29:35.129: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array). (Note that array.toString() may have been called implicitly.)

ByteArray.toString(array) is not backward compatible with previous (< 4.8) versions of Cinnamon. You will have add versioning support to your applet if it does not already have it, so that compatibility can be maintained for users on older Cinnamon versions.

See: https://projects.linuxmint.com/reference/git/cinnamon-tutorials/xlet-versioning.html 0 disableRedshiftService() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":298:32] 1 verifyVersion() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":275:21] 2 QRedshift() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":134:18] 3 main() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":802:11] 4 createApplet() ["/usr/share/cinnamon/js/ui/appletManager.js":582:24] 5 addAppletToPanels() ["/usr/share/cinnamon/js/ui/appletManager.js":357:33] 6 finishExtensionLoad() ["/usr/share/cinnamon/js/ui/appletManager.js":95:13] 7 _init/<() ["/usr/share/cinnamon/js/ui/extension.js":274:31]

(cinnamon:1073): Cjs-WARNING **: 20:29:35.028: Some code called array.toString() on a Uint8Array instance. Previously this would have interpreted the bytes of the array as a string, but that is nonstandard. In the future this will return the bytes as comma-separated digits. For the time being, the old behavior has been preserved, but please fix your code anyway to explicitly call ByteArray.toString(array). (Note that array.toString() may have been called implicitly.)

ByteArray.toString(array) is not backward compatible with previous (< 4.8) versions of Cinnamon. You will have add versioning support to your applet if it does not already have it, so that compatibility can be maintained for users on older Cinnamon versions.

See: https://projects.linuxmint.com/reference/git/cinnamon-tutorials/xlet-versioning.html

0 verifyVersion() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":271:30] 1 QRedshift() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":134:18] 2 main() ["/usr/share/cinnamon/js/misc/fileUtils.js line 211 > Function":802:11] 3 createApplet() ["/usr/share/cinnamon/js/ui/appletManager.js":582:24] 4 addAppletToPanels() ["/usr/share/cinnamon/js/ui/appletManager.js":357:33] 5 finishExtensionLoad() ["/usr/share/cinnamon/js/ui/appletManager.js":95:13] 6 _init/<() ["/usr/share/cinnamon/js/ui/extension.js":274:31]

dilinger commented 3 years ago

If you're not seeing these, let me know and I'll whip up a patch and do a PR. Otherwise, I'm guessing fixes should be pretty easy.

raphaelquintao commented 3 years ago

I don't see these Cjs-WARNING...

raphaelquintao commented 3 years ago

These warning are not in my code, all that files are from the cinnamon API. Maybe you updating it from some beta/alpha repository.