TypeError: Cannot read property 'id' of undefined

Hi. :earth_americas:

I can not use the buttons from the right: button

I turned off plugins in safe mode and everything is ok – I’ve installed only the official :discourse: plugins. Here is the error from console:

ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1 TypeError: Cannot read property 'id' of undefined
    at r (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:2)
    at s.valueForContentItem (application-80ee9fc6123d4a680c007646f102ba0abe0db9bfb9b32b60a347064dcf1d536e.js:1)
    at s.computeContentItem (application-80ee9fc6123d4a680c007646f102ba0abe0db9bfb9b32b60a347064dcf1d536e.js:1)
    at application-80ee9fc6123d4a680c007646f102ba0abe0db9bfb9b32b60a347064dcf1d536e.js:1
    at Array.map (<anonymous>)
    at s._beforeDidComputeContent (application-80ee9fc6123d4a680c007646f102ba0abe0db9bfb9b32b60a347064dcf1d536e.js:1)
    at application-80ee9fc6123d4a680c007646f102ba0abe0db9bfb9b32b60a347064dcf1d536e.js:1
    at invokeWithOnError (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
    at a.flush (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
    at u.flush (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
u @ ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1
3/message-bus/38fdf6ca16a24f668f085d106d1c7db2/poll?dlp=t:1 Failed to load resource: net::ERR_NETWORK_IO_SUSPENDED

Any ideas?

Have you tried updating to latest?

1 Like

Yes, I have this version installed: v2.2.0.beta4 +358

What official plugins are you running, can you help isolate the culprit by disabling one at a time?

Does this happen on all topics or just on one topic?

All:

If I disable this plugins, the error disappears and everything is fine after that. Yes, it happened in every subject.

Another error:

ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1 TypeError: Cannot read property 'id' of undefined
    at r (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:2)
    at s.valueForContentItem (application-d33b547293f4ad52584c3cc83b16713e30035872ddf4649bbca0092153963044.js:6)
    at s.computeContentItem (application-d33b547293f4ad52584c3cc83b16713e30035872ddf4649bbca0092153963044.js:4)
    at application-d33b547293f4ad52584c3cc83b16713e30035872ddf4649bbca0092153963044.js:4
    at Array.map (<anonymous>)
    at s._beforeDidComputeContent (application-d33b547293f4ad52584c3cc83b16713e30035872ddf4649bbca0092153963044.js:4)
    at application-d33b547293f4ad52584c3cc83b16713e30035872ddf4649bbca0092153963044.js:5
    at invokeWithOnError (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
    at a.flush (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
    at u.flush (ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1)
u @ ember_jquery-07f49b58317ea9292d939348ec0091eb50a9d8aaabd9e86cc074ef5f049918aa.js:1
5[Violation] 'setTimeout' handler took <N>ms
[Violation] Forced reflow while executing JavaScript took 75ms
[Violation] Forced reflow while executing JavaScript took 32ms

How can I check which plugin is causing this error?

I know this involves a fair amount of work but do a binary search. Comment out half the plugins, then half of half and so on till you find the culprit.

4 Likes

It kinda has to be bbcode, doesn’t it? We run the rest of those plugins on our own internal sites…

We have seen the exact same thing after upgrading a test enviroment to latest (3e116bb14ed788c48bff8bf800bd4f506b8fc908) yesterday.

I have removed all plugins except for the built-in, stripped all customizations, enabled safe-mode and this error message is still persisting.

It is only happening on a single site of a multisite Discourse though (!). There are no customizations (anymore). I spent an hour stripping everything bare.

We were unable to reproduce this on another testsite, but we haven’t been able to solve this specific occurence either.

Firefox yields a slightly different error by the way, obj is undefined while Chrome says TypeError: Cannot read property 'id' of undefined

I’ll try to upgrade it to latest-latest again today.

3 Likes

Updated to latest and cleaned/precompiled all assets - still an issue.
Removed all posts and categories (it’s a test environment anyway) - still an issue.
Removed all site settings - still an issue
Restored a backup from long ago - issue is gone!
Restored backup from just before I restored the backup - issue is back

So this must be somewhere in the content but where…?

The issue only shows on pages that have a topic list, and only when I (or another user) is logged in.

When I look at the stack trace (valueForContentItem and computeContentItem) it seems like it’s related to the category chooser.

Does anyone have any idea where to look?

EDIT unchecking tagging enabled removes the error. But still…? The forum is not even using any tags.
EDIT #2 enabling tagging on another forum on the same multisite introduces the error there as well.

4 Likes

Are you on latest? I remember a fix for this going out a few days ago.

1 Like

Yes, upgraded to latest yesterday (twice) and today (twice).

Do you have any pointers about that fix? I can’t find anything that seems related.

This one is a different issue but I think this one is the same issue that was incorrectly attributed to the whos-online plugin.

2 Likes

More or less, cc @sam @joffreyjaffeux @zogstrip

3 Likes

Note, this is extremely high priority for us but we need a repro or even a url of a site with the issue to debug

4 Likes

I’ve sent you a PM with the details.

As I mentioned in the thread that @RGJ linked, at my discourse the issue does appers. You can see it here:


If you need more informations, logs or something, let me know.

I did not found a feature that does not work yet, but the error still persist.

I think this commit will fix your issues:

https://github.com/discourse/discourse/commit/4c7dfed32ea39cde85d575ae4b60fe2a70899c76

However @ZackFea I notice you do you have tags created on your site, so I’m unsure this will fix it, I have yet to recreate an issue with existing tags.

EDIT: I’m pretty sure this will fix it.

8 Likes

I can confirm that that commit solves the issue. Thank you for your quick fix!

5 Likes