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

Rending issue on production

Open 3lonious opened this issue 3 years ago • 16 comments

everything works localy but when i go live there is nothing rendering.

3lonious avatar Jul 01 '22 11:07 3lonious

@3lonious Hi 👋 , caught your notes from your comments on other issues, sorry to hear you're getting blocked here!

You may have caught it from the other thread https://github.com/rive-app/rive-react/issues/97#issuecomment-1168748311

But this library does need to make a request out to retrieve a WASM file that really drives the rendering for the JS/React libs. I think it makes sense to look at a solution to make it so you can retrieve the file/store the file on your own and supply it to the high-level API, but until then, I'd be curious to learn more about why it's not rendering when you build/deploy. Do you have any network request issues when it tries to retrieve the WASM in logs of any kind (i.e is it getting blocked by your web server?)

zplata avatar Jul 01 '22 14:07 zplata

ok so here are screen shots.. both localy, you can see it render.. and then production where it wont render, but network requests look like they are comming thru 200...

Also ive set this up with useRive, and useStateMachine or whatever and exact same issue...

is there anything on the backend that needs setting up? im deploying thru github actions and amplify aws, would love to get these animiations working..

3lonious avatar Jul 01 '22 23:07 3lonious

Screen Shot 2022-07-01 at 4 35 00 PM

3lonious avatar Jul 01 '22 23:07 3lonious

Production

Screen Shot 2022-07-01 at 4 40 44 PM

3lonious avatar Jul 01 '22 23:07 3lonious

@3lonious Rive doesn't require any server-side or "backend" work, as it's a library meant to work with your client-side. So a few follow-ups:

Do you mind sharing any snippets of code on how you're setting it up? Are you hosting your .riv file? Any console errors?

zplata avatar Jul 01 '22 23:07 zplata

import Turbo from "../../../assets/rive/65-358-iron-giant-demo.riv";

import Rive, { useRive, useStateMachineInput } from "rive-react";

const { rive, RiveComponent } = useRive({ src: Mixer, autoplay: true, })

3lonious avatar Jul 02 '22 02:07 3lonious

import Turbo from "../../../assets/rive/65-358-iron-giant-demo.riv";

import Rive, { useRive, useStateMachineInput } from "rive-react";

const { rive, RiveComponent } = useRive({ src: Mixer, autoplay: true, })

3lonious avatar Jul 02 '22 02:07 3lonious

ok i found errors in console

3lonious avatar Jul 02 '22 02:07 3lonious

Screen Shot 2022-07-01 at 7 27 15 PM Screen Shot 2022-07-01 at 7 27 32 PM Scree
<img width= n Shot 2022-07-01 at 7 27 43 PM" src="https://user-images.github Screen Shot 2022-07-01 at 7 27 53 PM usercontent.com/46793692/176983428-3201162e-4e5e-4622-901a-7b03d42aa06b.png">

3lonious avatar Jul 02 '22 02:07 3lonious

Screen Shot 2022-07-01 at 7 27 43 PM

3lonious avatar Jul 02 '22 02:07 3lonious

Screen Shot 2022-07-01 at 7 27 32 PM

3lonious avatar Jul 02 '22 02:07 3lonious

Screen Shot 2022-07-01 at 7 27 07 PM

3lonious avatar Jul 02 '22 03:07 3lonious

also links to our audio mastering platform if it helps

https://chosenmasters.com/

https://pro.chosenmasters.com/register

3lonious avatar Jul 02 '22 14:07 3lonious

Any luck here? is there something that needs extra config?

3lonious avatar Jul 05 '22 17:07 3lonious

just realized you put this on the other thread... im gonna give this a try thanks :) Screen Shot 2022-07-05 at 10 03 36 AM

3lonious avatar Jul 05 '22 17:07 3lonious

my solution import Rive from "rive-react"; < Rive autoplay="true" src="https://public.rive.app/community/runtime-files/65-358-iron-giant-demo.riv / >

            you can get the url for src="" by looking thru community animations, inspect element, go to network tab and copy .riv url from network request
Screen Shot 2022-07-05 at 1 34 32 PM Screen Shot 2022-07-05 at 1 34 38 PM >

3lonious avatar Jul 05 '22 20:07 3lonious

Closing this since the issue seems to have been resolved

zplata avatar Nov 15 '22 20:11 zplata