✅ Solved: Could not load Rive WASM file /rive_fallback.wasm
I am using "@rive-app/react-webgl2": "^4.21.4"
'use client';
import { Alignment, Fit, Layout, useRive } from '@rive-app/react-webgl2';
export const RiveDemo = () => {
const { RiveComponent } = useRive({
// Load a local riv `clean_the_car.riv` or upload your own!
src: 'swd3.riv',
// Be sure to specify the correct state machine (or animation) name
stateMachines: 'Timeline 1',
// This is optional.Provides additional layout control.
layout: new Layout({
fit: Fit.FitWidth, // Change to: rive.Fit.Contain, or Cover
alignment: Alignment.Center,
}),
autoplay: true,
});
return <RiveComponent />;
};
And I am trying to get this to work. With the react-canvas renderer I had no such problems. Except I wish to use the vector feathering functionality and for that I am now switching to webgl2 rendered.
The entire error from console:
Error: Could not load Rive WASM file from https://cdn.jsdelivr.net/npm/@rive-app/webgl2@2.30.1/rive_fallback.wasm or https://cdn.jsdelivr.net/npm/@rive-app/webgl2@2.30.1/rive_fallback.wasm.
Possible reasons:
- Network connection is down
- WebAssembly is not supported in this environment
- The WASM file is corrupted or incompatible
Error details:
- Type: Error
- Message: Request to https://cdn.jsdelivr.net/npm/@rive-app/webgl2@2.30.1/rive_fallback.wasm blocked due to missing consent
- WebAssembly-specific error: false
To resolve, you may need to:
1. Check your network connection
2. Set a new WASM source via RuntimeLoader.setWasmUrl()
3. Call RuntimeLoader.loadRuntime() again
at createUnhandledError (http://localhost:3001/_next/static/chunks/node_modules_next_dist_client_43e3ffb8._.js:879:71)
at handleClientError (http://localhost:3001/_next/static/chunks/node_modules_next_dist_client_43e3ffb8._.js:1052:56)
at console.error (http://localhost:3001/_next/static/chunks/node_modules_next_dist_client_43e3ffb8._.js:1191:56)
at http://localhost:3001/_next/static/chunks/node_modules_4209e374._.js:8773:37