Skip to content

Improve user experience with better errors. #592

@supervoidcoder

Description

@supervoidcoder

If you remember that one story back in november where Apple pushed a stupid update called 18.7.2 under build 22H123 that broke literally every aspect of WebGL in the entire system (like not kidding LITERALLY EVERYTHING).

One day, I was opening  OmniBlocks on my iPad. That's weird. The VM crashed. I tried to look it up and I went panicking to my codebase thinking I had screwed the code up or maybe one of my collaborators had pushed a stupid commit to main. But before doing that... I checked. I went to turbowarp. It crashed too. Same error. Scratch? Boom, same thing! Scratch doesn't give you the technical error, but it still crashed. Penguinmod? Boom. Ampmod? boom. then I tried doing a webgl test online where EVERY. SINGLE. TEST. FAILED. why was this happening? I KNOW for sure that Scratch and every one of its mods has a specific modal for when it detects having no WebGL, telling you that your browser doesn't support WebGL. But this time it didn't show up. I looked up what was happening, and it turned out that Apple, yes, Apple, was the one who pushed a stupid update called  18.7.2 that completely broke WebGL on the system. All of it. Anything using WebGL broke. It turns out that this build, build 22H123, was entirely broken. They pushed a silent fix sneakily under the same version number but under a different build, now called build 22H124. Unfortunately, my iPad didn't get that silent fix until like 2 months after first discovering this. But back to the problem, why didn't it showed the modal? Aha! Webkit was lying all along! Webkit (and therefore Safari) kept telling sites that WebGL was supported. Then those sites tried to compile a shader, and it didn't work, so they crashed. I created a new modal to test if the website was lying about WebGL working, but not actually working. And it works! Now even though OmniBlocks was still broken, at least my iPad showed a nice little modal with a little frown face image than showing an ugly VM error.

So under PR #390 and issues #393 and #367, I added a new modal that gives you more specific stuff (/src/components/webgl-broken-modal/webgl-broken-modal.jsx) alongside the existiing broken modal. This improved the user experience by showing a modal instead of an ugly vm error, but I was wondering, why not do more?
We should find more errors and translate some known VM errors into less cryptic ones. I saw one where if you load a big project with barely any RAM left, the VM gave an ugly error about "blah blah out of memory". For this and other known errors, we should give a more friendly version of it!!

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions