deconz-community / node-red-contrib-deconz

Node-Red Nodes for deCONZ connectivity.
GNU General Public License v3.0
81 stars 16 forks source link

deconz-editor.js 404 #163

Closed dibadodo closed 2 years ago

dibadodo commented 2 years ago

After update to new version the gui stuck during load. On dev-tools i see that the /addons/red/resources/node-red-contrib-deconz/dist/deconz-editor.js have status 404

On message log i see this errors: WebSocket disconnected: 1006 WebSocket error: Error: connect ECONNREFUSED

What can i do to get again a working gui ? I think the decent plugin blocks the gui.

I use node red as RedMatic workign on raspberrymatic

Zehir commented 2 years ago

After update to new version the gui stuck during load. On dev-tools is that the /addons/red/resources/node-red-contrib-deconz/dist/deconz-editor.js have status 404

On message log i see this errors: WebSocket disconnected: 1006 WebSocket error: Error: connect ECONNREFUSED

What can i do to get again a working gui ? I think the decent plugin blocks the gui.

Are you using a node red version older than 1.3 ?

dibadodo commented 2 years ago

I don't know that. Where can i check the version of node red? I using RedMatic 7.2.1

Zehir commented 2 years ago

I don't know that. Where can i check the version of node red? I using RedMatic 7.2.1

Its look like that he use node red 1.2.9 https://github.com/rdmtc/RedMatic/releases/tag/v7.2.1 You need do downgrade the deconz plugin or wait for à redmatic update to node red at least 1.3 but its better if it's 2.0 or later

dibadodo commented 2 years ago

npm version show me:

npm: '6.14.14', ares: '1.17.2', brotli: '1.0.9', http_parser: '2.9.4', llhttp: '2.1.3', modules: '72', napi: '8', nghttp2: '1.41.0', node: '12.22.5', openssl: '1.1.1l', uv: '1.40.0', v8: '7.8.279.23-node.56', zlib: '1.2.11'

How i can downgrade the deconz plugin without gui?

Zehir commented 2 years ago

nem version show me:

npm: '6.14.14', ares: '1.17.2', brotli: '1.0.9', http_parser: '2.9.4', llhttp: '2.1.3', modules: '72', napi: '8', nghttp2: '1.41.0', node: '12.22.5', openssl: '1.1.1l', uv: '1.40.0', v8: '7.8.279.23-node.56', zlib: '1.2.11'

How i can downgrade the decent plugin without gui?

With the command

npm i node-red-contrib-deconz@1.3.4

I will check tommorow if I can make the plugin compatible with older versions

dibadodo commented 2 years ago

Thank you a lot for your support.

I have tried your command and got this messages: npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. npm WARN saveError ENOENT: no such file or directory, open '/usr/local/addons/redmatic/package.json' npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open '/usr/local/addons/redmatic/package.json' npm WARN multiple-select@1.5.2 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself. npm WARN redmatic No description npm WARN redmatic No repository field. npm WARN redmatic No README data npm WARN redmatic No license field.

The error is still the same - Gui is stuck and dev-tools show me a status 404 for deconz-editor.js

Have you further hints?

Zehir commented 2 years ago

Did you restart node red ?

Zehir commented 2 years ago

Theses warnings are "ok" that why I made à 2.0 version

dibadodo commented 2 years ago

yes, RedMatic / node red was restarted - i give him a try to restart the entire system now

Zehir commented 2 years ago

What give you the command npm list

How you installed the update ? From the UI ?

Zehir commented 2 years ago

Ok, plan B

Try to locate this file;

Node-modules/node-red-contrib-deconz/deconz.html Then delete the second line, this line contain a link with a deconz-editor.js

Then restart node red.

From the manage palette install the old version from the tgz file : https://registry.npmjs.org/node-red-contrib-deconz/-/node-red-contrib-deconz-1.3.4.tgz

dibadodo commented 2 years ago

nem list show me: /root `-- (empty)

System is restarted - error is the same

I have found the decent-editor.js on this paths: /usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/resources/dist/deconz-editor.js /usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/resources/dist/deconz-editor.js.map

But I#m don't know is that correct or not... - It seems not.

I found the html file on two paths /usr/local/addons/redmatic/var/node_modules/node-red-contrib-deconz/deconz.html /usr/local/addons/redmatic/node_modules/node-red-contrib-deconz/deconz.html

Which one is the right?

Zehir commented 2 years ago

Probably the first, could you check the content ?

dibadodo commented 2 years ago

Strange - I have deleted the second line, with the script tag for this file but the error still appears - is a restart needed?

Zehir commented 2 years ago

Strange - I have deleted the second line, with the script tag for this file but the error still appears - is a restart needed?

With node red every changes in the install need à restart

dibadodo commented 2 years ago

ok, i don't expected that for the edit on a html file. It seems that this file will be cached during the start. right?

So,now I have back my gui :)

And i have reinstalled Version 1.3.4 with your TZG file. It seems running fine now. I got the info that Version 1.3.4 of decongestant plugin is installed.

Thanks a lot for your support middle of the night.

Would be very nice when you able to make the new plugin compatible with old node red plugin

Good night

Zehir commented 2 years ago

Yes I will work on it tomorrow, as far I know it's only that part but he chould have more issues. I will fix the js loading and put à warning msg that the user run an old version of node red

Zehir commented 2 years ago

Could you try with the version 2.0.8 ?

dibadodo commented 2 years ago

Hello,

I have updated the plugin today and it seems to work. I was able to restart and the gui comes up. For now i can't testing more but i think it will works to.

thank you a lot for your work