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
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?
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
@dmgarland, you just advanced to level 1!
@dmgarland
Can you please try this filter in the in-app 👇🏻
and this filter in email and push 👇🏻
Ok! We didn't have any filter on the first one so we'll try that
The same problem and as an alternative we use a slightly different rule
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
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
with headlless it also work?
novu/headless
@suppmkl, you just advanced to level 1!
@suppmkl we are also using headless
Yes with headless it will work
Its just that in case of self host, you need to update socketUrl
it's strange, the online rule doesn't work at all (
Can you please check in network tab if websocket connection is working?
Are you also self hosting Novu?
yes, it works, because we receive new notifications via the websocket
yes
yes same here, we receive notifications and can see the socket connection just the filter doesn't work
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?
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 🙂
@Tom Eggebraaten
Could you please share more details?
How many steps you have in workflow?
At which step are you applying this filter?
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?
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
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?
@Pawan Jain would you mind creating the ticket please?❤️
Yeah sure
Thanks for sharing the workflow details @Tom Eggebraaten
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?
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
Okay, I’ll try to get a recording
@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?
@Tom Eggebraaten, you just advanced to level 1!
Hi @Tom Eggebraaten
Could you please invite me in your org?
email :-
[email protected]
Yes, just did.
I see you are using email as subscriberId
I am able to reproduce with email as subscriberId
Is the @ symbol the problem. If I just used the username instead of full email, do you think it would work?
Yes please try with subsciriberId without email pattern
That wasn't it, @Pawan Jain . Changed the subscriberId to something other than email and same failure.
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
Fantastic! Thanks @Pawan Jain !
@Gali Baum You were right here.
This was the root cause ✅
@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.
@Tom Eggebraaten
Yes it is included in patch. We have not deployed patch yet
@Tom Eggebraaten it was deployed in v.0.21.0
Thanks for the update Gali
@Kenny [bigheartedkb] @dmgarland @SuPP @Tom Eggebraaten
Sorry for your inconvenience
This bug is fixed in version 0.21.0