#Studio does not connect to bridge app

1 messages · Page 1 of 1 (latest)

oblique widget
#

Hey folks!
I am self-hosting with Docker and using a Remix frontend and I am running the following command:
npx novu@latest dev --tunnel http://leftoverstoday-dev-01:4000 --port 4000 -d http://leftoverstoday-dev-01:4200 --origin http://leftoverstoday-dev-01:4000

And I am successfully able to hit the bridge endpoint at http://leftoverstoday-dev-01:4000/novu/api and I get this response:

{
  "status": "ok",
  "sdkVersion": "2.3.0",
  "frameworkVersion": "2024-06-26",
  "discovered": {
    "workflows": 1,
    "steps": 1
  }
}```

But the studio is stuck on connecting to Bridge Application. What am I missing here?
oblique widget
#

With the above settings I am able to trigger a notification from code, but the studio still does not connect

lusty tundra
#

@oblique widget

Do you see any error in developer console ?

oblique widget
#

Yeah, its a Stripe error

#

I have Sentry DSN configured but not new relic

#

And I get the following error if I open the playground:

lusty tundra
#

this is a bug from our side. playground should not be accessible in self hosting

lusty tundra
oblique widget
#

So with self-hosting, do we just create a workflow in code and then use the github action to publish it to our Novu backend?

#

Im still not exactly sure how the workflow I create will become available in Novu

steady plinthBOT
#

@oblique widget, you just advanced to level 3!

lusty tundra
#
npx novu@latest sync --bridge-url <YOUR_DEPLOYED_URL> --secret-key <NOVU_SECRET_KEY> --api-url <YOUR_API_URL>
#

Local Studio is only for local testing

oblique widget
#

I see, I was also able to hit the sync button and it removed all the demo workflows and only pulled in one email workflow, it did not pull my custom in-app workflow and didnt show me an error either

#

I created this simple workflow:

export const testWorkflow2 = workflow('test-workflow2', async ({ step, payload }) => {
  await step.inApp('inbox', async () => {
    return {
      subject: 'Welcome to Acme!',
      body: 'We are excited to have you on board.',
      avatar: 'https://acme.com/errors/dead_end_500.jpg',
      redirect: {
        url: 'https://acme.com/welcome',
        target: '_blank',
      },
      primaryAction: {
        label: 'Get Started',
        redirect: {
          url: 'https://acme.com/get-started',
          target: '_self',
        }
      },
      secondaryAction: {
        label: 'Learn More',
          redirect: {
          url: 'https://acme.com/learn-more',
          target: '_self',
        }
      },
      data: {
        customData: 'customValue',
        text: payload.text,
      },
    };
  });
});
#

And I also get these in the logs:

[0] 
[0] Discovered workflowId: 'test-workflow'
[0] └ σ Discovered stepId: 'send-email' Type: 'email'
[0] 
[0] Discovered workflowId: 'test-workflow2'
[0] └ σ Discovered stepId: 'notify-user'        Type: 'in_app'```

But only test-workflow is syncing, not my test-workflow2
lusty tundra
#

@oblique widget

is this issue still happening?

oblique widget
#

Yeah unfortunately

#

It only syncs one test-workflow for email, and I am able to trigger that one correctly. I dont know why as soon as that workflow syncs, it stops showing all the demo workflows even though they are still in the DB, I can see them.

#

It only syncs 1 workflow and then fails to sync a second one, even if I just make a copy of the first workflow and change the name it does not sync it