ioBroker / ioBroker.javascript

Script engine for JavaScript and Blockly
MIT License
325 stars 120 forks source link

[Bug]: Script editor not show text script #1497

Open MaaG-dA opened 9 months ago

MaaG-dA commented 9 months ago

I'm sure that

Script type

Javascript

The problem

For some language version is turned on, the content of the scripts is not displayed (https://forum.iobroker.net/topic/72211/script-editor-not-working-again)

iobroker.current.log (in debug mode!)

de, en, es, fr, it, ru are ok: js_en for rest (like pl, nl, ua..) not: js_pl

Version of nodejs

18.17.1

Version of ioBroker js-controller

5.0.17

Version of adapter

7.8.0

klein0r commented 8 months ago

Please share alle contents of the browser console (developer tools).

MaaG-dA commented 8 months ago

Screenshot first: image

And log code:

=========================== loader.js:6
GET http://192.168.10.11:8081/adapter/javascript/vs/editor/editor.main.nls.pl.js net::ERR_ABORTED 404 (Not Found) e.load @ loader.js:6 e.load @ loader.js:6 c @ loader.js:8 s._loadModule @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 s._relativeRequire @ loader.js:8 r @ loader.js:8 b.load @ editor.main.js:6 s._loadPluginDependency @ loader.js:8 s.resolve @ loader.js:9 s.defineModule @ loader.js:8 g @ loader.js:9 (anonymous) @ editor.main.js:190 (anonymous) @ editor.main.js:746 loader.js:6 Loading "vs/editor/editor.main.nls.pl" failed @ loader.js:6 a.onError @ loader.js:6 s._onLoadError @ loader.js:8 c @ loader.js:8 (anonymous) @ loader.js:8 e.triggerErrorback @ loader.js:6 (anonymous) @ loader.js:6 c @ loader.js:6 error (async) e.attachListeners @ loader.js:6 e.load @ loader.js:6 e.load @ loader.js:6 c @ loader.js:8 s._loadModule @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 s._relativeRequire @ loader.js:8 r @ loader.js:8 b.load @ editor.main.js:6 s._loadPluginDependency @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 g @ loader.js:9 (anonymous) @ editor.main.js:190 (anonymous) @ editor.main.js:746 loader.js:6 Error: [object Event] at Object.E [as ensureError] (loader.js:6:4185) at s._createLoadError (loader.js:8:8107) at s.onLoadError (loader.js:8:8226) at c (loader.js:8:10065) at Object.errorback (loader.js:8:10421) at e.triggerErrorback (loader.js:6:11062) at loader.js:6:10768 at HTMLScriptElement.c (loader.js:6:11283) @ loader.js:6 a.onError @ loader.js:6 s._onLoadError @ loader.js:8 c @ loader.js:8 (anonymous) @ loader.js:8 e.triggerErrorback @ loader.js:6 (anonymous) @ loader.js:6 c @ loader.js:6 error (async) e.attachListeners @ loader.js:6 e.load @ loader.js:6 e.load @ loader.js:6 c @ loader.js:8 s._loadModule @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 s._relativeRequire @ loader.js:8 r @ loader.js:8 b.load @ editor.main.js:6 s._loadPluginDependency @ loader.js:8 s.resolve @ loader.js:9 s.defineModule @ loader.js:8 g @ loader.js:9 (anonymous) @ editor.main.js:190 (anonymous) @ editor.main.js:746 loader.js:6 Here are the modules that depend on it: @ loader.js:6 a.onError @ loader.js:6 s._onLoadError @ loader.js:8 c @ loader.js:8 (anonymous) @ loader.js:8 e.triggerErrorback @ loader.js:6 (anonymous) @ loader.js:6 c @ loader.js:6 error (async) e.attachListeners @ loader.js:6 e.load @ loader.js:6 e.load @ loader.js:6 c @ loader.js:8 s._loadModule @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 s._relativeRequire @ loader.js:8 r @ loader.js:8 b.load @ editor.main.js:6 s._loadPluginDependency @ loader.js:8 s.resolve @ loader.js:9 s.defineModule @ loader.js:8 g @ loader.js:9 (anonymous) @ editor.main.js:190 (anonymous) @ editor.main.js:746 loader.js:6 ['===anonymous2==='] @ loader.js:6 a.onError @ loader.js:6 s._onLoadError @ loader.js:8 c @ loader.js:8 (anonymous) @ loader.js:8 e.triggerErrorback @ loader.js:6 (anonymous) @ loader.js:6 c @ loader.js:6 error (async) e.attachListeners @ loader.js:6 e.load @ loader.js:6 e.load @ loader.js:6 c @ loader.js:8 s._loadModule @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 s._relativeRequire @ loader.js:8 r @ loader.js:8 b.load @ editor.main.js:6 s._loadPluginDependency @ loader.js:8 s._resolve @ loader.js:9 s.defineModule @ loader.js:8 g @ loader.js:9 (anonymous) @ editor.main.js:190 (anonymous) @ editor.main.js:746 bootstrap.jsx:26 iobroker.javascript@7.8.0 using theme "dark" App.jsx:119 ██╗ ██████╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗ ██║██╔═══██╗██╔══██╗██╔══██╗██╔═══██╗██║ ██╔╝██╔════╝██╔══██╗ ██║██║ ██║██████╔╝██████╔╝██║ ██║█████╔╝ █████╗ ██████╔╝ ██║██║ ██║██╔══██╗██╔══██╗██║ ██║██╔═██╗ ██╔══╝ ██╔══██╗ ██║╚██████╔╝██████╔╝██║ ██║╚██████╔╝██║ ██╗███████╗██║ ██║ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝

App.jsx:119 Nice to see you here! :) Join our dev community here https://github.com/ioBroker/ioBroker or here https://github.com/iobroker-community-adapters App.jsx:119 Help us to create open source project with reactJS! App.jsx:119 See you :) socket.io.js:66 [2024-02-19T20:56:09.102Z] Try to connect socket.io.js:303

   POST https://sentry.iobroker.net/api/56/envelope/?sentry_key=504499a725eb4898930d3b9e9da95740&sentry_version=7&sentry_client=sentry.javascript.browser%2F7.98.0 403 (Forbidden)

