Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Attachments of remote posts not loaded/not showing up #2313

Closed
Jofkos opened this issue Oct 29, 2023 · 11 comments
Closed

[bug] Attachments of remote posts not loaded/not showing up #2313

Jofkos opened this issue Oct 29, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@Jofkos
Copy link

Jofkos commented Oct 29, 2023

Describe the bug with a clear and concise description of what the bug is.

For some toots/posts the image/video attachments do not show up.

What's your GoToSocial Version?

0.12.0 git-9114c5c

GoToSocial Arch

amd64

What happened?

A post in my timeline that does have attachments only shows up without those attachments, irrespective of client used. I had reported this bug already in #1644, though it was dismissed because the instance in question was running an older GTS version. The problem is still happening, however, both for instances using GTS and other fedi software.

What you expected to happen?

The post to have the attachments.

How to reproduce it?

I still do not know what triggers it, yet I do have two recent example toots that had this issue:

Anything else we need to know?

No response

@Jofkos Jofkos added the bug Something isn't working label Oct 29, 2023
@Jofkos Jofkos changed the title [bug] Issue Title [bug] Attachments of remote posts not loaded/not showing up Oct 29, 2023
@tsmethurst
Copy link
Contributor

Hiya, what happens if you open the post again today in your client and refresh it a few times?

@Jofkos
Copy link
Author

Jofkos commented Oct 30, 2023

I tried refreshing, but I don't see how that'd help? The result remained unchanged, both in Elk and Toot!.

@tsmethurst
Copy link
Contributor

I don't see how that'd help

When you request a post again via the API (explicitly in the 'context' view) after not viewing it for a while (2hr cooldown), GtS will go refresh that post from the remote instance to ensure it has an up to date representation of it to show you.

In some cases when remote media is not retrieved the first time due to temporary network issues and the like, the attachments get fetched next time you view it.

@Jofkos
Copy link
Author

Jofkos commented Oct 30, 2023

Oh okay, I thought remote posts just get cached after being retrieved for the first time. Weird that the attachments still don't get loaded, however. Is there any logs I could provide to help debug this?

@tsmethurst
Copy link
Contributor

I thought remote posts just get cached after being retrieved for the first time

They do, but if someone on the other side edits the post and we don't get the Update, it's handy to refetch it and update the cache :)

Is there any logs I could provide to help debug this?

Yes! If you could wait a few hours and open the post in your client again, then check for any logs about attachments or GET-ing to the remote instance while you're doing it, that would be great :)

@tsmethurst
Copy link
Contributor

Hang on, managed to obtain some logs myself:

Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.435" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01M051B2KJF5WPDMHMTHAWE1VX.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.535" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.544" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/0198WDA30FD14M1BDFZBQADM7Z.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.579" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.587" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01E2H24D1B6JNTD0JE23H0QFR0.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.649" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.657" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01GHW16PK5N43QANT2NTBKPDCW.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure

Interesting eh? So I'll see if I can figure out what's going on there.

@tsmethurst
Copy link
Contributor

Btw, the pleroma one is because it's serving a .mov file and we don't support that format in GtS (yet).

@Jofkos
Copy link
Author

Jofkos commented Oct 31, 2023

Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.435" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01M051B2KJF5WPDMHMTHAWE1VX.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.535" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.544" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/0198WDA30FD14M1BDFZBQADM7Z.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.579" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.587" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01E2H24D1B6JNTD0JE23H0QFR0.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.649" func=dereferencing.(*Dereferencer).fetchStatusAttachments level=ERROR requestID=kbjed14b04001gp77vs0 msg="error loading attachment: finish: error decoding image: unexpected EOF"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: timestamp="31/10/2023 09:43:28.657" func=httpclient.(*Client).DoSigned level=INFO method=GET url=https://social.noyu.me/fileserver/01K5XEEZF4A486Z2PRS7NHG169/attachment/original/01GHW16PK5N43QANT2NTBKPDCW.png requestID=kbjed14b04001gp77vs0 pubKeyID=https://goblin.technology/users/tobi/main-key msg="performing request"
Oct 31 09:43:28 goblin.technology gotosocial[1417983]: crc failure

Just checked my logs, this is indeed the error I get, too!

Btw, the pleroma one is because it's serving a .mov file and we don't support that format in GtS (yet).

Fair enough!

Maybe it would generally be nice to somehow indicate that attachments failed to load, through a placeholder or something like that? If I know the attachment is missing, I can go check out the post on its own instance. For some posts, though, it is not super evident that an attachment was supposed to be there.

@tsmethurst
Copy link
Contributor

Yup yup, we've got a couple issues open related to this:

@Jofkos
Copy link
Author

Jofkos commented Nov 2, 2023

Some emojis are also getting unexpected EOFs, e.g.,

timestamp="02/11/2023 10:36:42.476" func=dereferencing.(*deref).populateEmojis level=ERROR requestID=gd7sq3wb04001pw9x620 msg="couldn't get remote emoji smw_t_castle_t@movsw.0x0.st: store: error reading incoming media: unexpected EOF"

Please let me know if I should open a different issue for that, but it might be related to what is happening here.

@tsmethurst
Copy link
Contributor

Heya, this should be fixed now on 0.13.0 :)

We did a lot of updates around placeholders, and also some work to make sure pngs are decoded properly. I'll close this issue now, but feel free to open it again (after our holiday ends next week) if problems recur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants