novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.01k stars 3.47k forks source link

πŸ› Bug Report: Getting Network Error During Signup when deployed via helm chart. #4610

Open palashbasik opened 10 months ago

palashbasik commented 10 months ago

πŸ“œ Description

I deployed novu via helm chart. I am getting network error during signup.

image image

πŸ‘Ÿ Reproduction steps

I deployed the novu helm chart in K3S (Lightweight Kubernetes) v1.25.4+k3s1

1) git clone https://github.com/novuhq/novu.git 2) cd ./novu/docker/kubernetes/helm 3) Created overrides for values.yaml values-test.yaml, image 4) In novu/docker/kubernetes/helm/templates/web/deployment.yaml Replace .Values.web.env.NODE_ENV with .Values.api.env.NODE_ENV in below env

env:
  - name: REACT_APP_ENVIRONMENT
    value : {{ print .Values.web.env.NODE_ENV | quote }}

5) My chart.yaml

name: novu
description: A Helm Chart for novu
version: 0.1.6
apiVersion: v2
appVersion: 0.15.0
keywords:
  - novu
  - notification framework
sources:
  - https://github.com/novuhq/novu/tree/next/docker/kubernetes/helm
home: https://novu.co/
dependencies:
  - condition: redis.enabled
    name: redis
    repository: oci://registry-1.docker.io/bitnamicharts
    version: 18.1.6
  - condition: mongodb.enabled
    name: mongodb
    repository: oci://registry-1.docker.io/bitnamicharts
    version: 14.0.12
  - name: common
    repository: oci://registry-1.docker.io/bitnamicharts
    tags:
      - bitnami-common
    version: 2.13.3
  - condition: localstack.enabled
    name: localstack
    repository: https://localstack.github.io/helm-charts
    version: 0.6.5

Now, cd ./novu/docker/kubernetes/helm

helm dependency update
helm dependency build

6) I am using traefik for ingress. So, I added router and service for novu-web, novu-api, novu-ws. Example:

novu-api:
  entryPoints:
    - websecure
  rule: "Host(`novu-api.xxxxxxxxxxxx`) && PathPrefix(`/`)"
  middlewares:
    - strip-service-prefix
    - corsHeader          
  tls:
    certResolver: leresolver
  service: novu-api 

novu-api:
  loadBalancer:
    servers:
        - url: http://novu-api.xxxxxxxxxxxx:3000

Similarly, for novu-web, novu-ws.

6) After configuring traefik,

cd ./novu/docker/kubernetes/
helm upgrade --install novu helm  --values=./helm/values-test.yaml -n novu --create-namespace 

image

7) In browser, hit novu-web url and try to sign up. It gives Network Error.

@aquamanranda @smartclash

πŸ‘ Expected behavior

It should let me signup.

πŸ‘Ž Actual Behavior with Screenshots

Network Error

Novu version

0.15.0

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?

🏒 Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

p-fernandez commented 10 months ago

@palashbasik for this version we already had some users with problems while deploying the self hosted version. I'd recommend you to check this issue (https://github.com/novuhq/novu/issues/3602) where the same problems are discussed and some solution has been suggested. Thank you.

smartclash commented 10 months ago

Hi @p-fernandez , I did try to read through the issue but I am unable to find any solutions suggested in that due to much noise. Can you point us to the comments that you are referring to?

And all of my coworkers are facing the issue even if they try to host it using docker compose. So, i think it would be better if the problem is addressed somewhere like in an FAQ or fixed altogether.

I am even happy to contribute a fix once I am shown a direction to the root cause :)

p-fernandez commented 10 months ago

@smartclash mind you try what this user suggested: https://github.com/novuhq/novu/issues/3602#issuecomment-1727074422 and feedback us?