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

Video Upload always fails in Element when run through Tor #1691

Open
Sazu-bit opened this issue May 25, 2024 · 10 comments
Open

Video Upload always fails in Element when run through Tor #1691

Sazu-bit opened this issue May 25, 2024 · 10 comments
Labels
A-File-Upload Attachments and file uploads O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Platform-Specific

Comments

@Sazu-bit
Copy link

Sazu-bit commented May 25, 2024

Steps to reproduce

Steps to reproduce

How to Replicate

  1. Have TOR daemon running.

  2. run:
    a. nohup sh -c 'element-desktop --proxy-server=socks5://127.0.0.1:9050 --profile DebugProfile' > ~/nohup-DebugProfile.out &

  3. Attempt to send video to another person.

What I expect to happen
Video uploads

What actually happens
Video bar progresses quickly then error declaring that the upload has failed appears.

Network Tab shows:

Upload status: Cancelled after 30.23s

It seems quite obvious what's happening, but how do I fix it?

Outcome

What did you expect?

File to upload

What happened instead?

File cancelled itself

Operating system

Linux

Application version

1.11.67

How did you install the app?

Built from source

Homeserver

No response

Will you send logs?

No - The networking output shows clearly what element is doing and why it won't upload the video. Timeout is reached.

@Sazu-bit
Copy link
Author

#1690 related.

@dosubot dosubot bot added A-File-Upload Attachments and file uploads O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround labels May 25, 2024
@t3chguy
Copy link
Member

t3chguy commented May 28, 2024

Will you send logs?
Yes

Not seeing any logs linking to this issue

@t3chguy t3chguy added the X-Needs-Info This issue is blocked awaiting information from the reporter label May 28, 2024
@Sazu-bit
Copy link
Author

Sazu-bit commented May 28, 2024

vector.txt

This is the network output after using ctrl+I and attempting to upload. It's exactly as I said in the post.

It starts the upload, it reaches 30s (timeout=30000) and then cancels itself. All statuses are 200 until that point where it turns to (canceled) type: xhr.

@t3chguy
Copy link
Member

t3chguy commented May 28, 2024

Please use the required log upload mechanism so that it is parsed by our rageshake tooling accordingly as per the issue template you agreed to:

image

@Sazu-bit
Copy link
Author

Should see them shortly.

@t3chguy
Copy link
Member

t3chguy commented May 28, 2024

Looks like a duplicate of element-hq/element-web#25756

@Sazu-bit
Copy link
Author

Sazu-bit commented May 28, 2024

That one might be cloudflare, can confirm my Homeserver doesn't use cloudflare, nor am I attempting to send multiple files, just the one. Also I'm using the desktop version not the web version, just to confirm.

Perhaps, related instead of duplicate?

The fix I would believe would be to extend the timeout locally but I have no idea how to go about this.

@t3chguy
Copy link
Member

t3chguy commented May 28, 2024

The fix I would believe would be to extend the timeout locally but I have no idea how to go about this.

https://github.com/matrix-org/matrix-js-sdk/blob/7c876251575ebe0b17b97cd25ef7fe6308bca5de/src/http-api/index.ts#L72

@dbkr dbkr changed the title Video Upload always fails in Element Video Upload always fails in Element when run through Tor Jun 27, 2024
@dbkr dbkr added Z-Platform-Specific and removed X-Needs-Info This issue is blocked awaiting information from the reporter labels Jun 27, 2024
@dbkr
Copy link
Member

dbkr commented Jun 27, 2024

I'm going to call this 'platform specific' to reflect the fact that it only happens through Tor. Is this still a bug? If so, we could accept a PR for this but realistically it's unlikely to make it onto our roadmap.

@Sazu-bit
Copy link
Author

Yes this is still a bug as I haven't been able to get Element to compile properly since (something changed in the software stack and my system won't work well with it -_-).

Given how important Tor is to maintaining Anonymity and Security and given Matrix's unique selling point (secure, decentralized communication), I've been constantly surprised that there hasn't been more testing done with Tor, which would allow a better reach to those that need the ability to communicate securely the most (see China, Iran or Russia for examples).

I'm aware that Element/Matrix are largely focused on other things right now, but this is a relatively (compared to some of the things I've seen being discussed) quick win.

Expose the timeout variable so that it can be configured in the settings, default it to 30s. It's confused me for a while, why this isn't already a thing, but again, I do understand that there has been bigger fish to fry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-File-Upload Attachments and file uploads O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect Z-Platform-Specific
Projects
None yet
Development

No branches or pull requests

3 participants