Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node-Red Editor Sometimes Hangs on Load over Webrelay #6456

Open
SecareLupus opened this issue Oct 16, 2024 · 5 comments
Open

Node-Red Editor Sometimes Hangs on Load over Webrelay #6456

SecareLupus opened this issue Oct 16, 2024 · 5 comments
Labels

Comments

@SecareLupus
Copy link

Describe the bug
When loading NodeRed Code Editor via Webrelay, the page will often stall midway through its loading screen. This issue seems to only happen via WebRelay and not other access methods (remote-it relay, access within LAN).

To Reproduce
Steps to reproduce the behavior:

  1. Install Nodered on Raspberry Pi
  2. Populate with complex project. (maybe not related)
  3. Install MeshCentral on Raspberry Pi
  4. Set HTTP alternate port to Nodered
  5. Open Webrelay
  6. Observe Nodered top bar & background load. Loading bar loads and begins to fill before stopping part of the way.
  7. Refreshing the page an indeterminate number of times occasionally will finish loading the page.

Expected behavior
Loading bar should fill up quickly and shift the body of the page to include the Flow editor and current project.

Screenshots
image

Server Software (please complete the following information):

  • OS: Ubuntu LXC on Proxmox
  • Virtualization: Docker
  • Network: WAN mode, Behind NGINX Proxy Manager, which manages SSL
  • Version: 1.1.32
  • Node: 20.10.0

Client Device (please complete the following information):

  • Device: Desktop Workstation
  • OS: Windows 11
  • Network: Local to Meshcentral
  • Browser: Chrome
  • MeshCentralRouter Version: N/A

Remote Device (please complete the following information):

  • Device: Raspberry Pi
  • OS: Raspberry Pi OS bookworm, 64-Bit
  • Network: Happens both locally and across WAN.
  • Current Core Version (if known): Nov 21 2022, 2018810399

Additional context
We've tried to reproduce the issue via a Remote.it relay, as well as local access, and the issue seems to only happen when accessed via MeshCentral webrelay. It is not consistent, no logs appear in the browser console, but several media objects seem to stall with "pending" status. Nodered's logs do fire a "Connection Refused" error on hang, but without specification as to why. It's possible that this issue is with NodeRed, but since the presentation seems exclusive to Meshcentral, I wanted to see if it was possibly something about the how the relay communicates with the remote webserver. It feels like a similar experience to #4369.

This has occurred across several remote devices and several client devices. On client devices, we've replicated the issue using Chrome on Windows, and Chrome & Safari on Mac. For remote devices, this has happened on multiple Raspberry Pi devices, as well as an Intel NUC running Ubuntu 23.04. All types of remote devices we currently field have exhibited some sort of inconsistent hang-on-load issue in this manner.

Your config.json file

{
  "$schema": "http://info.meshcentral.com/downloads/meshcentral-config-schema.json",
  "settings": {
    "cert": "mesh.$DOMAIN.com",
    "_WANonly": true,
    "_LANonly": true,
    "sessionKey": "$PASSWORD",
    "port": 443,
    "_aliasPort": 443,
    "redirPort": 80,
    "_redirAliasPort": 80,
    "RelayDNS": "relay.mesh.$DOMAIN.com",
    "AgentPong": 300,
    "TLSOffload": false,
    "trustedProxy": "$PROXY_IP,$ROUTER_IP",
    "SelfUpdate": false,
    "allowLoginToken": true,
    "allowFraming": true,
    "mongodb": "mongodb://mongodb:27017/mesh",
    "mongodbcol": "mesh",
    "WebRTC": true,
    "desktopMultiplex": true,
    "cookieIpCheck": "none",
    "sessionSameSite": "lax",
    "plugins": { "enabled": true }
  },
  "domains": {
    "": {
      "title": "$COMPANY",
      "title2": "Internal Mesh",
      "_minify": true,
      "NewAccounts": "false",
      "_userNameIsEmail": true,
      "certUrl": "https://$PROXY_IP:443",
      "passwordRequirements": {
        "force2factor": true,
	"autofido2fa": true
      }
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before>",
    "_email": "myemail@mydomain.com",
    "_names": "myserver.mydomain.com",
        "production": false
  }
}
@si458
Copy link
Collaborator

si458 commented Nov 10, 2024

ive just setup a ubuntu 22.04 vm (with desktop)
installed meshagent,
setup node-red using snap, (3.1.0 its showing)
then accessed via the port 1880 using the web relay
no issues loading up
i dont no how to use it like but i could drag and drop stuff and click deploy without any issues too

edit: your screenshot shows its stuck on 'Loading plugins'
what plugins do you have enabled for node-red? as chances are one of those doesnt work correctly with the web relay

@SecareLupus
Copy link
Author

SecareLupus commented Nov 13, 2024 via email

@SecareLupus
Copy link
Author

Oh, as to the plugins, that's where it froze this time, but it's been known to hang at several stages, sometimes halfway through loading nodes. It's entirely possible that a particular plugin+node combo is at fault, I'm just not sure how to track it down, or why it's not an always issue. There don't appear to be errors logged anywhere I've been able to find. Just an open connection to the web server, presumably awaiting content hydration, but not timing out or completing.

For completeness, here's the list of nodered plugins our project currently uses:

node-red
node-red-*, where * ==
	*-contrib-cache
	*-contrib-config
	*-contrib-filebrowser
	*-contrib-fs
	*-contrib-fs-ops
	*-contrib-http-auth0
	*-contrib-httpauth
	*-contrib-loop-processing
	*-contrib-md5
	*-contrib-os
	*-contrib-particle
	*-contrib-play-audio
	*-contrib-render
	*-contrib-s3
	*-contrib-smb
	*-contrib-tcp-client
	*-contrib-uuid
	*-dashboard
	*-node-base64
	*-node-daemon
	*-node-ledborg
	*-node-mysql
	*-node-pi-gpio
	*-node-ping
	*-node-pusher
	*-node-random
	*-node-rbe
	*-node-serialport
	*-node-smooth
	*-node-tail
	*-node-ui-table

@si458
Copy link
Collaborator

si458 commented Nov 14, 2024

so. i installed all those plugins apart from contrib-filebrowser as it keps failing to install for some reason?
image
still cant get it to NOT load haha
but this is a 4 core, 8GB VM, not a raspberry pi,
so i might need to do more testing over weekend and get my Pi collection out the cupboard haha

@si458
Copy link
Collaborator

si458 commented Nov 14, 2024

so ive just tested with a raspberry pi 3 i had spare doing nothing
and nope, still loads up fine, installed all plugins too (expect the filebrowser again),
so i have a feeling it might be the complex project.
have you tried wiping node-red and starting a fresh and seeing it it loads up a blank project without issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants