Blank window in webterminal

Hi there,

Just received my PiKVM V4 plus and following the quick start guide. I got to the changing the default passwords part, but when I click the Terminal button, a new window opens, but it stays completely blank. There’s no text (I tried copy/paste into a scratchpad). There are no error messages, and HTTP response was 200. Ctrl+U doesn’t show any page source (it actually doesn’t work at all.) My browser is Firefox 128.13.0esr (64-bit)

Any help would be highly appreciated.

Can you give it a try in Google Chrome? Otherwise you can try logging in via SSH and run pikvm-update to get the latest versions of all software. If that doesn’t help see below.

Did you wait until the red activity LED on the device calmed down before doing the initial configuration? There are some processes that run on the first boot that if interrupted can cause some strange behaviors, it might be best to reimage the microSD and then after the first boot (you’ll see the OLED light up), let it sit for 15-30 minutes and then log in and proceed with the configuration.

I would rather not. I’ve successfully ditched all Google products and can’t be happier about it.

What is the problem with the web terminal? Firefox is a major player in browser market and any web app worth it’s salt should be working with it.

That didn’t help.

Honestly, I don’t remember. I was looking at the device screen, waiting for the IP address to show up.

That didn’t help either. Any other ideas?

Are you able to SSH in as root and get a shell session?

If something happened to the shell RC file you might have issues with SSH as well, if it is simply the webterminal not showing in Firefox we should be able to reproduce that pretty easily, but I just opened the Terminal from the post-login page as well as the windowed terminal from the KVM page in Firefox without issues. Do you get an error message or a warning?

Yes, both as root and a non-root user.

No error messages, no warnings, just a blank black window instead of a terminal. I’ve tried the usual webapp troubleshooting song and dance – disabled plugins, made sure JavaScript is enabled, cleared the cookies – didn’t make any difference.

If you open the javascript console/developer tools before you try to open the terminal, do any errors show up when the terminal opens but is blank?

There are errors on the console:

XHR GET https://192.168.1.6/extras/webterm/ttyd/token/               [HTTP/2 404 5ms]
[ttyd] websocket connection opened ttyd:2:582608
[ttyd] WebGL renderer loaded ttyd:2:586868
[ttyd] setting Unicode version: 11 ttyd:2:585852
WebGL warning: drawElementsInstanced: Drawing to a destination rect smaller than the viewport rect. (This warning will only be given once)
Blocked https://192.168.1.6/extras/webterm/ttyd/ from extracting canvas data because no user input was detected. ttyd:2:236351
Blocked https://192.168.1.6/extras/webterm/ttyd/ from extracting canvas data because no user input was detected. ttyd:2:235463
Blocked https://192.168.1.6/extras/webterm/ttyd/ from extracting canvas data because no user input was detected. 104 ttyd:2:236351
Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: https://192.168.1.6/extras/webterm/ttyd/
Source Map URL: app.c08ea5ee2370501004dc.js.map

None of it makes sense: https://192.168.1.6/extras/webterm/ttyd/token/ returns 200 if I try to access it in another tab.

Can you try doing a pikvm-update and see whether that clears up the issue? There was a recent incompatibility with a libwebsockets update that if you are on the affected version might be causing issues.

I did, and apparently it’s already on the latest:

================================
Your PiKVM is already up-to-date
================================

No, it didn’t clear up the issue.

Do you get the same behavior in other browsers, Edge or Chrome or Chromium or Safari? Or even on a mobile browser from your phone?

In my experience, Firefox often does not work as expected with WebRTC apps. I also see that when I try to do video conferences like Big Blue Button, Jitsi or Whereby. Usually, switching to chromium makes things immediately work.

But, my PiKVM leaves an empty screen (“no input”) in chromium as well.

Greetings, Marc

Okay, I bit the bullet and installed Chromium. The web terminal works there. My investigation concluded that web term doesn’t play nice with Firefox built-in privacy protection settings. It blindly assumes that HTML5 canvas is freely accessible and when the browser denies that due to the widespread canvas fingerprinting, whatever web framework is being used craps its pants.

As a workaround:

  1. open about:config in a new tab in Firefox
  2. check that privacy.resistFingerprinting is set to true
  3. if so, add PiKVM IP address or domain name to the comma separated list inprivacy.resistFingerprinting.exemptedDomains

It is safe to exempt in this case because the code is loaded directly from PiKVM and not from a 3rd party service.

Awesome, thanks for sharing your solution, that makes a lot of sense and we should definitely add it to the FAQs.