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

file upload fails when using webrtc #6309

Open
paolor1965 opened this issue Aug 6, 2024 · 20 comments
Open

file upload fails when using webrtc #6309

paolor1965 opened this issue Aug 6, 2024 · 20 comments
Labels

Comments

@paolor1965
Copy link

Describe the bug
if I try to upload a file from the files menu on a Windows device regardless of the version, the copy fails and as long as upload is active a temporary file of 0 bytes is created on the remote device
the problem occurs with all versions after 1.1.24
file download works

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'any windows controlled device'
  2. Click on 'files.'
  3. I choose a file and start uploading
  4. the progress bar does not start

Expected behavior
I expect the 150MB file to be copied to chosen location
Screenshots
immagine

Server Software (please complete the following information):

  • OS: AlmaLinux release 8.10 (Cerulean Leopard)
  • Virtualization: [proxmox guest]
  • Network: [LAN/WAN]
  • Version: [e.g. >=1.1.25]
  • Node: [v18.17.1]

Client Device (please complete the following information):

  • Device: desktop
  • OS: [windows 10 ltsc]
  • Network: [Remote over WAN]
  • Browser: [ firefox 128.0.2]
  • MeshCentralRouter Version: [if applicable]

Remote Device (please complete the following information):

  • Device: [desktop]
  • OS: [e.g. Windows 10 ltsc+ windows 11 23h2 ]
  • Network: [ Remote over WAN]
  • Current Core Version (if known): [HINT: Go to a device then console Tab then type info]
    Current Core: Dec 9 2022, 1807787178
    Agent Time: 2024-08-06 14:59:56.390+02:00.
    User Rights: 0xffffffff.
    Platform: win32.
    Capabilities: 15.
    Server URL: wss://meshcentral2.xxx.xxx.xxx.xxx:443/agent.ashx.
    OS: Microsoft Windows 11 Pro - 23H2/22631.
    Additional context
    Add any other context about the problem here.

Your config.json file

@paolor1965 paolor1965 added the bug label Aug 6, 2024
@si458
Copy link
Collaborator

si458 commented Aug 6, 2024

I've noticed ur file manager says webrtc,
First try disabling webrtc. Restart meshcentral. Then try again

Edit. Also ur config.json is missing

@paolor1965
Copy link
Author

yes thanks I didn't have time to sanitize it. I'll try right away

@paolor1965
Copy link
Author

thanks a lot, now it works by disabling webrtc

@si458
Copy link
Collaborator

si458 commented Aug 6, 2024

great! so the must be a problem then with the webrtc!
ill change title and have a look when i get chance, as i know webrtc causes ALOT of problems for different things

@si458 si458 changed the title from version 1.1.25 file upload fails if the file to be copied is larger than 100KB file upload fails when using webrtc Aug 6, 2024
@paolor1965
Copy link
Author

thank you again

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

@paolor1965 can you share your config.json please so i can do some testing?

@paolor1965
Copy link
Author

hi I'm on holiday for the next 15 days, not if I can share it soon

@si458
Copy link
Collaborator

si458 commented Aug 27, 2024

No worries, enjoy!
When u get chance plz share ur config.json, no rush!

@paolor1965
Copy link
Author

paolor1965 commented Sep 3, 2024

hi, here is the config.json without sensitive parts that are replaced with xxx. I apologize if it is not an example of cleaning
config.json

@si458
Copy link
Collaborator

si458 commented Sep 3, 2024

I have actually been able to replicate the issue

The issue seems to be because we increased the bytes uploaded for normal file transfers, which speeded up normal file transfers.

But for some reason, the webrtc seems to be killing the meshagent and restarting it during a file transfer now with webrtc and no idea why?

So this isn't a simple fix, sadly but still looking into it

@paolor1965
Copy link
Author

thanks for what you are doing, unfortunately I am not a programmer otherwise I would have helped

@si458
Copy link
Collaborator

si458 commented Sep 3, 2024

@paolor1965 no it's OK!
The simple work around for the moment is set webrtc: false
This disabled webrtc completely and relays everything through ur meshcentral
Not ideal but works 100% of the time!

@paolor1965
Copy link
Author

I understand, in what other cases besides file transfer does disabling webrtc affect,

@si458
Copy link
Collaborator

si458 commented Sep 3, 2024

Webrtc was used in the remote desktop and file transfer from what I've checked
It wasn't used the in terminal
But again disabling webrtc won't do any harm
It's just the connection goes through ur meshcentral server rather than going directly to the remote device if it can

It actually starts out by relaying though ur meshcentral server anyways when u click connect, it's just within the first 5 seconds both ur device and remote device then attempt to do webrtc and if that's possible, it then switches over to using that :)

@paolor1965
Copy link
Author

thanks everything clear

si458 added a commit that referenced this issue Sep 3, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
si458 added a commit that referenced this issue Sep 3, 2024
Signed-off-by: si458 <simonsmith5521@gmail.com>
@si458
Copy link
Collaborator

si458 commented Sep 13, 2024

ok so this should be fixed in 1.1.29, BUT ive noticed for some reason,
depending on the remote machine, it can disconnect and reconnect during the transfer?
this is a seperate issue tho

@si458 si458 closed this as completed Sep 13, 2024
@Henrique-Batista
Copy link
Contributor

I tried in 1.1.35 but I still have the same issue.

@Henrique-Batista
Copy link
Contributor

@si458 I think the problem is related to Websocket compression. I noticed that in both my configuration and @paolor1965 's, WebRTC is disabled, but agentWsCompression and WsCompression are enabled. I tried disabling WsCompression and leaving WebRTC enabled (actually, it doesn't matter if it's enabled or disabled) and the problem didn't occur. I also checked the web server request tracking, and when I enable WSCompression, the web request doesn't seem to reach the server; it only works when WSCompression is disabled. I don't know about paolor's environment, but my environment has some particular settings that might influence this issue. So if you can't reproduce the problem, let me know and I'll create another issue to provide the information.

@si458 si458 reopened this Dec 18, 2024
@si458
Copy link
Collaborator

si458 commented Dec 18, 2024

@Henrique-Batista I will try to have a look when I get a chance as i dont use any compression at all for anything and i have issues from time to time with webrtc which is why i tell people to NOT use it!

Im currently ill as hell, full of flu/cold, snotting everywhere and making it worse, I've now got a serious tooth ake/pain, so that is another expensive emergency nhs dentist appointment to come 😞

@Henrique-Batista
Copy link
Contributor

Hello @si458 , I hope you are better. I did some tests in my environment and with WebRTC active I can't access the machines because it crashes milliseconds after starting and the Files directories don't change without disconnecting and connecting again. I believe this is due to the configuration I have here, but I've also had other problems because of WebRTC.

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