Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadRiveFile Error e.includes is not a function #345

Open
zzkkui opened this issue Feb 18, 2024 · 0 comments
Open

loadRiveFile Error e.includes is not a function #345

zzkkui opened this issue Feb 18, 2024 · 0 comments

Comments

@zzkkui
Copy link

zzkkui commented Feb 18, 2024

Hi, I have a problem. my .riv file is in local, and It's packaged into base64,in dev,the loadRiveFile is work,but in prod,the loadRiveFile is not work.

i guess there's something wrong with fetch.

image
65d1eaa2de9605000108b819

this is my code

import riveWASMResource from '@rive-app/canvas/rive.wasm'
import {useRive, RuntimeLoader} from "@rive-app/react-canvas"

import loadingRiv from "src/static/pic/rive/loading.riv"

RuntimeLoader.setWasmUrl(riveWASMResource)

const Loading = () => {
    const {RiveComponent} = useRive(
        {
// loadingRiv is packaged to base64
            src: loadingRiv,
            autoplay: true,
            // stateMachines: "State Machine 1"
            onLoadError: () => console.log("ERROR LOADING RIVE"),
            onLoad: () => console.log("LOADED RIVE"),
        },
        {
            fitCanvasToArtboardHeight: true,
        }
    )
    return (
         <div>
              <RiveComponent style={{width: "120px", height: "120px"}} />
        </div>
    )
}

@rive-app/react-canvas @4.7.1
@rive-app/canvas @2.9.2

By the way, does rive support ie11

thanks

rive-engineering pushed a commit that referenced this issue Dec 5, 2024
This pull request addresses the following GitHub issues and more:
- [rive-ios #345](rive-app/rive-ios#345)
- [rive-react-native #268](rive-app/rive-react-native#268)

Thanks to some help from @luigi-rosso, we discovered that the iOS runtime build scripts were _not_ including the Yoga renames, causing a collision when some frameworks were statically linked in React Native environments.

This has been tested locally, and works, but the real test will be the public.

Diffs=
437688c18e Add yoga renames to non-v2 lua build scripts (#8693)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant