h3poteto / fedistar

Multi-column Fediverse client for desktop
https://fedistar.net
GNU General Public License v3.0
133 stars 6 forks source link

Application error on loading Notifications #793

Closed RiSK1979 closed 1 year ago

RiSK1979 commented 1 year ago

For a few days every time I start Fedistar, I see the columns loading, but then suddenly the screen gets blank and I receive an error message: "Application error: a client-side exception has occurred (see the browser console for more information)"

By trying out adding individual columns I found out that this happens when Fedistar tries to load the Notification column.

I have attached my log file

fedistar.log

System:

Windows 10 Pro X64 22H2 Fedistar V.1.3.0 & 1.3.3

h3poteto commented 1 year ago

Did you try to close and reopen Fedistar after the crash? Did you get the same error when restarting? or did it work fine after restarting?

Memo: The error message is IO error

12:52:06 [INFO] user streaming is started for risk@aachen.social
12:52:06 [INFO] Local streaming is started for risk@aachen.social
12:52:06 [INFO] Federated streaming is started for risk@aachen.social
12:52:06 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 63.000µs
12:52:06 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 99.800µs
12:52:07 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 105.700µs
13:02:22 [ERROR] Failed to read message: IO error: 
h3poteto commented 1 year ago

Probably the error is here: https://github.com/h3poteto/megalodon-rs/blob/8051c894de5357ae6621675e4262edb33dfec0ce/src/mastodon/web_socket.rs#L194

RiSK1979 commented 1 year ago

Did you try to close and reopen Fedistar after the crash? Did you get the same error when restarting? or did it work fine after restarting?

Memo: The error message is IO error

12:52:06 [INFO] user streaming is started for risk@aachen.social
12:52:06 [INFO] Local streaming is started for risk@aachen.social
12:52:06 [INFO] Federated streaming is started for risk@aachen.social
12:52:06 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 63.000µs
12:52:06 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 99.800µs
12:52:07 [INFO] SELECT * FROM instructions; rows affected: 0, rows returned: 1, elapsed: 105.700µs
13:02:22 [ERROR] Failed to read message: IO error: 

Yes, I did. Several times. Also installed the updated version. Removing the complete account and then adding column by column brought me to figure out, it was about adding the Notifications column, that made the app crash.

h3poteto commented 1 year ago

Do you know which notification crashes when displayed?

RiSK1979 commented 1 year ago

It just crashed the minute the Notification column starts loading.

h3poteto commented 1 year ago

@RiSK1979 Can you please try 1.3.5? https://github.com/h3poteto/fedistar/releases/tag/v1.3.5

I enabled devtools in this version, so if you get the same error, please press "F12" button. Developer tool will appear, then please show me the error detail.

throwException commented 1 year ago

I'm experiencing the same problem, again width v1.3.5. But again only after adding my third account.

I deleted the whole fedistar config and added accounts and tabs again, to no avail.

Maybe it has something to do with having two accounts on the same server?

fedistar.log

h3poteto commented 1 year ago

@throwException Can you please open devtools using "F12" and show me the error logs?

throwException commented 1 year ago

@throwException Can you please open devtools using "F12" and show me the error logs?

Here you go: Console.txt

h3poteto commented 1 year ago

Does this occur when you add Notifications column? When you add other timelines, this doesn't occur, right? I can't reproduce this in my local......

h3poteto commented 1 year ago

Memo: I'm suspecting here: https://github.com/h3poteto/fedistar/blob/ada79e98c88cfdef37161267300d4788e10f1e66/src/components/timelines/notification/Reaction.tsx#L234 t.status is that line in the compiled source. Some notifications do not have account field......?

throwException commented 1 year ago

Does this occur when you add Notifications column? When you add other timelines, this doesn't occur, right?

Yes, only the notification column causes this problem.

throwException commented 1 year ago

Some notifications do not have account field......?

Here are the offending notifications: notifications.txt

h3poteto commented 1 year ago

Thanks!!! I got it. It contains unexpected notification, for example

{
    "id": "547431",
    "type": "reblog",
    "created_at": "2023-05-19T04:46:50.387Z",
    "account": {
        "id": "22860",
        "username": "exception",
        "acct": "exception@mastodon.savvy.ch",
        "display_name": "Stefan Thöni",
        "locked": false,
        "bot": false,
        "discoverable": false,
        "group": false,
        "created_at": "2018-11-08T00:00:00.000Z",
        "note": "\u003cp\u003ePräsident der \u003cspan class=\"h-card\"\u003e\u003ca href=\"https://tooting.ch/@parat\" class=\"u-url mention\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e@\u003cspan\u003eparat\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e, mit Spass an Recht und IT Security. \u003ca href=\"https://mastodon.savvy.ch/tags/Jura\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eJura\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/InfoSec\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eInfoSec\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/ITSec\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eITSec\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/Politics\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003ePolitics\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/Privacy\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003ePrivacy\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/Transparency\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eTransparency\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/RuleOfLaw\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eRuleOfLaw\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/Democracy\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eDemocracy\u003c/span\u003e\u003c/a\u003e \u003ca href=\"https://mastodon.savvy.ch/tags/HumanRights\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eHumanRights\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e\u003cp\u003eZuhause in \u003ca href=\"https://mastodon.savvy.ch/tags/Steinhausen\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eSteinhausen\u003c/span\u003e\u003c/a\u003e, Kanton \u003ca href=\"https://mastodon.savvy.ch/tags/Zug\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eZug\u003c/span\u003e\u003c/a\u003e, \u003ca href=\"https://mastodon.savvy.ch/tags/Schweiz\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e#\u003cspan\u003eSchweiz\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e",
        "url": "https://mastodon.savvy.ch/@exception",
        "avatar": "https://tooting.ch/system/cache/accounts/avatars/000/022/860/original/67dcfa9486a740f0.jpg",
        "avatar_static": "https://tooting.ch/system/cache/accounts/avatars/000/022/860/original/67dcfa9486a740f0.jpg",
        "header": "https://tooting.ch/system/cache/accounts/headers/000/022/860/original/2d75944bf20d8be3.png",
        "header_static": "https://tooting.ch/system/cache/accounts/headers/000/022/860/original/2d75944bf20d8be3.png",
        "followers_count": 216,
        "following_count": 197,
        "statuses_count": 5107,
        "last_status_at": "2023-06-01",
        "emojis": [],
        "fields": [{
            "name": "Website",
            "value": "\u003ca href=\"https://stefanthoeni.ch\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://\u003c/span\u003e\u003cspan class=\"\"\u003estefanthoeni.ch\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e",
            "verified_at": "2023-01-17T22:02:51.234+00:00"
        }, {
            "name": "Mail",
            "value": "stefan.thoeni@parat.swiss",
            "verified_at": null
        }, {
            "name": "Matrix",
            "value": "\u003cspan class=\"h-card\"\u003e\u003ca href=\"https://mastodon.savvy.ch/@exception\" class=\"u-url mention\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"\u003e@\u003cspan\u003eexception\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e:matrix.parat.swiss",
            "verified_at": null
        }, {
            "name": "Pronouns",
            "value": "DE: er, EN: he/they",
            "verified_at": null
        }]
    },
    "status": null
}

Fedistar assumes that notifications have status field when the type is reblog.

@throwException Which server are you using?

h3poteto commented 1 year ago

Memo: Perhaps, if the status was deleted by the owner, the notification can't contain status field.

throwException commented 1 year ago

@throwException Which server are you using?

The account is on https://tooting.ch

h3poteto commented 1 year ago

Thanks! Can you please try 1.3.6? https://github.com/h3poteto/fedistar/releases/tag/v1.3.6

RiSK1979 commented 1 year ago

That version seems to work.

Sorry was traveling lately, so it took a while before I could test and answer.

h3poteto commented 1 year ago

OK, no problem. Can I close this issue?

throwException commented 1 year ago

Can you please try 1.3.6?

Yes, this works fine. Thanks!