N
Novu17mo ago
dmgarland

Online filter keeps a step stuck in 'Step queued'

Hey Novu! We're running self-hosted in AWS, been in production for a week things seem to be going great! We had initially setup our workflows to be Digest -> In-app -> E-mail -> Push With filters on E-mail/push to only send if the user wasn't on-line, the logic being that if they were on-line they'd get the in-app notification and we wouldn't worry about the other types. However we noticed that the e-mail/push steps would fail the workflow with the message 'step queued'. The worker is running and seems to be processing; so we're not sure if this is expected behaviour. In the meantime we've disabled the fitlers but would like to know whether we're doing anything wrong here. Thanks in advance!
44 Replies
Pawan Jain
Pawan Jain17mo ago
Hi @dmgarland Glad you are using Novu in production 🚀 What version of Novu you are using? I am guessing you must have been using online filter in in-app step in above workflow? are you using online filter in other steps as well?
dmgarland
dmgarlandOP17mo ago
Hey @Pawan Jain thanks for the response We're on 0.16. I think we had no filter on the in-app, but then a filter on the e-mail to be not on-line, e.g. we'd expect either an in-app or e-mail but not both
Novu_Bot
Novu_Bot17mo ago
@dmgarland, you just advanced to level 1!
Pawan Jain
Pawan Jain17mo ago
@dmgarland Can you please try this filter in the in-app 👇🏻
No description
Pawan Jain
Pawan Jain17mo ago
and this filter in email and push 👇🏻
Pawan Jain
Pawan Jain17mo ago
No description
dmgarland
dmgarlandOP17mo ago
Ok! We didn't have any filter on the first one so we'll try that
SuPP
SuPP17mo ago
The same problem and as an alternative we use a slightly different rule
No description
dmgarland
dmgarlandOP17mo ago
So we just tried this and having online = yes filter on in-app stops in-app notifications from being sent. Removing the filter allows the notificatoins to send How does Novu detect if someone is online? I thought having the websocket connection would be enough
Pawan Jain
Pawan Jain17mo ago
It is handled using websocket only. If notification center is loaded into your webapp, a websocket connection is made and user is marked as online Once websocket connection breaks, user is marked offline
SuPP
SuPP17mo ago
with headlless it also work? novu/headless
Novu_Bot
Novu_Bot17mo ago
@suppmkl, you just advanced to level 1!
dmgarland
dmgarlandOP17mo ago
@suppmkl we are also using headless
Pawan Jain
Pawan Jain16mo ago
Yes with headless it will work Its just that in case of self host, you need to update socketUrl
const headlessService = new HeadlessService({
applicationIdentifier: "APP_ID",
subscriberId: "SUBSCRIBER_ID",
backendUrl: "YOUR_BACKEND_URL"
socketUrl: "YOUR_SOCKET_URL"
});
const headlessService = new HeadlessService({
applicationIdentifier: "APP_ID",
subscriberId: "SUBSCRIBER_ID",
backendUrl: "YOUR_BACKEND_URL"
socketUrl: "YOUR_SOCKET_URL"
});
SuPP
SuPP16mo ago
it's strange, the online rule doesn't work at all (
Pawan Jain
Pawan Jain16mo ago
Can you please check in network tab if websocket connection is working? Are you also self hosting Novu?
SuPP
SuPP16mo ago
yes, it works, because we receive new notifications via the websocket yes
dmgarland
dmgarlandOP16mo ago
yes same here, we receive notifications and can see the socket connection just the filter doesn't work
Tom Eggebraaten
Tom Eggebraaten15mo ago
We are encountering the same problem. Workflows work fine, but as soon as I add a step filter for Online = Yes or Online in last X min, then the workflow fails. The activity feed doesn't indicate why it failed. We're using Novu cloud. Any updates on this issue? Are others able to use Online = Yes filter? If so, any extra config needed for it to work?
Gali Baum
Gali Baum15mo ago
I believe I might know why. When querying for the subscriber for the online filter we are looking for internal subscriber id to equal the external subscriberId https://github.com/novuhq/novu/blob/next/apps/worker/src/app/workflow/usecases/message-matcher/message-matcher.usecase.ts#L324 @Pawan Jain I would suggest opening a ticket about it, what I mentioned is definitely a mistake . But we'll need to check that it actually fixes this issue 🙂
Pawan Jain
Pawan Jain15mo ago
@Tom Eggebraaten Could you please share more details? How many steps you have in workflow? At which step are you applying this filter?
Tom Eggebraaten
Tom Eggebraaten15mo ago
Hi @Pawan Jain , I am able to recreate this issue with a simple 1-step workflow that has just an In-App step after the trigger. The In-App step has nothing fancy, just a single Online Right Now = Yes filter, a simple message and Use Feeds checked. After triggering the workflow, the Activity Feed shows the new event as Failed, and the step timeline shows Step Created, Step Queued, but no error message. Is there anywhere else where a log or error message may be? Is there anything I can do to test if this is the problem, Gali? Is the internal subscriber id visible anywhere that I can use such that it matches the external id?
Gali Baum
Gali Baum15mo ago
Unfortunately no 😔 You can not choose the internal id or edit your subscriberId. Let's open a ticket about this so you can track the progress on it
Tom Eggebraaten
Tom Eggebraaten15mo ago
Just want to clarify. Are you asking me to create the ticket? If so, would I do that by creating an issue in your github repo, or somewhere else?
Gali Baum
Gali Baum15mo ago
@Pawan Jain would you mind creating the ticket please?❤️
Pawan Jain
Pawan Jain15mo ago
Yeah sure Thanks for sharing the workflow details @Tom Eggebraaten
bigheartedkb
bigheartedkb15mo ago
I'm running into the same problem, I tried looking for a ticket on Github but couldn't find it. Could I get a link to the ticket so I could see the progress?
Pawan Jain
Pawan Jain15mo ago
Hi @Kenny [bigheartedkb] I could not create a ticket, as I could not reproduce it after trying multiple times. It would be helpful If you could share screenrecording or loom video highlighting the steps of reproduction and error in activity feed
bigheartedkb
bigheartedkb15mo ago
Okay, I’ll try to get a recording
Tom Eggebraaten
Tom Eggebraaten15mo ago
@Pawan Jain This is still an issue for me. Can I add you to our project so you can look at the workflow & activity log? If so, please send your email. @Pawan Jain any updates on this? Is there a ticket yet? I have a simple workflow that continues to fail on the Online status filter step. Can someone check out my project to see what's wrong?
Novu_Bot
Novu_Bot15mo ago
@Tom Eggebraaten, you just advanced to level 1!
Pawan Jain
Pawan Jain15mo ago
Hi @Tom Eggebraaten Could you please invite me in your org? email :- [email protected]
Tom Eggebraaten
Tom Eggebraaten15mo ago
Yes, just did.
Pawan Jain
Pawan Jain15mo ago
I see you are using email as subscriberId I am able to reproduce with email as subscriberId
Tom Eggebraaten
Tom Eggebraaten15mo ago
Is the @ symbol the problem. If I just used the username instead of full email, do you think it would work?
Pawan Jain
Pawan Jain15mo ago
Yes please try with subsciriberId without email pattern
Tom Eggebraaten
Tom Eggebraaten15mo ago
That wasn't it, @Pawan Jain . Changed the subscriberId to something other than email and same failure.
Pawan Jain
Pawan Jain15mo ago
Okay, let me debug it @Tom Eggebraaten I found the root cause 🙂 Creating a PR. We are planning a patch release tomorrow. That PR will be included in that release
Tom Eggebraaten
Tom Eggebraaten15mo ago
Fantastic! Thanks @Pawan Jain !
Pawan Jain
Pawan Jain15mo ago
@Gali Baum You were right here. This was the root cause ✅
Tom Eggebraaten
Tom Eggebraaten15mo ago
@Pawan Jain , just wanted to check the status of the online status filter issue. I see that patch 0.20.1 got created; did the issue get fixed in that patch, and was that patch applied to the SaaS (web.novu.co)? I ask because I'm still seeing the issue today.
Pawan Jain
Pawan Jain15mo ago
@Tom Eggebraaten Yes it is included in patch. We have not deployed patch yet
Gali Baum
Gali Baum14mo ago
@Tom Eggebraaten it was deployed in v.0.21.0
Pawan Jain
Pawan Jain14mo ago
Thanks for the update Gali @Kenny [bigheartedkb] @dmgarland @SuPP @Tom Eggebraaten Sorry for your inconvenience This bug is fixed in version 0.21.0
Want results from more Discord servers?
Add your server