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

New Bug: ReanimatedError: [Reanimated] Native part of Reanimated doesn't seem to be initialized #6849

Open
jeeva-2311 opened this issue Dec 22, 2024 · 7 comments
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@jeeva-2311
Copy link

Description

When reanimated library is added to a expo managed workflow project this error occurs. I had a project where I used the library. The project worked fine in expo go build but in the final apk and in development build, the above error is thrown. I have followed exactly as per documentation, still the error is thrown.

Note: Previous issue opened for the same issue closed stating that the bug is fixed in RNv 76.5. However the bug occurs in this version too.

my package.json.

{
"name": "teach",
"version": "1.0.0",
"main": "index.ts",
"scripts": {
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@react-navigation/native": "^7.0.14",
"@react-navigation/native-stack": "^7.2.0",
"babel-preset-expo": "~12.0.0",
"expo": "~52.0.20",
"expo-dev-client": "~5.0.6",
"expo-status-bar": "~2.0.0",
"react": "18.3.1",
"react-native": "0.76.5",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.1.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@types/react": "~18.3.12",
"typescript": "^5.3.3",
"@react-native-community/cli": "latest"
},
"private": true
}

babel.config
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin'],
};
};

metro.cofig.js
// Learn more https://docs.expo.io/guides/customizing-metro
const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config');
const { getDefaultConfig } = require('expo/metro-config');

/** @type {import('expo/metro-config').MetroConfig} */
const config = getDefaultConfig(__dirname);

module.exports = wrapWithReanimatedMetroConfig(config);
Screenshot 2024-12-22 000955

Steps to reproduce

  1. create a expo app using blank typescript template.
  2. install reanimated using npx expo install react-native-reanimated.
  3. update babel and metro config file. (Although expo documentation states that this step is not necessary. Only reanimated 4. documentation recommends this step)
  4. In the home page, define a example as per documentation.
  5. create a development build.
  6. The apk will not work.

Snack or a link to a repository

https://github.com/jeeva-2311/teacherBotTesting

Reanimated version

3.16.1

React Native version

76.5

Platforms

Android

JavaScript runtime

None

Workflow

Expo Dev Client

Architecture

None

Build type

Release app & dev bundle

Device

Real device

Device model

Google pixel 8

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided labels Dec 22, 2024
@rushant11
Copy link

@jeeva-2311 have you found out any solution?

@jeeva-2311
Copy link
Author

When you use use any of the default example templates in expo while creating a project. The example will come pre installed with reanimated and this works. So I created a new project like this and ported everything from old project to the new one. The issue lies somewhere in the expo internal linking process and I not able to pinpoint the issue. But the package works in any of the expo example templates.

@PatrickLQuirk
Copy link

I have also had issues with this bug. When I created a default expo project, the project worked for me, but when others cloned the project, installed the packages, and ran it, they got this error.

@PatrickLQuirk
Copy link

My issue is fixed. More specifically, the error had to do with certain files not being able to be found. The reason this happened for me was that some of our team members had the repository in OneDrive, and it seems OneDrive was messing with the files. Cloning the repository to a folder that is not in OneDrive fixed the issue for me.

@Bhavik-smn
Copy link

i got this error can anyone have solution of it
ReanimatedError: [Reanimated] Native part of Reanimated doesn't seem to be initialized.
See https://docs.swmansion.com/react-native-reanimated/docs/guides/troubleshooting#native-part-of-reanimated-doesnt-seem-to-be-initialized for more details. [Component Stack]

@jeeva-2311
Copy link
Author

So far you can either start the project with a expo example templates or if you are on windows, see if onedrive is syncing your folder. If it is, move out of onedrive folder and run npx expo install react-native-reanimated again

@Bhavik-smn
Copy link

So far you can either start the project with a expo example templates or if you are on windows, see if onedrive is syncing your folder. If it is, move out of onedrive folder and run npx expo install react-native-reanimated again

It's not in EXPO it's in CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

4 participants