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

RangeError: offset is out of bounds #102

Closed
danyflorez opened this issue Jul 23, 2021 · 3 comments
Closed

RangeError: offset is out of bounds #102

danyflorez opened this issue Jul 23, 2021 · 3 comments
Assignees
Labels

Comments

@danyflorez
Copy link

Hi,

We're getting a lot of errors when the user uploads a big photo (8 mg). The error is on the following lines.

string(value) {
    const encoded = textEncoder.encode(value);
    const length = encoded.byteLength;
    this.uint(length);
    this.data.set(encoded, this.offset); --->>> RangeError: offset is out of bounds
    this.offset += length;
} 

This is the asayer url replicating the error -> Asayer

I'm gonna attach the image the user is uploading.[
RANGE OUT OF BOUND.jpg.zip
](url)

@danyflorez
Copy link
Author

More insights...

image (1)
image

@PandaCodes
Copy link
Contributor

Sorry, missed it while was on vacation.
The issue is that the size of one beacon message sent by tracker is limited.
@danyflorez you can play with the beaconSize option of the tracker, though the maximum is hardcoded on a receiver side 1 Mb (1e6 bytes), while the picture seems to be 8+ Mb.

There are two issues I can see here - one is to take the limitation out to the environmental vars and two - is to make a more user-friendly error message.

@estradino
Copy link
Contributor

Fixed in v1.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants