User notifications "all" is empty, but responses, likes, etc have items

I got a report that a user’s notifications would load when clicking on the avatar. (It’s a recent upgrade running 2.4.0.beta10). There is a single non-standard plugin, but it doesn’t seem likely to be the cause and the issue is affecting only one user (at least that we know of). (And then I did an upgrade without my plugin and that didn’t fix it.) safe-mode didn’t help.

When going to /u/username/notifications for one particular user no notifications are shown, but clicking on “responses”, “likes” and so on shows items in each of those types of notifications. I went into psql and did a reindex table notifications without error.

Clicking the avatar gets this error in the javascript console:

_application-4715c32620ba9b83af00144510f68ca0f0bae8f745edf2339e3f249ceee88c3f.js:77240 Uncaught TypeError: Cannot read property 'dasherize' of undefined

Looking at the code,

      return [this.attach(notificationName.dasherize() + "-notification-item", attrs, {}, { fallbackWidgetName: "default-notification-item" }), (0, _virtualDom.h)("span.time", (0, _node.dateNode)(attrs.created_at))];

it appears to me (and this could be wildly off base) that the issue is that it’s getting an error or nil/null/empty when getting the notifications?

I can get the user notifications in rails without incident:

 pry(main)> Notification.where(user_id: 870).count
=> 372
# this also returns stuff:
u=User.find(870)
Notification.recent_report(u)

I’m out of ideas.

1 Like

@pfaffman Have you figured out this issue? I’m also having this same issue.

Sorry. I don’t remember either fixing it or that it’s still broken, and I don’t recall where it was. :man_shrugging:

Ok. So far I have tried everything, removed all unofficial plugins, removed Cloudflare, rebuilt several times by now… cleared browser storage… but for some users, the issue still persists and on the same device it doesn’t occur for other users. And the error message I’m seeing is exactly the same as yours. Then I tried my mobile phone and it works. I guess that’s why you don’t remember fixing it. I’m not sure if it’s caused by some plugin or if it’s only a local device issue. I hope that it’s happening on my desktop only :slight_smile:

Does it happen with all browser extensions removed (incognito mode)?

1 Like

yes, It happens in incognito as well but not as often, maybe my hard disk is responsible for it and amount storage use and the quota is different probably. here’s a screenshot in incognito mode. I shouldn’t worry about this issue if it’s happening only on my machine :thinking:

@pfaffman Readding discourse-follow plugin solved the issue for me :slight_smile:

3 Likes