immense / Remotely

A remote control and remote scripting solution, built with .NET 8, Blazor, and SignalR.
GNU General Public License v3.0
4.43k stars 1.61k forks source link

Frequent Reconnecting popup and unable to control on some win 10 machines Windows 10.0.18363 #188

Closed kiranmgrscoe closed 3 years ago

kiranmgrscoe commented 3 years ago

This issue with app.remotely

kiranmgrscoe commented 3 years ago

This issue with your current demo site also

kiranmgrscoe commented 3 years ago

Also this is reproduced with custom build and deploy on windows server

bitbound commented 3 years ago

I haven't been able to reproduce this. But I also don't have any machines running that version of Windows 10 still.

I'd suggest looking at the logs on the remote machine and seeing if it's generating errors, then post them here. You can retrieve the logs remotely in the web console by using the GetLogs command.

kiranmgrscoe commented 3 years ago

Thanks I will chk.... appreciated your support

zikeji commented 3 years ago

Just a followup: I'm on the latest build (Windows 10 Pro 20H2, 19042.685) and getting the same behavior. No relevant logs, it just appears to be looping.

Starting screen cast.  Requester: Zikeji. Viewer ID: WroF8kP8z_0L8yNOAfUCng.  App Mode: Unattended
2020-12-22 18:11:28.878 [Info] Starting WebRTC connection.
2020-12-22 18:11:31.041 [Info] Restarting screen caster.
2020-12-22 18:11:32.353 [Info] Background UI apps started.
2020-12-22 18:11:32.741 [Info] Setting initial desktop to Default.
2020-12-22 18:11:32.742 [Info] Resuming after relaunch.
2020-12-22 18:11:32.749 [Info] New input processing thread started on thread 16.
2020-12-22 18:11:33.050 [Info] Starting screen cast.  Requester: Zikeji. Viewer ID: tODoqpZ0F2akqEhFEtprPg.  App Mode: Unattended
2020-12-22 18:11:33.435 [Info] Starting WebRTC connection.
2020-12-22 18:11:35.504 [Info] Restarting screen caster.
2020-12-22 18:11:36.796 [Info] Background UI apps started.
2020-12-22 18:11:37.171 [Info] Setting initial desktop to Default.
2020-12-22 18:11:37.172 [Info] Resuming after relaunch.
2020-12-22 18:11:37.179 [Info] New input processing thread started on thread 16.
2020-12-22 18:11:37.456 [Info] Starting screen cast.  Requester: Zikeji. Viewer ID: 8OCTTUrJdljlU4W2Cphzjg.  App Mode: Unattended
2020-12-22 18:11:37.844 [Info] Starting WebRTC connection.
2020-12-22 18:11:40.222 [Info] Restarting screen caster.
2020-12-22 18:11:41.509 [Info] Background UI apps started.
2020-12-22 18:11:41.886 [Info] Setting initial desktop to Default.
2020-12-22 18:11:41.888 [Info] Resuming after relaunch.
2020-12-22 18:11:41.894 [Info] New input processing thread started on thread 16.
2020-12-22 18:11:42.176 [Info] Starting screen cast.  Requester: Zikeji. Viewer ID: sZZyvgg0ozycik1PeMJmRg.  App Mode: Unattended
2020-12-22 18:11:42.598 [Info] Starting WebRTC connection.
2020-12-22 18:11:44.935 [Info] Restarting screen caster.
2020-12-22 18:11:46.252 [Info] Background UI apps started.
2020-12-22 18:11:46.651 [Info] Setting initial desktop to Default.
2020-12-22 18:11:46.653 [Info] Resuming after relaunch.
2020-12-22 18:11:46.660 [Info] New input processing thread started on thread 16.
2020-12-22 18:11:46.932 [Info] Starting screen cast.  Requester: Zikeji. Viewer ID: 1Hqe-xUxaIuwE8xzTylKoQ.  App Mode: Unattended
2020-12-22 18:11:47.322 [Info] Starting WebRTC connection.
Debug Output:
Verbose Output:
Information Output:
Error Output:
stevesobol commented 3 years ago

Could the people having trouble please share their configs? I may know what's happening.

zikeji commented 3 years ago

Could the people having trouble please share their configs? I may know what's happening.

My config is the standard application.json config with RedirectToHttps set to true, RemoteNotifyUser set to false, default theme set to Dark, and the SMTP info configured. As well, instead of SQLite I'm using PostgreSQL.

stevesobol commented 3 years ago

Which web server are you using? Is Remotely running behind a proxy?

On Dec 22, 2020, at 16:43, Caleb B notifications@github.com wrote:

 Could the people having trouble please share their configs? I may know what's happening.

