rive-app / rive-react

React runtime for Rive

Home Page:https://rive-app.github.io/rive-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rive.wasm 404 Not Found

smarais97 opened this issue · comments

Hi everyone, first time trying Rive in React.

I ran the npm install command for react-canvas as specified. I added my .riv file (The hamburger menu example one) and after importing as per the docs and running npm start, I get a blank screen. When looking at the logs I get the following error:
Failed to load resource: the server responded with a status of 404. https://unpkg.com/@rive-app/canvas@1.0.0/rive.wasm

image

When accessing that URL:
image

I can see that this URL is generated in Rive.js with RuntimeLoader.wasmURL. Is the correct URL:
https://unpkg.com/rive-canvas@latest/rive.wasm

And if so what can I do to make sure that it selects an existing rive.wasm file and not one that doesn't exist.

The code:
image

Package installed:
npm i --save @rive-app/react-canvas

If you can downgrade for your project. 3.0.22 has this bug. At least It must be solved as 1.0.82 version must be imported wasm file. You can downgrade 3.0.20
"@rive-app/canvas": "^1.0.82",
"@rive-app/react-canvas": "3.0.20",

Really odd! We were doing some dependency upgrades here with some recent changes to the underlying WASM file in the JS runtime (@rive-app/canvas). Can you try with 3.0.23 that released today?

Thanks for raising this, @smarais97 .

Thanks for the replies guys! After the latest update, it is working correctly.

All the best.