Just migrated from v0 to v2, getting a 400 error on deployment
Hello we’ve just migrated from v0 to v2. We manually rebuilt out notifications to be code-first and are now trying to push them to dev then production.
When trying to do it from my Local Studio, I get this error:
Error occurred while syncing. Signature does not match the expected signature. Please ensure the signature provided in the
novu-signature header is correct and try again.
And doing it from our Github actions leads to a 400 with no context.
Our Bridge is here: https://app.guided/energy/api/novu
And our Nova account is “Guided Energy” (user: [email protected])
I also want to share that code-first notifications are reusing non-code-first notifications IDs, as we wish to replace them, not add to them.
Is there any documentation on v0 to v2 migration, and on how to debug that kind of issue ?28 Replies
We are also in Europe, but npx novu@latest dev -d https://eu.dashboard.novu.co leads to an eternally loading page (not redirecting to localhost:2022), so my local dashboard is ran from the US command (npx novu@latest dev)
Novu Cloud Dashboard
Novu Cloud Dashboard
I also don't seem to understand if there is anything more to deploy to development than using the development API key ?
@Norrude
You will need to add
NOVU_API_URL=https://eu.api.novu.co
environment variable as well
same with syncing with CLI, use --api-url flag
Ok, doing it !
dashboard-v2.novu.co redirects me to dashboard.novu.co, is this a problem ?
Currently only workflows page can be accessed in dashboard-v2.novu.co
Are you facing this issue with workflows page?
Did you opt out?
I get a 401 with eu.api.novu.co
I might have opted out prior to migrating, I am not sure
data: {
statusCode: 401,
timestamp: '2024-12-11T16:03:55.437Z',
path: '/v1/bridge/sync?source=cli',
message: 'API Key not found',
error: 'Unauthorized'
}
Although I have the correct dev API key:
authorization: [ 'Authorization', 'ApiKey {hidden}' ],
@Norrude
Are you using secret key from europe region?
Oh we don't even have an eu account
Ok so do you advise us re-creating an account in EU, and starting from scratch here ?
Done this: here is the new errorId: 9e59a24392894478a41794677a458ebd
@Norrude, you just advanced to level 3!
Ok so do you advise us re-creating an account in EU, and starting from scratch here ?Yes, I would advise this if you want to use EU data centers for data.
Ok just did that
9e59a24392894478a41794677a458ebdIs this error id for unauthorized error?
I now have message: 'Signature does not match the expected signature. Please ensure the signature provided in the
novu-signature
header is correct and try again.',
It is for a 500, but I now have a different 400Let me check
The eu app is fully configured, still stuck on the novu-signature error
NODE_ENV="development"
as is my api_key, I believe
Oh sorry
NODE_ENV in prod you mean
production
ok I see
so I can't refer a production url with a dev environment ?
Let me check this. Give me some time
I've realised that NOVU_SECRET_KEY was not set on my production env, adding it
Allelujah it works !
Thanks Pawan for the help !
Doc is still very far from being complete, but v2 looks extremely promising, eager to work with it 🙂
Would you like to share what was missing?
From the top of my head
- eu is mentioned only once if I'm not mistaken, on the Local Studio dev command
- Explicitly mention that NODE_ENV and SECRET_KEYs must match on both sides (I expected to be able to deploy on novu's dev with our production environment)
- had to add to my next config for the self hosting
- But by far the most painfull is that there is no v0 to v2 migration doc. we had around 20 notifs, if we had 100 we wouldn't have been able to do the switch.
+ My US account is still stuck in v0 interface, with no way to switch to v2 (I believe ?).
I'll now see if we stick to the US or get on the EU account
But it's the cost of building a great product quickly.
Keep up the good work (if it doesn't add breaking changes haha) 😄 !
Thanks for all the feedback
You had UI-based workflows earlier and migrated to
@novu/framework
powered code first workflows.
Would you like to share the use case?What do you mean by the use case ?
Why we did it ?
Why we did it ?Yes
Multiple reasons:
1- We usually avoid using v0 on open source, but Novu fit our expectations.
2- We have a client expecting to be notified on SQS, custom step allows us to use Novu for it
3- React email compatibility
4- Our Notification creation Flow is now much better thanks to v2 (prior was: 3 steps, it's now 2)
I'm guessing you have all this well in mind, otherwise you wouldn't have built a whole product around it haha
Thanks.
@novu/framework
provides more customization and control for sure.
I have shared all the feedbacks with team and we will fix/add the docs for EU and migrationAwesome, have a great day 🙂
Hello @Pawan Jain !
Getting some real painful 500's on remote syncs:
Here is one of the error id: 85856bd955d4413bba7335e3b09a06c6
for reference: this issue is fixed in another support post