My config is the standard application.json config with RedirectToHttps set to true, RemoteNotifyUser set to false, default theme set to Dark, and the SMTP info configured. As well, instead of SQLite I'm using PostgreSQL.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

zikeji commented 3 years ago

Which web server are you using? Is Remotely running behind a proxy?

Running using the Ubuntu 18.04 installation script on a fresh install of Ubuntu 18.04. So it is running behind NGINX.

The issue is only present on my personal computer, which is on the latest update, but is not present on another computer that isn't running the latest update.

bitbound commented 3 years ago

It appears as though the WebRTC initialization is completely crashing the process. Can you check the Event Viewer and see if there are any errors in the Application log related to it?

stevesobol commented 3 years ago

@zikeji The reason I asked is because I run haproxy in front of Remotely, which should work fine, except that my install didn't, but it was just a question of making haproxy generate... I believe it was an X-Forwarded-Proto header. Oddly, without this header, one browser still worked (I think it was Firefox) but none of the others would even let me log in - I'd enter my credentials, submit them, and bam, I'd get thrown right back out to the login page.

And with the one browser that DID allow me to log in, I'd get disconnect on a regular basis (maybe every 10 seconds or so).

To fix this, I added

http-request set-header "x-forwarded-proto" "https"

to my backend config. You may need to do something similar with Nginx.

zikeji commented 3 years ago

It appears as though the WebRTC initialization is completely crashing the process. Can you check the Event Viewer and see if there are any errors in the Application log related to it?

Faulting application name: Remotely_Desktop.exe, version: 2020.12.19.2323, time stamp: 0x5fbf100e
Faulting module name: mrwebrtc.DLL, version: 0.0.0.0, time stamp: 0x5f745f18
Exception code: 0xc0000409
Fault offset: 0x00000000005ba01d
Faulting process id: 0x9c1c
Faulting application start time: 0x01d6d8e5293b3171
Faulting application path: C:\Program Files\Remotely\Desktop\Remotely_Desktop.exe
Faulting module path: C:\Program Files\Remotely\Desktop\mrwebrtc.DLL
Report Id: 7fb12bf0-a34d-459d-bd0a-80ca9af5828b
Faulting package full name: 
Faulting package-relative application ID: 
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" /> 
  <EventID Qualifiers="0">1000</EventID> 
  <Version>0</Version> 
  <Level>2</Level> 
  <Task>100</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2020-12-23T04:36:23.5656993Z" /> 
  <EventRecordID>73725</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="0" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>ZIKEJI</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>Remotely_Desktop.exe</Data> 
  <Data>2020.12.19.2323</Data> 
  <Data>5fbf100e</Data> 
  <Data>mrwebrtc.DLL</Data> 
  <Data>0.0.0.0</Data> 
  <Data>5f745f18</Data> 
  <Data>c0000409</Data> 
  <Data>00000000005ba01d</Data> 
  <Data>9c1c</Data> 
  <Data>01d6d8e5293b3171</Data> 
  <Data>C:\Program Files\Remotely\Desktop\Remotely_Desktop.exe</Data> 
  <Data>C:\Program Files\Remotely\Desktop\mrwebrtc.DLL</Data> 
  <Data>7fb12bf0-a34d-459d-bd0a-80ca9af5828b</Data> 
  <Data /> 
  <Data /> 
  </EventData>
  </Event>

and

Fault bucket 1718468340303008667, type 5
Event Name: BEX64
Response: Not available
Cab Id: 0

Problem signature:
P1: Remotely_Desktop.exe
P2: 2020.12.19.2323
P3: 5fbf100e
P4: mrwebrtc.DLL
P5: 0.0.0.0
P6: 5f745f18
P7: 00000000005ba01d
P8: c0000409
P9: 0000000000000007
P10: 

Attached files:
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5ED9.tmp.mdmp
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER614B.tmp.WERInternalMetadata.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER615B.tmp.xml
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6159.tmp.csv
\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6199.tmp.txt

These files may be available here:
\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Remotely_Desktop_bc542052b9710f0a598dc697f52b41d90c0d6bb_f594edc0_02f39915-47d8-472e-93f9-eed5693fa77c

