Mastodon: Mastodon 2.7.2 frontend crashes on DM column load

Created on 17 Feb 2019  ·  9Comments  ·  Source: tootsuite/mastodon

Expected behaviour

  • Frontend is loading properly and does not crash

Actual behaviour

  • Frontend loads most of the content and then crashes

Steps to reproduce the problem

  • ... not fully clear ...
  • Update instance from 2.7.1 to 2.7.2
  • Reload the web-ui
  • UI loads Home, Notifications, Local and List column, DM column is empty
  • Interface crashes and a blank screen is left

Specifications

  • Tested in

    • Windows 10, Chrome Beta 73

    • Linux, Chrome Beta 73

    • Linux, Chrome Stable 72

    • Linux, Firefox 65

  • According to dev-tools (source map used) crash occurs in index.js#L137 when trying to call getWrappedInstance on null object.
    react-dom.production.min.js:179 TypeError: Cannot read property 'get' of undefined at t.render (display_name.js:31) at co (react-dom.production.min.js:163) at so (react-dom.production.min.js:162) at po (react-dom.production.min.js:169) at $o (react-dom.production.min.js:204) at Yo (react-dom.production.min.js:205) at Ni (react-dom.production.min.js:220) at Ii (react-dom.production.min.js:219) at xi (react-dom.production.min.js:216) at ti (react-dom.production.min.js:214) [...] react-dom.production.min.js:179 TypeError: Cannot read property 'getWrappedInstance' of null at application-f86408ab580b14c099f7.js:formatted:1001 at wo (react-dom.production.min.js:179) at Oo (react-dom.production.min.js:182) at So (react-dom.production.min.js:187) at Di (react-dom.production.min.js:226) at Ni (react-dom.production.min.js:220) at Ii (react-dom.production.min.js:219) at xi (react-dom.production.min.js:216) at ti (react-dom.production.min.js:214) at Object.enqueueSetState (react-dom.production.min.js:134) [...] alerts.js:46 TypeError: Cannot read property 'get' of undefined at t.render (display_name.js:31) at co (react-dom.production.min.js:163) at so (react-dom.production.min.js:162) at po (react-dom.production.min.js:169) at $o (react-dom.production.min.js:204) at Yo (react-dom.production.min.js:205) at Ni (react-dom.production.min.js:220) at Ii (react-dom.production.min.js:219) at xi (react-dom.production.min.js:216) at ti (react-dom.production.min.js:214)
  • Sadly I was not able to find out what exactly caused that issue due to the limitations of Chrome dev tools in combination with minified production code.
  • Assumption is there might be some older and likely broken DM conversation which causes trouble with the changes from 2.7.1 to 2.7.2.

Most helpful comment

Is there a planned bugfix release for that issue? We have multiple users affected by the problem, so it would be great if we could fix it without patching it manually.

All 9 comments

In the meantime I ~might have~ found the reason:

I do have one DM thread with an empty array for accounts:

{
  "id": "11307",
  "unread": false,
  "accounts": [],
  "last_status": {
    "id": "101063429786697282",
    "created_at": "2018-11-13T10:39:17.127Z",
// --- Shortened
    "mentions": [],
    "tags": [],
    "emojis": [],
    "card": null
  }
}

When using the first() element of an empty array this might cause trouble.

Edit: Confirmed the above. This was the reason: A single DM I sent to another user. After deleting that particular status the interface is loading again properly.

Same thing at mastodont.cat after updating to v2.7.2. When I reply to a direct message the interface goes blank
captura de pantalla 2019-02-18 a les 18 58 32
cc @Gargron

Downgraded to v2.7.1 for now.

It seems to me it can occur whenever none of the participants of a conversation exist anymore.

Is there a planned bugfix release for that issue? We have multiple users affected by the problem, so it would be great if we could fix it without patching it manually.

Agreed, if have some users that can't use the front-end at all, so it would be great if they didn't have too wait for too long 😥

Edit: If other admins don't want to run on master either, you can manually apply the patch with:

wget https://patch-diff.githubusercontent.com/raw/tootsuite/mastodon/pull/10078.patch
git apply 10078.patch

@nazco they already fixed it. You can apply the patch as mentioned by @angristan.
Already did myself and it works just fine.

@salvadorpla The fix is in master and not in a release so basically 0 instance currently have it

@angristan yes, I edited the affected files and then recompiled assets. Done.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lauramichet picture lauramichet  ·  3Comments

KellerFuchs picture KellerFuchs  ·  3Comments

hidrarga picture hidrarga  ·  3Comments

golbette picture golbette  ·  3Comments

hugogameiro picture hugogameiro  ·  3Comments