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

Large(r) files break things without feedback #390

Open
ltguillaume opened this issue Feb 15, 2025 · 3 comments
Open

Large(r) files break things without feedback #390

ltguillaume opened this issue Feb 15, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ltguillaume
Copy link
Contributor

ltguillaume commented Feb 15, 2025

Description

I tried to upload larger files to see what happens.

10MB

Browser console output

Firefox:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data secret-CATU2aIr.js:1:298
    n https://hemmelig.app/assets/secret-CATU2aIr.js:1

Chromium:

Failed to load resource: the server responded with a status of 502 ()
secret-CATU2aIr.js:1 SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
n @ secret-CATU2aIr.js:1

100MB

Chromium (100MB):

Error creating secret: RangeError: Invalid array length
    at Array.push (<anonymous>)
    at W.encodeBase64 (crypto-Dq6ofb4W.js:53:36565)
    at Fn (crypto-Dq6ofb4W.js:53:37107)
    at handleSubmit (index-i4oeh9TY.js:12:92110)

and the page just jumps to the top (which is probably just #389).

512MB

Proper error message:

Error creating the secret

with the following in the browser console:

Error creating secret: out of memory

1GB+

In Firefox, the entire tab just crashes.
In Chromium, it tends to actas if the upload completed, but then presents a 0 bytes file after viewing the secret.

Looks like this needs both a size limitation and proper error handling/verification that the file has been properly uploaded.

@ltguillaume ltguillaume added the bug Something isn't working label Feb 15, 2025
@begunfx
Copy link

begunfx commented Feb 20, 2025

I'm getting the same thing. I'm using chrome. I tried attaching an 80mb file and when I try to create the secret I just get an "awe snap" page and no other information.

@bjarneo
Copy link
Member

bjarneo commented Feb 21, 2025

So there are two things here

  1. The support for large files: [FEATURE] support large files #163 (comment)
  2. To fix the regression where it does not give you an error message if anything fails.

Thanks for reporting!

@ltguillaume
Copy link
Contributor Author

ltguillaume commented Feb 24, 2025

crypt.fyi has the same sort of problem, so their solutions/error handling might help: osbytes/crypt.fyi#76

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

3 participants