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

Cannot read property 'code' of undefined at valueUnpacker #4260

Closed
devoren opened this issue Mar 22, 2023 · 9 comments
Closed

Cannot read property 'code' of undefined at valueUnpacker #4260

devoren opened this issue Mar 22, 2023 · 9 comments
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android

Comments

@devoren
Copy link

devoren commented Mar 22, 2023

Description

After upgrading from 2.14.4 to 3.0.2 this problem appears:

Screenshot_1679503385

Steps to reproduce

  1. Update the library to the latest version in an existing application.
  2. Run on Android

Snack or a link to a repository

NA

Reanimated version

3.0.2

React Native version

0.71.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

Pixel 4 API 31

Acknowledgements

Yes

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

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 the Missing info The user didn't precise the problem enough label Mar 22, 2023
@github-actions
Copy link

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or a link to a repository section.

@github-actions github-actions bot added the Platform: Android This issue is specific to Android label Mar 22, 2023
@tomekzaw
Copy link
Member

@devoren, did you run yarn start --reset-cache or npm start -- --reset-cache before submitting this issue?

@devoren
Copy link
Author

devoren commented Mar 23, 2023

yeah you were right, but now another error (i use FrameProcessor in react-native-vision-camera):
ReferenceError: Property '_setGlobalConsole' doesn't exist

@tomekzaw
Copy link
Member

@devoren, did you check issues in react-native-vision-camera repository?

As @mrousavy said in mrousavy/react-native-vision-camera#1210 (comment), Vision Camera v2 doesn't support Reanimated v3, so please upgrade to Vision Camera v3. Moreover, we will be working on integrating Vision Camera v3 with Reanimated v3 so stay tuned!

@devoren
Copy link
Author

devoren commented Mar 23, 2023

@tomekzaw Thanks a lot for the quick and clear answer!

@erksch
Copy link

erksch commented Jul 13, 2023

I also get the error

Cannot read property 'code' of undefined at valueUnpacker 
  • React Native: 0.71.3
  • RN Babel Plugin: 0.73.7
  • Reanimated: 3.0.2

I cleared my metro cache many times.

Are there any other ideas for a solution?

@julian-dotcom
Copy link

Resetting the cache worked for me! (yarn start --reset-cache or npm start -- --reset-cache)

@tomekzaw
Copy link
Member

Solution

Read the docs. Installation

Step 1: Install the package

yarn add react-native-reanimated
npm install react-native-reanimated
npx expo install react-native-reanimated

⚠️ Step 2: Add Reanimated's babel plugin

babel.config.js

 module.exports = {
   presets: ['module:metro-react-native-babel-preset'],
+  plugins: ['react-native-reanimated/plugin'],
 };

⚠️ Step 3: Clear Metro bundler cache

yarn start --reset-cache
npm start -- --reset-cache
npx expo start -c

@software-mansion software-mansion locked as resolved and limited conversation to collaborators Nov 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

4 participants