Menu

1 / 2

Our crash reporter's first day: three web standards that killed boot on old Android WebViews

DEV Community: android·Dumb Game Lab·about 18 hours ago
#uOgXrv3T
#devtoandroid#devto#dev#game#reporter
Reading 0:00
15s threshold

We run about a dozen small HTML5 games wrapped as Android apps. Last week we finally put a crash reporter in all of them: a tiny script at the very top of <head> that sends any uncaught error to our own worker.

The first day of data had a pattern we didn't expect. The top boot crashes weren't bugs in our game code. They were standard functions that simply don't exist on older Android WebViews:

CanvasRenderingContext2D.roundRect — killed boot in our claw machine game. We use it for rounded buttons and the share card.

Array.prototype.at — arr.at(-1) is so convenient that it crept into a dozen places.

structuredClone — used to copy save data in two tycoon games.

All three work on any phone from the last couple of years, and that's why our own testing never caught them. Players on older devices (still around Chrome 90 inside the WebView) got a white screen and left. No review, no report. The reporter was the first time we saw them at all.

What we did

We didn't patch each game.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.