frappe / bench

CLI to manage Multi-tenant deployments for Frappe apps
https://frappeframework.com/docs/user/en/bench
GNU General Public License v3.0
1.37k stars 1.2k forks source link

http:// ........ /socket.io/?EIO=4&transport=polling&t= 502 (Bad Gateway) #1532

Open carlosmonari opened 1 year ago

carlosmonari commented 1 year ago

Description of the issue

after setup environment to production recommended in https://frappeframework.com/docs/v14/user/en/production-setup i receive this messages in browser

"A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData. Note that for performance reasons, only the first access to one of the properties is shown."

in many many times (in intervals of 5 seconds one to another)

http:// ........ /socket.io/?EIO=4&transport=polling&t=OFE2uut 502 (Bad Gateway)

1 font frappe-web.bundle.GNIYZ3EG.js:1

Context information (for bug reports)

production setup to frappe with nginx, socket.io and etc ....

Output of bench version

bench --version
5.14.3

Steps to reproduce the issue

  1. The script in https://github.com/frappe/bench#manual-installation
  2. Put the production mode orientede in https://frappeframework.com/docs/v14/user/en/bench/guides/setup-production

Observed result

image

Audit usage of navigator.userAgent, navigator.appVersion, and navigator.platform A page or script is accessing at least one of navigator.userAgent, navigator.appVersion, and navigator.platform. Starting in Chrome 101, the amount of information available in the User Agent string will be reduced. To fix this issue, replace the usage of navigator.userAgent, navigator.appVersion, and navigator.platform with feature detection, progressive enhancement, or migrate to navigator.userAgentData. Note that for performance reasons, only the first access to one of the properties is shown.

Expected result

Stacktrace / full error message

Failed to load resource: the server responded with a status of 502 (Bad Gateway)
The resource http://xxxxxxxxxxx/website_script.js was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate `as` value and it is preloaded intentionally.

Additional information

OS version Ubuntu22.04 Frappe install manual method, etc.

OneiricIT commented 1 year ago

@carlosmonari check out this, might be applicable. https://github.com/frappe/frappe/issues/17574

carlosmonari commented 1 year ago

hi Mr OneiricIT

No, In this case ...

When we restarted the machine after configure setup to production, the enginx enter in action.

the nginx response socket.io and receive this error.

the stream of events stay compromised in transport of data.

maybe something configurations between socket.io and nginx .... it's possible.

in both cases, the configurations provide by sudo bench setup production user needs a correction

DrZoidberg09 commented 1 year ago

I have the same issue with the recent version-14