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

🐛 Bug Report: Self-hosted NC - Notifications are not shown immediately #5353

Open
2 tasks done
Baljeet-Caur opened this issue Apr 2, 2024 · 4 comments
Open
2 tasks done
Labels

Comments

@Baljeet-Caur
Copy link

📜 Description

Currently i am implementing novu for notification in my project , i have used react component and to trigger notification i used curl (as my project is in core php ) also i have self hosted it
So i am facing several issue please help me to resolve these issue

  1. Without reloading the page notification does not appears on bell icon (websocket throws issue like invalid namespace )
  2. On local environment my notification triggers perfectly but when i pushed it on live some notifications does not triggers (it seems worflow id is not being able to fetch but i have passed correct workflow id ).
  3. In novu dashboard when i open consol i find alot of issues like workflow issue with CORS

👟 Reproduction steps

While triggering the notification without reloading the page it does notifies the arrival of notification

👍 Expected behavior

I want bell icon automatically notifies the arrival of notification after trigger without any delay

Notifications triggers correctly

👎 Actual Behavior with Screenshots

While triggering the notification without reloading the page it does notifies the arrival of notification

Novu version

I dont remembered

npm version

No response

node version

No response

📃 Provide any additional context for the Bug.

No response

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Copy link

linear bot commented Apr 2, 2024

NV-3630 🐛 Bug Report:

@github-actions github-actions bot added the triage label Apr 2, 2024
@scopsy
Copy link
Contributor

scopsy commented Apr 22, 2024

@Baljeet-Caur are you self-hosting Novu, or you have encountered this on the cloud version?

@mustansirgodhrawala
Copy link

Having this issue too, mine is self hosted. Let me know what information you need. I suspect it's some kind of a configuration problem. Nonetheless, any help is appreciated.

@rifont rifont changed the title 🐛 Bug Report: 🐛 Bug Report: Self-hosted NC - Notifications are not shown immediately Nov 13, 2024
@aiditz
Copy link

aiditz commented Nov 23, 2024

I faced a similar issues too. I'm using nginx and I hosted Novu on https://novu.mydomain.com. Here is how I solved them.

  1. WS_CONTEXT_PATH just doesn't work. Client library always connects to /socket.io. So I leave this var empty and I handle path /socket.io in nginx and it's working.

  2. API_CONTEXT_PATH looks working, but it's not. I use this var, the websocket data delivery stops working. The ws connection establishing successfully, but there is not real-time data transfer and the bell does not change its state without reloading the page. I solved this problem by not using this variable. Here is my working setup:

.env:

HOST_NAME=https://novu.mydomain.com
API_PORT=3000
WS_PORT=3002
API_ROOT_URL=$HOST_NAME/api
API_CONTEXT_PATH=
WS_CONTEXT_PATH=

nginx:

location /api {
    rewrite /api/(.*) /$1  break;
    ...
    proxy_pass http://<host>:3000
}
location /socket.io {
  proxy_http_version 1.1;
  ...
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  proxy_pass http://<host>:3002;
}

Client config:

{
 "backendUrl": "https://novu.mydomain.com/api",
 "socketUrl": "https://novu.mydomain.com"
}

I spend several days to get this.

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

4 participants