N
Novu9mo ago
tomgreeen

Subscriber missing recipient details - even though the subscriber has the email address

Hi I'm trying to send a notification via email to a group of subscribers, but I get the error "Subscriber missing recipient details" - even though I can clearly see that the subscriber has an email address in the db. I think this may be a caching issue at Novu: I had been migrating users from dev to prod, then sending them a message. but unfortunately for a bunch of the users, I tried to send the message before they had been migrated. So at that point the above error made sense. However, I've since correctly copied the users to the Production environment, but I get the same error as though they're not there. Is this something anyone's had before/someone can look into ?
4 Replies
Ask Inkeep
Ask Inkeep9mo ago
Hi @tomgreeen, 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: * How to use Novu to send notifications to a channel in a Discord server * Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed. * Centralized multiple legacy implementations of different teams * Delete message ----------------------------- Answer It appears you're encountering issues related to subscriber data synchronization after migration, leading to "Subscriber missing recipient details" errors when attempting to send notifications. While the provided documentation doesn't directly address caching or synchronization issues following migration, it's crucial to ensure that after migrating users, their details are correctly identified and updated in Novu. This process involves using the identify method to either find an existing subscriber or create a new one with the supplied information. Additionally, ensure the subscriber's credentials, specifically for the channel you're intending to send notifications through (e.g., email), are set correctly. Here's an example of how you can ensure a subscriber is identified and their email credentials are set correctly, which might help resolve the issue if it's related to incomplete or unsynchronized subscriber details:
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');

await novu.subscribers.identify('subscriberId', {
firstName: 'John',
lastName: 'Doe',
});
import { Novu } from '@novu/node';
const novu = new Novu('<NOVU_API_KEY>');

await novu.subscribers.identify('subscriberId', {
firstName: 'John',
lastName: 'Doe',
});
This example demonstrates initializing a Novu instance, identifying (or creating) a subscriber, and ensuring their email is correctly set up. If the error persists, it might be due to other factors not covered in the documentation provided. In such cases, ensuring all subscriber details are correctly migrated and synchronized in your production environment is essential. If the issue remains unresolved, it might require further investigation into specific details of your implementation and migration process. Please review all subscriber details for accuracy and completeness, especially if the migration might have missed syncing some information correctly. If the problem persists, considering the documentation does not directly address such migration or caching issues, further specific support from Novu might be necessary to diagnose the issue accurately. Note: The code snippet provided is for illustrative purposes, and you should adjust it according to your actual subscriber identifiers and credentials.
tomgreeen
tomgreeenOP9mo ago
In the end I deleted the users and retransferred them indiidually, and this seemed towork. If the engineering team is interested in pursuing, I think it might be somethign to do with bulkCreate vs identify (which worked)
Pawan Jain
Pawan Jain9mo ago
@tomgreeen Earlier you were migrating from dev to prod using bulk create subscribers method?
tomgreeen
tomgreeenOP9mo ago
Yep that's correct I also noticed a possibly related issue following using bulk create, in that my Production branch was showing the Development subscribers. In the end I fixed it by logging out and in again but only after I overwrote some production data as a result (luckily nothing critical).
Want results from more Discord servers?
Add your server