question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React Native Web Crashes (versions > 2.6.0)

See original GitHub issue

Description

I’m working on a multi-platform project using the expo managed workflow, and I’ve been experiencing issues trying to get Reanimated 2 to work with the React Native Web build of the application.

The application crashes on Web when animations trigger, with the following error:

TypeError: e.LayoutAnimationRepository is undefined
    t createAnimatedComponent.js:151
    setLocalRef createAnimatedComponent.js:149
    default setAndForwardRef.js:7
    r index.js:22

Are there known compatibility issues with the more recent versions of the library, or have I made a mistake in my setup? I’ve included a link to a minimal repository.

Steps to reproduce

  1. Build the web app with npx expo export:web
  2. Serve the web app with npx serve web-build
  3. Open localhost:3000 and submit the form without populating the input to trigger the error message animation

Snack or a link to a repository

https://github.com/tmlamb/my-expo46-app

Reanimated version

2.9.1

React Native version

0.69.4

Platforms

Web

JavaScript runtime

No response

Workflow

Expo managed workflow

Architecture

No response

Build type

No response

Device

Real device

Device model

No response

Acknowledgements

Yes

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
tomekzawcommented, Oct 24, 2022

Hey @tmlamb, thanks for reporting this issue and sorry for late response. Using the repro you have provided I was able to reproduce the bug. I will try to investigate this issue further.

Edit: Should be fixed with #3464. See PR description for more details.

Note: Currently, Layout Animations are available only on Android and iOS. On web, they should be no-op.

2reactions
tmlambcommented, Sep 15, 2022

@marianif, I’ve also had success with running the web dev server with expo start. However, the issue seems to be specific to serving the exported production build. Have you tried the steps to reproduce from the issue description?

Build the web app with npx expo export:web Serve the web app with npx serve web-build Open localhost:3000 and perform some action in the app that triggers an animation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

CocoaPods Fails On Apple Silicon | Apple Developer Forums
Hi, I was trying to build my app on Apple Silicon on a DTK, but it fails, because the RubyGems is having some...
Read more >
My React Native App Crash After Update Target Sdk Version 31
My React Native App crashes after update target Sdk version and compileSdkVersion 31. It was working version 30. Google play forced us this ......
Read more >
Troubleshooting | React Native Gesture Handler - Open Source
Multiple versions of Gesture Handler were detected​. This error usually happens when in your project there exists more than one instance of Gesture...
Read more >
react-native-gesture-handler - npm
Experimental implementation of a new declarative API for gesture handling in react-native. Latest version: 2.8.0, last published: 2 months ...
Read more >
appcenter-crashes vulnerabilities | Snyk - Snyk Vulnerability Database
React Native plugin for AppCenter Crashes · latest version · latest non vulnerable version · first published · latest version published.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found