Analysis symbol: 
Rechecking for solution: 0
Report Id: 7fb12bf0-a34d-459d-bd0a-80ca9af5828b
Report Status: 268435456
Hashed bucket: 9b233df0af6f386037d939d9c584139b
Cab Guid: 0
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Windows Error Reporting" /> 
  <EventID Qualifiers="0">1001</EventID> 
  <Version>0</Version> 
  <Level>4</Level> 
  <Task>0</Task> 
  <Opcode>0</Opcode> 
  <Keywords>0x80000000000000</Keywords> 
  <TimeCreated SystemTime="2020-12-23T04:36:26.9976969Z" /> 
  <EventRecordID>73726</EventRecordID> 
  <Correlation /> 
  <Execution ProcessID="0" ThreadID="0" /> 
  <Channel>Application</Channel> 
  <Computer>ZIKEJI</Computer> 
  <Security /> 
  </System>
- <EventData>
  <Data>1718468340303008667</Data> 
  <Data>5</Data> 
  <Data>BEX64</Data> 
  <Data>Not available</Data> 
  <Data>0</Data> 
  <Data>Remotely_Desktop.exe</Data> 
  <Data>2020.12.19.2323</Data> 
  <Data>5fbf100e</Data> 
  <Data>mrwebrtc.DLL</Data> 
  <Data>0.0.0.0</Data> 
  <Data>5f745f18</Data> 
  <Data>00000000005ba01d</Data> 
  <Data>c0000409</Data> 
  <Data>0000000000000007</Data> 
  <Data /> 
  <Data>\\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER5ED9.tmp.mdmp \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER614B.tmp.WERInternalMetadata.xml \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER615B.tmp.xml \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6159.tmp.csv \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER6199.tmp.txt</Data> 
  <Data>\\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_Remotely_Desktop_bc542052b9710f0a598dc697f52b41d90c0d6bb_f594edc0_02f39915-47d8-472e-93f9-eed5693fa77c</Data> 
  <Data /> 
  <Data>0</Data> 
  <Data>7fb12bf0-a34d-459d-bd0a-80ca9af5828b</Data> 
  <Data>268435456</Data> 
  <Data>9b233df0af6f386037d939d9c584139b</Data> 
  <Data>0</Data> 
  </EventData>
  </Event>

AppCrash_Remotely_Desktop_bc542052b9710f0a598dc697f52b41d90c0d6bb_f594edc0_02f39915-47d8-472e-93f9-eed5693fa77c.zip

I've attached the mentioned Report.wer file (the other temp files references weren't in the temp folder).

bitbound commented 3 years ago

Faulting module name: mrwebrtc.DLL, version: 0.0.0.0, time stamp: 0x5f745f18

Yup. That's Microsoft's MixedReality WebRTC library. I can report it in their repo, but I can't fix it. To work around it, I'll need to make some changes so there's an option to not even initialize it. Currently, even with WebRTC turned off, it will still initialize the library, just not try to connect.

CaseyBlackburn commented 3 years ago

Just wanted to tag onto this issue. I'm experience the same issues and have the same Event Viewer error messages. I was getting Remotely a test to see if I should deploy it. I've got this issue occurring on one of my test machines running Windows 10 ver 2004 (build 19041.685). However it also works fine on different machine running that same version and build. So I don't think the version of Windows is a good qualifier for this issue to appear. Looking forward to a fix and this project seems wonderful otherwise, looking forward to deploying.

zikeji commented 3 years ago

I wanted to update this because I found something odd:

When I use my laptop or desktop itself I get the "Reconnecting" issue and the inability to control.

When I connect using my phone it works more or less fine, aside from my second monitor which shows up as black.

bitbound commented 3 years ago

I can't fix the error itself. It's occurring in the WebRTC library, which belongs to Microsoft. They have some open issues related to crashes already, so it might be fixed in a future release. The crashes I saw reported were related to audio initialization, particularly when the machine doesn't have an audio input device.

I've used it on VMs and other devices that didn't have a mic, though, and it didn't crash. So whatever's happening is probably driver-related.

For now, I've put a per-device WebRTC setting on the Edit Device page. By default, it will use whatever the organization's setting in. Or you can override it to disabled or enabled. If it's disabled, it won't try to initialize the WebRTC library at all. That might fix it. This is in the latest release, along with some other things.

If it doesn't fix it, the only thing I could do is remove WebRTC entirely, or find another library. There are very few WebRTC libraries out there for .NET, and none of them are in a usable state. Even if there were, I don't have time to switch out libraries.

In the future, I'd recommend posting logs with any issue. Server logs, agent logs, Event Viewer logs. Everything you can find.

CaseyBlackburn commented 3 years ago

In my test case computer that was experiencing this issue it now appears to be working after upgrading and disabling the WebRTC setting specifically for that device. Thank you!

bitbound commented 3 years ago

No problem! Glad it worked out. :)

lincoln131 commented 3 years ago

Worked for me, too! Thanks!