element-web icon indicating copy to clipboard operation
element-web copied to clipboard

Chat Export of large room hangs on "Generating a Zip" indefinitely

Open CicadaCinema opened this issue 1 year ago • 6 comments

Steps to reproduce

  1. Export a large room 'from the beginning', with 'include attachments' checked and the 'Size Limit' set to 2000MB.
  2. Wait until the export process gets to the "Generating a Zip" stage.

Outcome

What did you expect?

I can download a zip after several hours, or I see an error message.

What happened instead?

The UI hangs indefinitely on the "Generating a Zip" stage. The spinner keeps spinning. In the browser console I see the following lines (edited to remove what I think is irrelevant):

... snip ...
Creating output...
... snip ...
ExportDialog.tsx:118 Uncaught (in promise) DOMException: The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.
(anonymous) @ ExportDialog.tsx:118
Show 1 more frame
Show less

Operating system

Fedora 39

Browser information

Version 125.0.6422.141 (Official Build, ungoogled-chromium) (64-bit)

URL for webapp

app.element.io

Application version

Element version: 1.11.69 Crypto version: Rust SDK 0.7.0 (068a0af), Vodozemac 0.6.0

Homeserver

No response

Will you send logs?

No

CicadaCinema avatar Jun 21 '24 07:06 CicadaCinema

The same issue can be seen in Element Desktop, but I couldn't find a way to see the console to check for errors. I left Element Desktop for a few days to export this room and it was still stuck on "Generating a Zip".

On the other hand, unchecking the option to download attachments allowed Element Desktop to export the room pretty quickly (less than half an hour).

I snipped/removed some http 500 errors in the browser console that Element Web got while retrieving a handful of media files.

CicadaCinema avatar Jun 21 '24 07:06 CicadaCinema

Ungoogled Chromium is not a supported environment as per https://github.com/element-hq/element-web#supported-environments

can you retry in a supported browser

t3chguy avatar Jun 21 '24 08:06 t3chguy

can you retry in a supported browser

My bug report also applies to Element Desktop, where the symptom is the same (see the message above yours), does that count?

CicadaCinema avatar Jun 21 '24 12:06 CicadaCinema

Depends if you're using a package maintained by us or not. We only ship debs and tarballs, no fedora package.

t3chguy avatar Jun 21 '24 14:06 t3chguy

For the record, I am using the flatpak package, so that would be unofficial I suppose.

CicadaCinema avatar Jun 21 '24 20:06 CicadaCinema

I tried again in Firefox and got the same symptoms.

Element version

Element version: 1.11.69 Crypto version: Rust SDK 0.7.0 (068a0af), Vodozemac 0.6.0

Browser version

Firefox 126.0 (64-bit)

Operating system

Fedora 39

What I suspect to be the only revelant error from browser console

Uncaught (in promise) Error: Bug : can't construct the Blob.
    newBlob jszip.min.js:13
    t jszip.min.js:13
    exports jszip.min.js:13
    delay jszip.min.js:13
    p setImmediate.js:40
    p setImmediate.js:69
    a setImmediate.js:109
jszip.min.js:13:31873
    <anonymous> ExportDialog.tsx:116
    InterpretGeneratorResume self-hosted:1418
    AsyncFunctionThrow self-hosted:804
    (Async: async)
    <anonymous> useStateCallback.ts:25
    I ExportDialog.tsx:133
    I ExportDialog.tsx:163
    InterpretGeneratorResume self-hosted:1418
    AsyncFunctionNext self-hosted:799
    React 11
    (Async: async)
        Ve
        We
        Cr
        Cr
        Ar
        Pr
        Me
        Pr
        Pr
        Zt
        Xt
    unstable_runWithPriority scheduler.production.min.js:18
    React 3
        Go
        Oe
        Yt

CicadaCinema avatar Jun 21 '24 20:06 CicadaCinema

How about having an option for message range instead of last N messages. This would help until a better solution is implemented.

drid avatar Sep 08 '24 21:09 drid

This is still an issue. I can no longer export my chats, and what's worse is that the few third party utilities that could possibly do the job no longer work because of breaking changes to the Matrix spec surrounding authenticated media. So I think it should be a priority to fix this.

eTomte avatar Oct 23 '25 20:10 eTomte

Chat export was a community contribution, it wasn't on the roadmap, contributions to fix it are welcome.

t3chguy avatar Oct 23 '25 20:10 t3chguy