(anonymous) @ fetch.ts:45 (anonymous) @ base.ts:78 add @ promisebuffer.ts:49 a @ base.ts:94 _sendEnvelope @ baseclient.ts:814 sendSession @ baseclient.ts:404 captureSession @ baseclient.ts:240 R @ exports.ts:487 A @ exports.ts:505 (anonymous) @ sdk.ts:286 gr @ sdk.ts:149 (anonymous) @ GenericApp.js:268 Promise.then (async) onReady @ GenericApp.js:252 doLoadData @ Connection.ts:591 await in doLoadData (async) loadData @ Connection.ts:517 onPreConnect @ Connection.ts:466 (anonymous) @ Connection.ts:354 SocketClient.findAnswer @ socket.io.js:303 socket.onmessage @ socket.io.js:212 Show 17 more frames Show less BlocklyEditor.jsx:115 Detected custom blockly: email BlocklyEditor.jsx:115 Detected custom blockly: iqontrol BlocklyEditor.jsx:115 Detected custom blockly: gsmsms OpenAiDialog.jsx:155 Translate: AI code generator ScriptEditorVanilaMonaco.jsx:83 wait for monaco loaded... ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:45 wait for monaco loaded ScriptEditorVanilaMonaco.jsx:50 Cannot load monaco! (anonymous) @ console.ts:40 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:50 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 (anonymous) @ ScriptEditorVanilaMonaco.jsx:46 r @ helpers.ts:98 setTimeout (async) (anonymous) @ trycatch.ts:124 waitForMonaco @ ScriptEditorVanilaMonaco.jsx:46 componentDidMount @ ScriptEditorVanilaMonaco.jsx:84 wi @ react-dom.production.min.js:261 ki @ react-dom.production.min.js:260 bi @ react-dom.production.min.js:259 (anonymous) @ react-dom.production.min.js:283 Ss @ react-dom.production.min.js:281 as @ react-dom.production.min.js:270 S @ scheduler.production.min.js:13 T @ scheduler.production.min.js:14 Show 47 more frames Show less

MaaG-dA commented 8 months ago

File log again: 192.168.10.11-1708376230996.log

MaaG-dA commented 6 months ago

v8.0.3 and still not work in e.g. polish language. (new installation of debian and iobroker).

klein0r commented 6 months ago

I'm not able to reproduce the issue. Everything is also working in polish. Have to check again.

MaaG-dA commented 6 months ago

I checked it yesterday. It doesn't work on my machine (Cubietruck, Armbian). But on the second machine (RockPi) - it works. Strange that in both cases it is the same version of the system.

MaaG-dA commented 4 months ago

It's me again ;). Another SBC board - and exactly the same problem: OrangePi 5 Plus, Armbian (Debian 12), nodejs v.20.15.0, npm 10.7.0, admin 6.17.14, javascript 8.3.1 update: Strange. Now it's work. How? remove nodejs v20. reboot. install nodejs v18. reboot. remove nodejs v18. reboot. install nodejs v20. reboot. downgrade admin to v6.13 (from backup). reboot. And.. works. Update admin to 6.17.14. And .. still works.

MaaG-dA commented 1 month ago

OrangePi 5 Plus, Armbian (Debian 12), nodejs v.20.17.0, npm 10.8.2, admin 7.0.23, javascript 8.7.6 ... and not work .. again. Very strange.. and very frustrating for me.

I changed admin to an older version.. and it works again. OrangePi 5 Plus, Armbian (Debian 12), nodejs v.20.17.0, npm 10.8.2, admin 6.17.7, javascript 8.7.6

MaaG-dA commented 1 month ago

admin 7.0.12 not work.. I try with 7.0.1 - and not work. Back to admin 6.17.7 .. and work. It appears that some changes since 7.x.x admin adapter are causing this incorrect effect.

Apollon77 commented 1 month ago

@MaaG-dA Honestly ... forget the "host" ,... this should be a browser issue and hast most likely nothing to do with the host where iobroker runs on. Thats why also "server logs" should be irrelevant.

So maybe try to reset all browser caches and local storage and try anew -especially when switching between admin 6 and 7 ... and yes browser console is the main thing to look for errors.

MaaG-dA commented 1 month ago

I try with admin 7 again. Install, fush all browser caches (chrome).. and not work :(