fellinga / node-red-contrib-ui-time-scheduler

Easily power on/off any kind of device based on a schedule that you can easily create at the node-red-dashboard frontend.
MIT License
37 stars 17 forks source link

Bug on NR 3.1.0 running on Windows 11 ? #97

Closed pizzabakker closed 10 months ago

pizzabakker commented 11 months ago

Hi,

Node looks good, but has an error on NodeRed 3.1.0 running on my Windows 11 PC. When ui-time-scheduler is used in a flow only ui-time-scheduler is shown in browser, all other disappear from the menu. Happens in Edge and FireFox browser.

After deleting/disable Flow tab with ui-time-scheduler on it , nothing shows at all anymore. Nodered has to be restarted to show other UI elements and menu items again.

Even in the provided sample , only ui-time-scheduler node is shown and switch node is gone ?? Also happens in Edge and FireFox browser.

Note: After disabling Tab wit your node on it and enabling it again only the switch shows. image

After refresh F5 in browser menu items and switch is gone and it shows only your node ?? image

Any ideas ?

fellinga commented 11 months ago

My test system is currently on node-red 3.1.3 and i do not experience any problems. Are you using the latest version of node-red-ui-time-scheduler and node-red-dashboard? Please check within the node-red menu / manage palette, it should look like this:

image

pizzabakker commented 10 months ago

Finally, found it : its a Windows thing :-( and my mistake.

Problem with the Schedule Node occurs when NodeRed(Windows) is started with the wrong path. Real existing path = C:\Users\U1.node-red

Starting Node-Red with the good parameter -u C:\Users\U1.node-red --> Scheduler works in UI. All other Tabs are shown. Starting Node-Red with the wrong parameter -u C:\Users\u1.node-red --> Scheduler is only Tab shown in UI.

Do not know if this is a NodeRed or a Schedule Node issue. Thing is that other Nodes can live with my 'typo' and are working fine as far as i can see ;-)

I hope you can enlighten me ?

fellinga commented 10 months ago

I am not sure why the case would make a difference and since I am not using node-red on Windows I am not able to reproduce. Can you see any errors in the dev tools?

pizzabakker commented 10 months ago

No big deal, It was my mistake, typing an "N" --> C:\Users\u1.Node-red instead of an "n" -->C:\Users\u1.node-red

Problem is caused by a relative path construction like ./ or ../ in a Node relying on the Node-Red internal path. When NodeRed (Windows) is started with a parameter containing a non existing path --> -u C:\Users\u1.Node-red , NodeRed internal path defaults to the ..node-red\node_modules.bin path instead of the C:\Users\u1.node-red path. Therefore some things are presumably not read from the correct folder and some nodes behave different as expected.

Note: Windows itself is NOT case sensitive, Linux is. NodeRed on Windows seems to be Case Sensitive at least at startup.

For me the issue is 'fixed'

fellinga commented 10 months ago

Thanks for the detailed feedback - it might help someone else in the future! Going to close this issue now.