mautrix / instagram

A Matrix-Instagram DM puppeting bridge
https://matrix.to/#/#instagram:maunium.net
GNU Affero General Public License v3.0
144 stars 28 forks source link

Attachment not available: failed to copy file when receiving voice messages #64

Closed Mozoloa closed 1 year ago

Mozoloa commented 1 year ago

As the title says, when receiving voice messages now, it always says "Attachment not available: failed to copy file" and I can't hear it (obviously), wasn't always like this.

Using Element web & android from what I can tell i'm using 0.2.2 so the latest

tulir commented 1 year ago

You need to check the logs to find out why it failed

Mozoloa commented 1 year ago

can you tell me where I can see that ? I'm not really in charge of maintaining my matrix instance

Mozoloa commented 1 year ago

Here's what it says

Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]: [2022-11-20 18:31:06,492] [WARNING@mau.portal.340282366841710300949128286954620688414] Failed to upload media
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]: Traceback (most recent call last):
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:   File "/usr/lib/python3.10/site-packages/mautrix_instagram/portal.py", line 929, in _convert_instagram_media
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:     content = await reupload_func(source, media_data, intent)
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:   File "/usr/lib/python3.10/site-packages/mautrix_instagram/portal.py", line 789, in _reupload_instagram_voice
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:     content = await self._reupload_instagram_file(
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:   File "/usr/lib/python3.10/site-packages/mautrix_instagram/portal.py", line 833, in _reupload_instagram_file
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]:     if not info.width and not info.height and info.mimetype.startswith("image/"):
Nov 20 19:31:06 MATRIX matrix-mautrix-instagram[3962]: AttributeError: 'AudioInfo' object has no attribute 'width'
Mozoloa commented 1 year ago

could this has been fixed in 5a4ebc74b822eb92a70e4e8d13c71635bad4488a ?

tulir commented 1 year ago

Yes