sickcodes / Docker-OSX

Run macOS VM in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X Security Research! Docker mac Containers.

Home Page:https://hub.docker.com/r/sickcodes/docker-osx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some electron apps don't render correctly

ju-li opened this issue · comments

Has anyone encountered this issue where Electron apps aren't all rendering correctly?

For example, in my screenshot below, VSCode (an Electron app) is rendering ok.
But then BalenaEtcher (another Electron app) is just a grey blob.
I'm running a Monterey image. But have tested this in Mojave and Catalina to the exact same results.

Does anyone have a fix?

Screenshot from 2024-01-30 23-23-14

I've been using https://github.com/kholia/OSX-KVM and this has started happening to me as well, for both electron apps and websites. But, like you, it only appears to be happening on some electron apps and some websites in Safari. It seems to be similar to #738 and #647. As suggested in the thread for #647, updating Safari resolved the issue for Safari - but only for Safari itself unfortunately.

I confirmed it happening on everything from Catalina Monterey to Ventura. Catalina was definitely working with no issues for me before, but I can't personally vouch for the status of other OS versions before now. I also noticed this behavy ior in Sonoma, but Sonoma in qemu has plenty of issues so it could be unrelated there.

I suspect that this may be due to something in qemu 8.2.0. I'll attempt a downgrade and will return with results.

Alright, my suspicion was silly. Downgrading incrementally down to 7.2 didn't change anything.

Interesting. So, when you say it started happening to you, do you mean it didn't use to be an issue?

It's also strange that Electron and Safari are suffering from the same issues. I don't believe Electron uses anything from Safari since it's built on Chromium. But if upgrading Safari would fix it, maybe upgrading the Electron version would help?

For what it's worth, both Safari and Chromium have a lot of shared khtml and webkit heritage. But honestly the hackintosh/macVM world is so frustrating sometimes. The similar breakage in browser and electron feels like it could be related, but could honestly be a complete coincidence.

But to answer your question: Yep, I've been running a Catalina VM for about a year without problems. I tore it down a while ago though, and last week tried to set up a new VM with Sonoma or Ventura. I ran into this problem right away. Even if I go back to Catalina, frustratingly.

Hmm, so I'm wondering if this has anything to do with the updates that went out two weeks ago for Ventura, Sonoma, and Monterey. I've been trying to reinstall without the recent updates, but as far as I can tell, that seems to be impossible; the installer requires an internet connection, and it appears to download updates during the install.

I can't really think of anything else that would cause this kind of behavior to suddenly start. It seems pretty safely established that downgrading qemu doesn't have an effect. So I'm starting to think the cause is those new macOS updates. I'll try to figure out some kind of magic solution in the OS or qemu settings, wish me luck.

Ok I think I isolated the cause: electron-builder. Although I have no idea why it's an issue.

Balena etcher's latest version was migrated to electron-forge while the version (1.18.11) that's on their releases page was packaged using electron-builder.
The latest version renders. v.1.18.11 does not.
See screenshot below (npm run start of latest etcher on the left vs v1.18.11 etcher that I downloaded from their releases page on the right)

Screenshot from 2024-02-03 10-04-46

I tested a bunch more electron apps. Electron-builder seems to be the cause but not always the case:

  1. Aeon.technology - electron-forge - renders fine
  2. LeftOnRead - electron-builder - does not render well. lots of visual glitches
  3. Advanced Rest Client - electron-builder - renders fine
  4. Beekeeper Studio - electron-builder - does not render well. lots of visual glitches
  5. Hyper Terminal - electron-builder - does not render well. lots of visual glitches
  6. Signal Desktop - electron-builder - renders fine
  7. Boxhero - electron-forge - renders fine

Not entirely scientific but maybe certain electron-builder versions or settings are the culprit here instead of the VM settings

Ok the fix seems to be to swap electron-builder out for electron-forge. I migrated my app to electron-forge and it renders correctly in Docker-OSX now