Skip to content

Errors during makeRenderer not catchable #409

@ansf

Description

@ansf

We are using @rive-app/webgl2 in our projects. When the creation of the renderer fails, we see an error in the console, but are unable to catch it using an onLoadError callback or try/catching the Rive constructor.

The error on the console is TypeError: Cannot read properties of null (reading ’T’).

In order to let the creation of the renderer fail, one can disable hardware rendering in Chrome.

Reproducer:

  1. Navigate to "chrome://settings/system"
  2. Disable "Use hardware acceleration when available"
  3. Restart Chrome
  4. Navigate to https://jsfiddle.net/rzbp8woj/1/

Is there any way for us to implement our own fallback mechanism when the creation of the webgl2 renderer fails?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions