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

ReferenceError: requestAnimationFrame is not defined #4890

Closed
nDeavor9 opened this issue Aug 7, 2023 · 6 comments
Closed

ReferenceError: requestAnimationFrame is not defined #4890

nDeavor9 opened this issue Aug 7, 2023 · 6 comments
Labels
Important This seem to be a serious issue and we will need to take a deeper look into it some time soon Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@nDeavor9
Copy link

nDeavor9 commented Aug 7, 2023

Description

I'm using Expo SDK 49 with Router v2 and when I enable static output and export web using metro bundler, I get this error:
ReferenceError: requestAnimationFrame is not defined at JSReanimated.scheduleOnUI

This issue talks about it and this PR is what I think is initiated to solve this issue.

But it's been a month since the PR is opened and no moves are made on it yet.

If there's any work around I can do till then, please suggest. Thank you.

P.S: I'm not attaching any snack link because this issue doesn't appear during local runtime and can only be reproducible if we export it.

Steps to reproduce

  1. Install expo 49 with expo router v2.
  2. Use drawer from expo-router/drawer.
  3. Set bundler as 'metro' and output as 'static' in app.json.
  4. Try exporting it using npx expo export --platform web

Snack or a link to a repository

N/A

Reanimated version

3.3.0

React Native version

0.72.3

Platforms

Android, iOS, Web

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@nDeavor9 nDeavor9 added the Needs review Issue is ready to be reviewed by a maintainer label Aug 7, 2023
@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Aug 7, 2023
@github-actions
Copy link

github-actions bot commented Aug 7, 2023

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@github-actions github-actions bot added Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web labels Aug 7, 2023
@nDeavor9
Copy link
Author

nDeavor9 commented Aug 8, 2023

@piaskowyk Sorry for tagging directly. Can you please look into this? It's urgent.

@heythisischris
Copy link

I'm also experiencing this issue- would appreciate any help!

@awilson9
Copy link

Have a minimum reproducible example here: expo/expo#23412 (comment)

It's the same error message (ReferenceError: requestAnimationFrame is not defined)

No idea if it's related but definitely feels like it is

@Latropos Latropos added Important This seem to be a serious issue and we will need to take a deeper look into it some time soon Repro provided A reproduction with a snippet of code, snack or repo is provided and removed Missing repro This issue need minimum repro scenario labels Aug 23, 2023
@mamatsunami
Copy link

I had exactly the same issue but on Next.js.

Don't know why, but moving import "raf/polyfill"; from _app.tsx to _document.tsx fixed the issue on my app.

@piaskowyk
Copy link
Member

Should be solved by #4665

This fix is available since 3.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Important This seem to be a serious issue and we will need to take a deeper look into it some time soon Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Platform: iOS This issue is specific to iOS Platform: Web This issue is specific to web Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

6 participants