rive-webgl icon indicating copy to clipboard operation
rive-webgl copied to clipboard

Uncaught TypeError: Cannot read properties of null (reading 'oe')

Open iamargentum opened this issue 3 years ago • 7 comments

Hi all!

I'm displaying a animation that I created using Rive in a simple HTML page. I'm not using any frameworks, just plain JS.

The animation takes some time to load, but once loaded works perfectly. It has one state machine and the inputs for it work as expected, creating the animation effect that I am looking for.

Today, when I opened the console, I could see this error - Screenshot from 2022-04-22 11-33-17

The number of times that the Error is logged to the console is not just 2204 (as seen in the screenshot), it never stops and the number keeps on piling up. I think this is getting a bit heavy on my machine as I can hear the fans going on full speed once the animation is loaded.

I can confirm that a month ago, I didn't see these errors.

If it makes any difference, I'm serving the .riv file from a local file server written using flask in python.

iamargentum avatar Apr 22 '22 06:04 iamargentum

Hi @iamargentum. I think you should be using https://unpkg.com/@rive-app/webgl to pull in the Rive runtime package. Take a look at the README for our rive-wasm runtime https://github.com/rive-app/rive-wasm for more details.

caudetgit avatar Apr 22 '22 17:04 caudetgit

Already using that to pull in the Rive runtime package <script src="https://unpkg.com/@rive-app/webgl"></script>

iamargentum avatar Apr 23 '22 09:04 iamargentum

@iamargentum If you want to share your HTML/JS with us, we can take a look. You can log a Support ticket here and share your code with us there. Thanks!

caudetgit avatar Apr 25 '22 19:04 caudetgit

Hello, we are getting the exact same error. We are using Vue and your example from the quick start guide.

KajsaEklof avatar Apr 28 '22 15:04 KajsaEklof

Sorry you're running into these issues! @iamargentum or @KajsaEklof , do you mind providing a .riv file that you're testing against with the @rive-app/webgl dependency to get these errors, so we can debug on our side? Or if it's hosted on a CDN somewhere or posted to the community, a link to the community post would help too!

If you don't want to provide it here on Github issues, you can submit it via the support form @caudetgit linked above.

In the meantime, can you try switching from @rive-app/webgl to @rive-app/canvas. We're updating our docs to make this the default dependency for now.

zplata avatar Apr 28 '22 16:04 zplata

I'm so sorry @caudetgit i couldn't reply for the past two days. I've logged a support ticket on the link that you've mentioned, also, uploaded the .riv file with the ticket. @caudetgit and @zplata, here is a gist with the code files and this is a link for the .riv file

I am using a local file server to serve the .riv file, which is why line #4 in index.js in the gist points to a localhost url

@KajsaEklof, I'm glad that I'm not the only one facing this!

iamargentum avatar Apr 28 '22 17:04 iamargentum

Hey @iamargentum @KajsaEklof - thanks for raising the issue! This should be patched in the latest version of @rive-app/webgl (v1.0.46), or if you don't specify a version, it should just be working now (however, I recommend sticking to a specific version).

zplata avatar Apr 29 '22 17:04 zplata