N
Novu•3mo ago
sandsower

Testing provider locally

Hi, I've written a new provider for novu (ntfy) but I'm struggling to test it within the web UI. I'm running the project using start:dev from the root of the repo. The issues I'm facing are: - There's a weird reload issue making the UI feel unresponsive - The provider shows up but the config options don't match - It doesn't let me select an environment - Saving doesn't work, I'm getting a network error when doing so I feel like I'm probably missing something in the project configuration, could you point me in the right direction on how to get it running locally properly?
19 Replies
Novu_Bot
Novu_Bot•3mo ago
@sandsower, you just advanced to level 1!
Ask Inkeep
Ask Inkeep•3mo ago
Hi @sandsower, I'm an AI assistant for Novu. While a team member reviews this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions. ----------------------------- While I generate an answer, here are some sources that might be helpful: * Add a new provider * RedwoodJS * Object Storage (S3, Blob, GCS) * Configuring Multiple Tabs ----------------------------- Answer To properly test your new provider (ntfy) within the Novu web UI and address the issues you're facing, ensure you follow these steps closely: 1. Add the Provider Dependency: Ensure you've added your new provider dependency correctly in the packages/application-generic/package.json file within your local Novu project. Add it manually to the dependencies list as follows: "@novu/<NEW_PROVIDER_NAME>": "^<VERSION>". The provider name and version should match those from your provider's package.json file you created earlier (1) . 2. Setup Project: After adding the provider dependency, run pnpm run setup:project from the root of the Novu project. This step is crucial for creating the required symlinks for your newly created package. 3. Provider Handler: Confirm you've added a provider handler correctly. For email, handlers can be found at apps/packages/application-generic/src/factories/mail/handlers. Your handler file (e.g., example-provider.handler.ts) should correctly instantiate and configure your provider based on the credentials and other necessary configuration passed to it. 4. Handler to Factory: Ensure you've added the handler to the factory correctly. For example, if it's an email provider, you should initialize the handler in the mail factory located in packages/application-generic/src/factories/mail/mail.factory.ts. 5. Final Steps: After you've ensured all the setup steps are correctly followed, rebuild the project using pnpm run setup:project. To test the provider, run pnpm run test:providers and look for any errors. If everything works fine without any errors, you should be able to commit your changes and create a pull request to the main repo. If you've followed all these steps and still encounter issues like UI unrespons
Ask Inkeep
Ask Inkeep•3mo ago
iveness, configuration mismatches, environment selection problems, and network errors on saving, it could be related to the web UI setup or possibly missing steps in integrating the provider correctly. Double-check your environment setup, including any .env configurations and ensure your local development environment is correctly set up to interface with the Novu backend and frontend parts. For the reload issue making the UI feel unresponsive, it could be a development server or webpack configuration issue. Ensure your local development server is correctly set up and look into any console errors that might give more insight. For issues related to environment selection and saving configurations, ensure that all expected environment variables and configurations are correctly set in your development environment and that they match the expected format and values as per Novu's documentation. If these steps don't resolve your issue, considering your setup is specific and might involve more detailed review, this could be an issue worth raising directly in the Novu GitHub repository or checking if similar issues have been reported that might provide a solution.
Ask Inkeep
Ask Inkeep•3mo ago
Got it. Tagging @Support for additional help.
Tomer Barnea
Tomer Barnea•3mo ago
Hey @sandsower thanks!!! Let me add @Pawan Jain, @Moderator, and @Engineering to help here.
Pawan Jain
Pawan Jain•3mo ago
@sandsower In which channel, you are looking to add this new provider? Did you follow all steps of this documentation https://docs.novu.co/community/add-a-new-provider
sandsower
sandsower•3mo ago
No worries, I managed to solve my local setup issues (I wasn't using jarvis, running it through there solved my issues) and pushed a PR with the changes 🙂 Out of curiosity how long do reviews for new providers usually take? I see that it hasn't been looked at yet
sumitsaurabh927
sumitsaurabh927•3mo ago
There’s no fixed time as such. The reason it’s been taking longer than usual is that there’s a weekend and the engineering team was away for a team offsite from which have returned. So, it will be reviewed in a short while.
sandsower
sandsower•2mo ago
Hi, I pushed the code for this provider 3 weeks ago and it still hasn't been reviewed
Tomer Barnea
Tomer Barnea•2mo ago
@Pawan Jain , can you help here? Cc @sokratis @Dima Grossman @Paweł T.
sumitsaurabh927
sumitsaurabh927•2mo ago
Hey @sandsower so sorry for the delayed. A big part of our team is celebrating holidays. However I’m pushing them to have a look at this on a priority basis. And thank you a ton for taking out time to contribute. Keep ‘em coming! 🙂
Pawan Jain
Pawan Jain•2mo ago
@sandsower could you please share the PR?
sumitsaurabh927
sumitsaurabh927•2mo ago
GitHub
Ntfy provider by sandsower · Pull Request #5341 · novuhq/novu
What change does this PR introduce? Adds ntfy support as a push provider Why was this change needed? Closes #4185 Other information (Screenshots) Continues work started by @ayushdiitr way back in O...
sandsower
sandsower•2mo ago
Thank you for the prompt answer! I saw there were some merge conflicts, I've resolved them now I've updated the PR based on the comments and fixed the lockfiles, ready for another review pass 🙂
Novu_Bot
Novu_Bot•2mo ago
@sandsower, you just advanced to level 2!
sandsower
sandsower•2mo ago
Can I get another review for this one? I've fixed some conflicts
Tomer Barnea
Tomer Barnea•2mo ago
@Pawan Jain
Pawan Jain
Pawan Jain•2mo ago
@sandsower Our team is aware of this. ntfy provider that you have added is not in sync with how other push providers work. We are evaluating if we can go ahead with this or not
sandsower
sandsower•2mo ago
If there's something I'd need to change let me know