Tobias
Tobias
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80; location /api { rewrite /api/(.*) /$1 break; proxy_pass http://novu_api:3000/; proxy_redirect off; proxy_set_header Host $host; } location /widget_embed { rewrite /widget_embed/(.*) /$1 break; proxy_pass http://novu_widget:4701/; proxy_redirect off; proxy_set_header Host $host; } location /socket.io { rewrite /socket.io/(.*) /socket.io/$1 break; proxy_pass http://novu_ws:3002/; # usual proxy header proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-NginX-Proxy true; # websocket proxy_http_version 1.1; # http://nginx.org/en/docs/http/websocket.html proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; } location / { proxy_pass http://novu_web:4200/; proxy_redirect off; proxy_set_header Host $host; } }
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
@Pawan Jain @Emil After going through what looks like every discord chat in this server with the letters "ws" in it, i found the solution....not using any context paths whatsoever in the .env file, and then also proxying the /socket.io/ request url.....took me way to much time... i found quite some issues all over discord and on the web with people sturggeling with the same error, so idk maybe you wanna add this to the documenation or so, or make a default nginx example config available.... Thanks to the discord (special thanks to you @ad_schwartz it was your config that fixed it), everything now works! 🙂 this is a basic working nginx config which should do the trick:
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
@Pawan Jain That is the result io get when i call /ws/v1/health-check
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
No description
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
@Emil 0.22.0
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
@Emil This is the new support ticket 🙂
15 replies
NNovu
Created by empe on 12/28/2022 in #💬│support
Troubleshooting In-App Notification Issues with Websockets
Thanks, yeah i did, i will tag you there if that's ok 🙂
24 replies
NNovu
Created by empe on 12/28/2022 in #💬│support
Troubleshooting In-App Notification Issues with Websockets
@Emil did you solve your original issue with the websocket error? Facing the same and was not able to find a solution yet?
24 replies
NNovu
Created by juancruz_13095_25171 on 9/20/2023 in #💬│support
WebSocket - InApp
@Juan Cruz i am facing the same probelm, did you find a solution?
4 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
And here is my nginx proxy config: location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-NginX-Proxy true; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_pass http://localhost:4200/; proxy_ssl_session_reuse off; proxy_set_header Host $http_host; proxy_pass_header Server; proxy_cache_bypass $http_upgrade; proxy_redirect off; proxy_read_timeout 300s; proxy_connect_timeout 75s; } location /ws/ { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-NginX-Proxy true; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_pass http://localhost:3002/ws/; proxy_ssl_session_reuse off; proxy_set_header Host $http_host; proxy_pass_header Server; proxy_cache_bypass $http_upgrade; proxy_redirect off; proxy_read_timeout 3000s; proxy_connect_timeout 750s; }
15 replies
NNovu
Created by Tobias on 12/18/2023 in #💬│support
Novu Websocket fails (Websocket error)
What i also don't understand, even tho i configured the socket url for the react component, it does not seem to prefix this request: wss://notifications.example.com/socket.io/?EIO=4&transport=websocket' With the socket url path (/ws/) but i think that is intentional here? Even if i hardcode prefix the path and test, the error presists
15 replies