TypeError Cannot read properties of null (reading 'activeTabStoreId')
When using the
PopoverNotificationCenter
v0.9.2, I'm getting a TypeError: Cannot read properties of null (reading 'activeTabStoreId')
error when loading. I am self hosting it locally on docker and have set up the props on the Provider. I'm about to test it against the hosted version46 Replies
How is you code with PopoverNotificationCenter looking?
Manually set the unseenCount when I was trying to determine the issue
note: I am using Remix, but I got it to work on my side project the other day
yeah Remix is not the problem here I think ๐
Happy to see more people that using Remix ๐
so yeah, even with the hosted version I'm still getting that activeTabeStoreId issue
What happens if you remove the tabs prop?
I love Remix
Me too ๐คฉ
ah maybe you need to do it like this:
found it in our docs here: https://docs.novu.co/notification-center/react-components/#defining-a-stores
React Component | Novu
Novu provides the @novu/notification-center a react library that helps to add a fully functioning notification center to your web application in minutes. Let's do a quick recap on how we can easily use it in your application:
looking now, one moment
@dr.really, you just advanced to level 5!
alright tried that on hosted, didn't work, let me try local
the most recent version of the notifications center is v0.9.2 right? don't want to over look something lol
yes it is latest ๐
hmm nope getting the same error
hm
and with out any tabs it is working?
let me verify with no tabs
So it is working as basic as possible
it's the same for me atleast <:thinking_pepe:587993126111543307>
hm then it is something else...
not working either way I go about it..
and you removed both tabs and stores?
let me try to turn it off and back on
and yessir removed both tabs and stores
๐
nope that wasn't it either
okay do you still get the same error?
okay lets go dramatic ๐ could you change to version 0.8.0?
haha yeah one moment!
and try against the hosted version
@novu/node
to 0.8.0 as well?should not be needed
installing
nice
done, running now against hosted
@davidsouthmountain in the store we set the context as
null
by default so until the feed context is set again this could happen. Maybe we should set the default to empty object or do shortcut fallbacks to {}
everywhere useFeedContext
is used.
https://github.com/novuhq/novu/blob/2d3050a13b5dfc77b0d66e34ed2eac8a25299631/packages/notification-center/src/store/feed.context.ts#L10GitHub
novu/feed.context.ts at 2d3050a13b5dfc77b0d66e34ed2eac8a25299631 ยท ...
The Open-Source Notifications Platform. Add a working notification center to your app in minutes. ๐ - novu/feed.context.ts at 2d3050a13b5dfc77b0d66e34ed2eac8a25299631 ยท novuhq/novu
yeah great find ๐
@dr.really mind to open an issue with this? It can be a quick fix or a good Community ticket.
Will do, let me finish this and I will open one up. Once my other PR is closed i'd be more than happy to toss one in. ( I messed my local next branch up building that outlook365 provider vs doing it on a seperate branch lol)
alright, going back to 0.8.0 the bell showed up, but upon clicking on it, it states its not wrapped in a provider, so i'm testing something with mantine really quick to test a theory
and you are sure it is wrapped with the Novu provider?
so initially i had it wrapped around Remix'
<Outlet />
but displaying the icon in the Header section of Mantine's AppShell
component
and that's what it was
alright, moving back to 0.9.2 and testing that again, sorry for wasting your time lolno problem great that we found the problem
aye, lessons learned lol about mantine espically lol
confirmed all is working now, that was my issue. @pablo.fernandez.otero do you still want that one changed from null to an empty array?
It doesn't hurt to change that though maybe it is good that error to be happen as it shows a wrong use on the provider. Please open it so we can discuss in the @Core team what is the best solution. ๐
#2094 has been opened, this thread can be closed if you guys want to ๐