Remote Viewer disconnects immediately with "The connection has been disconnected from the device": network and permission troubleshooting steps
Android
When Remote Viewer attempts to connect to a device, the session disconnects immediately with the message "The connection has been disconnected from the device."
Why this happens
Remote Viewer uses WebRTC to stream the device screen to the Esper Console. An immediate disconnect usually means one of three things: the device's network is blocking WebRTC traffic or Esper's relay endpoints, a screen-capture permission dialog appeared on the device and was not accepted, or the Esper Agent process needs to be restarted to re-establish its streaming capability.
Steps to resolve
- Reboot the device from the Esper Console. Navigate to Devices & Groups → [Device Name] → Actions → Reboot. A reboot clears any stale Esper Agent state that can block the WebRTC handshake. Wait 2–3 minutes for the device to fully restart and reconnect, then retry the Remote Viewer session.
- Watch the device screen for a permission prompt during the connection attempt. Open Devices & Groups → [Device Name] → Remote Viewer and click Connect while observing the physical device. If a dialog such as "Allow [app] to capture your screen?" appears, it must be accepted for the session to proceed. For unattended or kiosk devices, coordinate with on-site personnel to accept the prompt at the moment you initiate the connection.
- Test the connection on a different network. Move the device to a network without proxy or firewall restrictions — a mobile hotspot works well for this test. Retry the Remote Viewer session from Devices & Groups → [Device Name] → Remote Viewer → Connect. If the session connects successfully on the alternate network, the primary network is blocking WebRTC traffic or Esper's STUN/TURN relay endpoints. Provide your IT or network team with Esper's relay endpoint addresses (available in the Esper documentation or from Esper Support) and request that WebRTC traffic is permitted.
-
Collect a bug report if the issue continues. Navigate to Devices & Groups → [Device Name] → Actions → Bug Report. Review the output for errors tagged
MediaProjectionorRemoteViewer. Simultaneously, capture a logcat from the device while reproducing the disconnect:
Filter for the tagsadb logcat -d > remoteviewer_logcat.txtEsperAgent,EsperSDK,MediaProjection, andRemoteViewerto isolate relevant entries.
Verify: After completing these steps, the Remote Viewer panel in the Esper Console should display a live screen stream from the device. The session should remain stable without an immediate disconnect, and touch input and screenshot controls should be active.
If this doesn't resolve it
Contact Esper Support and include the following information so the issue can be investigated without delay:
- Device serial number or Esper device ID
- Esper Agent version, visible under Devices & Groups → [Device Name] → Device Info → Agent Version
- Android OS version
- Network topology details: proxy configuration, firewall rules, and NAT type
- Whether the issue reproduces on an alternate network (hotspot test result from Step 3)
- Logcat output and bug report from the failed connection attempt
- Number of affected devices and whether the issue began after a specific change (network, OS update, Esper Agent update)
Still need help?
If the Remote Viewer connection issue persists after reviewing network and permission settings, please submit a support ticket and include your device's network configuration, firewall rules, and any error logs from the time of disconnection.
Please sign in to leave a comment.
Comments
0 comments