N
Novuโ€ข2y ago
dr.really

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 version
46 Replies
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
How is you code with PopoverNotificationCenter looking?
dr.really
dr.reallyOPโ€ข2y ago
Manually set the unseenCount when I was trying to determine the issue
dr.really
dr.reallyOPโ€ข2y ago
note: I am using Remix, but I got it to work on my side project the other day
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
yeah Remix is not the problem here I think ๐Ÿ™‚ Happy to see more people that using Remix ๐Ÿ™‚
dr.really
dr.reallyOPโ€ข2y ago
so yeah, even with the hosted version I'm still getting that activeTabeStoreId issue
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
What happens if you remove the tabs prop?
dr.really
dr.reallyOPโ€ข2y ago
I love Remix
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
Me too ๐Ÿคฉ
dr.really
dr.reallyOPโ€ข2y ago
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
ah maybe you need to do it like this:
<NovuProvider
stores={[
{ storeId: 'activity', query: { feedIdentifier: 'activity' } },
]}
....
<NovuProvider
stores={[
{ storeId: 'activity', query: { feedIdentifier: 'activity' } },
]}
....
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
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:
dr.really
dr.reallyOPโ€ข2y ago
looking now, one moment
Novu_Bot
Novu_Botโ€ข2y ago
@dr.really, you just advanced to level 5!
dr.really
dr.reallyOPโ€ข2y ago
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
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
yes it is latest ๐Ÿ™‚
dr.really
dr.reallyOPโ€ข2y ago
hmm nope getting the same error
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
hm and with out any tabs it is working?
dr.really
dr.reallyOPโ€ข2y ago
let me verify with no tabs
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
So it is working as basic as possible
dr.really
dr.reallyOPโ€ข2y ago
it's the same for me atleast <:thinking_pepe:587993126111543307>
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
hm then it is something else...
dr.really
dr.reallyOPโ€ข2y ago
not working either way I go about it..
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
and you removed both tabs and stores?
dr.really
dr.reallyOPโ€ข2y ago
let me try to turn it off and back on and yessir removed both tabs and stores
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
๐Ÿ‘
dr.really
dr.reallyOPโ€ข2y ago
nope that wasn't it either
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
okay do you still get the same error?
dr.really
dr.reallyOPโ€ข2y ago
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
okay lets go dramatic ๐Ÿ˜› could you change to version 0.8.0?
dr.really
dr.reallyOPโ€ข2y ago
haha yeah one moment!
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
and try against the hosted version
dr.really
dr.reallyOPโ€ข2y ago
@novu/node to 0.8.0 as well?
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
should not be needed
dr.really
dr.reallyOPโ€ข2y ago
loading installing
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
nice
dr.really
dr.reallyOPโ€ข2y ago
done, running now against hosted
--
--โ€ข2y ago
@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#L10
GitHub
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
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
yeah great find ๐Ÿ™‚
--
--โ€ข2y ago
@dr.really mind to open an issue with this? It can be a quick fix or a good Community ticket.
dr.really
dr.reallyOPโ€ข2y ago
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
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
and you are sure it is wrapped with the Novu provider?
dr.really
dr.reallyOPโ€ข2y ago
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 lol
DavidSouthmountain
DavidSouthmountainโ€ข2y ago
no problem great that we found the problem
dr.really
dr.reallyOPโ€ข2y ago
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?
--
--โ€ข2y ago
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. ๐Ÿ‘
dr.really
dr.reallyOPโ€ข2y ago
#2094 has been opened, this thread can be closed if you guys want to ๐Ÿ™‚
Want results from more Discord servers?
Add your server