Troubleshooting

If you’re experiencing any issues with Connect, this section helps you diagnose and fix them. It also explains how to view logs for the Connect client and its WayVNC server.

Known issues

  • Multiple displays. Screen sharing only supports sharing a single, primary display. If your Raspberry Pi is connected to more than one HDMI display, Connect sometimes shares the secondary display. To work around this, right-click the desktop, select Desktop Preferences…​, and change the location of the taskbar.

  • Older browsers. Connect needs a browser that supports ECMAScript 2022 (ES13).

  • Intercepted keys. Browsers intercept some keys and key combinations, so you can’t enter them in a Connect window. Screen sharing includes buttons for the most common ones. For more information, see Use the screen-sharing interface.

  • Updating over a remote shell. Updating Connect ends all remote shell sessions, and stops an update that was started from one. For more information, see Update over a remote shell.

  • Upgrading from version 1 to version 2. Before you switch between rpi-connect and rpi-connect-lite, upgrade the package you currently have installed, so that Connect’s services migrate to the version 2 format. If you have rpi-connect installed, run the following command and enter your password if prompted:

    $ sudo apt install --only-upgrade rpi-connect

    If you have rpi-connect-lite installed, run the following command instead:

    $ sudo apt install --only-upgrade rpi-connect-lite

    During the upgrade, output similar to the following shows that the services have migrated:

    Replacing globally-enabled rpi-connect services with user-enabled ones...

Diagnose problems with rpi-connect doctor

The rpi-connect doctor command checks that your device meets the requirements for screen sharing, and that Connect can communicate on your network. It works with both Connect and Connect Lite.

Run the following command on the device:

$ rpi-connect doctor

If all the checks pass, the output is similar to the following:

Screen sharing is supported by this version of rpi-connect
✓ Wayland compositor available
✓ Screen sharing services enabled and active
✓ Communication with Raspberry Pi Connect WebSocket server
✓ Communication with Raspberry Pi Connect API
✓ Authentication with Raspberry Pi Connect API
✓ Peer-to-peer connection candidate via STUN
✓ Peer-to-peer connection candidate via TURN

If a check fails, it’s marked with ✗, often with a suggested fix. For example:

Screen sharing is supported by this version of rpi-connect
✓ Wayland compositor available
✗ Screen sharing services enabled and active - Please run rpi-connect on to enable and start all required services
✓ Communication with Raspberry Pi Connect WebSocket server
✓ Communication with Raspberry Pi Connect API
✓ Authentication with Raspberry Pi Connect API
✓ Peer-to-peer connection candidate via STUN
✓ Peer-to-peer connection candidate via TURN

✗ Some checks failed

On Connect Lite, the first line of the output says that screen sharing isn’t supported by this version of rpi-connect, and there are no Wayland or screen-sharing service checks.

For failed screen-sharing checks, see Screen sharing not available. For failed communication checks, see Networking and firewall issues.

Common issues

Screen sharing not available

If Connect says that screen sharing is unavailable, the device doesn’t meet one or more requirements for screen sharing. Run rpi-connect doctor to find out which.

If the screen-sharing service repeatedly fails to run, check its status in more detail:

$ systemctl --user status rpi-connect-wayvnc.service
$ journalctl --follow --user-unit rpi-connect-wayvnc.service

If the service fails to start or doesn’t exist, make sure that:

  1. You’re using rpi-connect version 1.1.0 or later.

  2. You’re using rpi-connect, not rpi-connect-lite, which doesn’t support screen sharing.

  3. You’re using a Wayland compositor such as wayfire or labwc, not X. You can change this in the Advanced Options in raspi-config.

  4. You’re using a desktop environment that WayVNC supports, such as Raspberry Pi Desktop. For example, KDE uses the kwin compositor, which isn’t supported.

  5. A graphical desktop session is running as the same user that signed in to Connect. Raspberry Pi OS with desktop signs in to the desktop automatically by default. If you’ve turned off auto login, sign in on the device. For the trade-offs, see Keep Connect running when you’re signed out.

Can’t connect after restarting or ending an SSH session

The Connect client runs as part of your user account, so it only runs while that user has an active login session. If you want remote shell access without keeping another session signed in, keep Connect running when you’re signed out.

Screen sharing can only share an existing desktop session; it doesn’t start a new one. If you’ve turned off desktop auto login, someone must sign in on the device after each restart. For the trade-offs, see Keep Connect running when you’re signed out.

Networking and firewall issues

Connect usually works without any changes to your network or firewall. However, especially restrictive networks can block it. Run rpi-connect doctor to check that Connect can communicate on your network.

If any communication checks fail, ask your network administrator to allow the following connections:

  • HTTPS requests on port 443 to the Connect API and WebSocket server: api.connect.raspberrypi.com and ws.connect.raspberrypi.com.

  • Requests on UDP port 3478 to all of the following STUN and TURN servers:

    • stun.raspberrypi.com

    • turn1.raspberrypi.com

    • turn2.raspberrypi.com

    • turn3.raspberrypi.com

  • Requests on TCP port 3478 or 443 to all of the following TURN servers:

    • turn1.raspberrypi.com

    • turn2.raspberrypi.com

    • turn3.raspberrypi.com

  • Requests on UDP port 3478, 443, or 49152–65535 to all of the following TURN servers:

    • turn1.raspberrypi.com

    • turn2.raspberrypi.com

    • turn3.raspberrypi.com

Remote update failures

If deploying a script artefact or an A/B boot update fails, check the following common faults and fixes. You can also refer to the rpi-image-gen documentation, or ask on the Raspberry Pi Troubleshooting forum.

To find more information about an error, open a remote shell on the device and view the systemd journal with journalctl. For a script artefact, journalctl -t rpi-ota-connector shows the script’s output.
Problem Suggested fix

download: retry

The recipient device can’t reach the update file. Check that the device still has internet access.

For a device in an organisation that uses a self-hosted artefact, open a remote shell on the device, then use curl to check whether the device can reach the address in the artefact’s URI. For example:

$ curl -I http://192.168.0.1:8080

zstd: Unknown frame descriptor

The file isn’t Zstandard-compressed. Make sure that you deployed a .tar.zst artefact. For an A/B boot update, deploy the .tar.zst update file, not the .img full image file. For a self-hosted artefact, check that the URI points to the .tar.zst file.

tar: Bad magic - not a tar archive

The file is Zstandard-compressed, but isn’t a tar archive. Build the artefact with otamaker or rpi-image-gen.

Flashing failed: Download has no useful content

The artefact is a valid .tar.zst file, but contains nothing the device can apply. Check that you built it with otamaker or rpi-image-gen.

Update requires an A/B image

You deployed an A/B boot update to a device that doesn’t have an A/B boot layout. Prepare the device for A/B boot first, or use a script artefact instead.

Download failed: Hash mismatch

The file’s contents don’t match its SHA-256 checksum. For a self-hosted artefact, check that the checksum you entered matches the file, for example with sha256sum. For an uploaded artefact, upload it again.

The deployment shows as Invalidated, with the reason File expired.

Connect keeps an uploaded artefact for two hours, then deletes it, and the device didn’t download the file before then. The deployment is marked Invalidated when the device next asks to start it; until then, it shows as Queued. Check that the device is online, then upload and deploy the artefact again.

A script artefact deployment shows as Failed.

The script reported a failure or didn’t complete. View the script’s output with journalctl -t rpi-ota-connector to find out why.

No Deploy button appears next to the device.

Check the following:

  • The device isn’t opted in to remote updates. Opt in with the following command, then refresh your browser:

    $ rpi-connect ota on
  • You’re a member of an organisation, not an administrator. Only administrators can deploy remote updates.

  • The organisation’s trial has ended without billing set up. Set up your subscription to deploy updates again.

Logs

Turn on detailed logging

You can turn on debug logging for both the Connect client and its dedicated WayVNC server, for a detailed record of what Connect does on your Raspberry Pi.

Detailed logging for the Connect client

Add the environment variable RPI_CONNECT_VERBOSE=1 to /etc/default/rpi-connect, then restart Connect:

$ rpi-connect restart

For Connect versions earlier than 2.7, override the rpi-connect service definition instead:

  1. Run the following command:

    $ systemctl --user edit rpi-connect
  2. Enter the following lines between the comments:

    [Service]
    ExecStart=
    ExecStart=/usr/bin/rpi-connectd -socket %t/rpi-connect-wayvnc.sock -v

    If you use Connect Lite, use the following line instead of the second ExecStart= line:

    ExecStart=/usr/bin/rpi-connectd -v
    You need both lines that begin with ExecStart=.
  3. Restart Connect:

    $ rpi-connect restart
Detailed logging for the WayVNC server
  1. Override the rpi-connect-wayvnc service definition:

    $ systemctl --user edit rpi-connect-wayvnc
  2. Enter the following lines between the comments, including the -Ldebug flag:

    [Service]
    ExecStart=
    ExecStart=/usr/bin/rpi-connect-env /usr/bin/wayvnc --config /etc/rpi-connect/wayvnc.config --render-cursor --unix-socket --socket=%t/rpi-connect-wayvnc-ctl.sock -Ldebug %t/rpi-connect-wayvnc.sock
    You need both lines that begin with ExecStart=.
  3. Restart Connect:

    $ rpi-connect restart

View logs

To view logs for the Connect client and its WayVNC server, run the following command:

$ journalctl --follow --user-unit rpi-connect.service --user-unit rpi-connect-wayvnc.service

To check whether the client is running and signed in, see Check the Connect client’s status.