Error on launching android app - Animated node with tag 1 does not exist

Hi Guys, My expo app works perfectly in iOS & got published to app store as well, but the android version throws this error “Animated node with tag 1 does not exist”. Can someone please explain how to fix this?

This error is thrown immediately on launch: Animated node with tag 1 does not exist.

This is my package.json for reference

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-async-storage/async-storage": "^1.14.1",
    "@react-native-community/masked-view": "0.1.10",
    "@react-navigation/native": "^5.9.3",
    "@react-navigation/stack": "^5.14.3",
    "axios": "^0.21.1",
    "expo": "^40.0.1",
    "expo-notifications": "~0.8.2",
    "moment": "^2.29.1",
    "react": "^17.0.1",
    "react-native": "^0.64.0",
    "react-native-gesture-handler": "~1.8.0",
    "react-native-pager-view": "^5.1.0",
    "react-native-paper": "^4.7.2",
    "react-native-screens": "~2.15.2",
    "react-native-status-bar-height": "^2.6.0",
    "react-native-tab-view": "^3.0.0",
    "react-redux": "^7.2.2",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0"
  },
  "devDependencies": {
    "@babel/core": "~7.9.0",
    "babel-eslint": "^10.1.0",
    "eslint": "^7.15.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-prettier": "^6.15.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-prettier": "^3.2.0",
    "eslint-plugin-react": "^7.21.5",
    "prettier": "^2.2.1"
  },
  "private": true
}

I have the exact same problem.

npm install https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz fixed the issue for me.

This worked for me also. Thanks for the tip!

1 Like

@vivekchand19 this totally worked, but sadly a contact at Expo told us not to use this fix, as it might break things in expo 40. Are there any other solutions?

Hi @kennis1. Are you also using SDK 40?

What does expo diagnostics output for you?

@vivekchand19 it turns out that the following are identical:

https://github.com/expo/react-native/archive/sdk-39.0.4.tar.gz
https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz

So does it still work for you if you use sdk-40.0.0.tar.gz instead?
Does it break if you use sdk-40.0.1.tar.gz?

The differences between sdk-40.0.0 and sdk-40.0.1 are as follows. Ignore the iOS changes (in the React directory):

Do you by any chance have a password field on the initial screen of your app?
Are you able to reproduce the crash with a new app or strip out most of the contents of your app to get a minimal app that still crashes with this error?

1 Like

Hi! I’m getting a similar error. However, instead of “tag 1” my error reads “tag 2”. I’m on expo 41.0.0. I created a new project just to test things out. All I’ve done is expo init cool-project, and I’ve setup a one-screen navigation stack: app and homescreen. Just enough to run on my phone. This error didn’t happen until I installed: @react-navigation/native, react-native-gesture-handler, react-native-reanimated, react-native-screens, react-native-safe-area-context, @react-native-community/masked-view, @react-navigation/stack. I imagine the error is connected to react-native-reanimated but that’s all I’ve figured out.

1 Like

Hi @tanpotgs

What does expo diagnostics give you?
What dependencies do you have installed and what versions?
Do you have anything on the home screen?
Just as an experiment, what happens if you specify the following as your “react-native” dependency?

https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz
1 Like

Hi, @wodin

Same error of @tanpotgs here. This is what my expo diagnostics commands gives me:

Expo CLI 4.4.3 environment info:
System:
OS: Windows 10 10.0.19041
Binaries:
Node: 12.18.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - C:\Users\Kevin\AppData\Roaming\npm\yarn.CMD
npm: 6.14.6 - C:\Program Files\nodejs\npm.CMD
npmPackages:
expo: ^41.0.0 => 41.0.1
react: ^17.0.2 => 17.0.2
react-dom: 16.13.1 => 16.13.1
react-native: ^0.64.0 => 0.64.0
react-native-web: ~0.13.12 => 0.13.18
react-navigation: ^4.4.3 => 4.4.4
Expo Workflow: managed

How do I specify that resource (https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz) as my reac-native dependency? by running npm install or yarn add https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz ?

How do I specify that resource (https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz) as my reac-native dependency? by running npm install or yarn add https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz ?

you should not do that if your expo package version is 41

if you are seeing this error, you should try to create a mcve: How to create a Minimal, Reproducible Example - Help Center - Stack Overflow

note that this is likely a bug in react-native.

also, refer to https://expo.fyi/manual-debugging

Hi @kevin_va. @notbrent is of course correct (and would know far better than I what might go wrong if you did that) that you should not install the sdk-40.0.0 version of the “react-native” dependency in a project that is using version 41.x of the “expo” package. Also, if you are able to build a minimal app that reproduces the problem and that you can share then it will be much easier for someone to figure out what’s going wrong and get it fixed.

The only reason I was asking about that sort of thing was to try to get to the bottom of the symptoms being reported. But on second thoughts I think this should rather be tracked down in an SDK 40 app, since the closest thing I have yet seen to a reproduction recipe in this thread is:

  • An SDK 40 app breaks with sdk-40.0.1 version of the “react-native” dependency
  • Install the sdk-40.0.0 (or sdk-39.0.4, which happens to be identical) dependency
  • The app now works

If the above is correct, it suggests that maybe one of these changes has something to do with the problem.

If that’s true, then as long as one of the Expo team members, or another interested person (but probably not me because I don’t currently have a development environment set up to compile React Native) has an app that fails with 40.0.1 and works with 40.0.0, it will be easy to find which of the changes broke it.

After that it should in theory be pretty easy to find a fix for the problem.

@tanpotgs are you able to post your “just enough to run on my phone” app that reproduces the problem somewhere so that we can try to reproduce it too?

So, I decided to try again by creating a new project with expo init my-project --template blank and this time I used React Navigation 6.x (next).

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@react-native-masked-view/masked-view": "^0.2.4",
    "@react-navigation/native": "^6.0.0-next.2",
    "@react-navigation/stack": "^6.0.0-next.9",
    "expo": "~41.0.1",
    "expo-status-bar": "~1.0.4",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-reanimated": "~2.1.0",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.0.0",
    "react-native-web": "~0.13.12"
  },
  "devDependencies": {
    "@babel/core": "^7.9.0"
  },
  "private": true
}

I’m running expo cli 4.4.3. Everything is working this time around and I haven’t gotten any errors. The only thing I changed was the version of Navigation.

Can you post the broken version somewhere?

I had a problem “animated node with tag 2 does…” what is the solution please,i will kill this cheat

This also worked for me thank you.

I make the upgrade from SDK 40 to 41 with the comand expo upgrade on iOS simulator no problems on android the exception “Animated node with id 2 already exist”. this the expo diagnostics output and my package.json

Expo CLI 4.4.3 environment info:
    System:
      OS: macOS 11.3
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.13.1 - /usr/local/bin/node
      Yarn: 1.22.0 - /usr/local/bin/yarn
      npm: 7.11.2 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Android Studio: 4.1 AI-201.8743.12.41.6953283
      Xcode: 12.5/12E262 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^41.0.0 => 41.0.0 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz => 0.63.2 
    npmGlobalPackages:
      expo-cli: 4.4.3
    Expo Workflow: managed
{
  "name": "com.ctcavalese.app",
  "version": "17.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "eject": "expo eject"
  },
  "dependencies": {
    "@babel/plugin-transform-react-jsx-source": "^7.2.0",
    "@react-native-community/datetimepicker": "3.2.0",
    "expo": "^41.0.0",
    "expo-app-loading": "^1.0.1",
    "expo-constants": "~10.1.3",
    "expo-font": "~9.1.0",
    "expo-linking": "~2.2.3",
    "expo-notifications": "~0.11.5",
    "expo-permissions": "~12.0.1",
    "expo-web-browser": "~9.1.0",
    "moment": "^2.20.1",
    "native-base": "^2.13.12",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
    "react-native-autocomplete-input": "4.1.0",
    "react-native-elements": "^0.19.0",
    "react-native-gallery-swiper": "^1.21.0",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-masked-text": "^1.6.5",
    "react-native-modal-datetime-picker": "^9.2.0",
    "react-native-reanimated": "~2.1.0",
    "react-native-router-flux": "4.3.0",
    "react-native-screens": "~3.0.0",
    "react-native-vector-icons": "^4.2.0",
    "react-native-webview": "11.2.3",
    "react-native-windows": "0.63.24",
    "react-redux": "^5.0.6",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0"
  },
  "devDependencies": {
    "babel-eslint": "^8.2.1",
    "eslint": "^4.15.0",
    "eslint-plugin-flowtype": "^2.41.0",
    "eslint-plugin-import": "^2.8.0",
    "eslint-plugin-jsx-a11y": "^6.0.3",
    "eslint-plugin-prettier": "^2.4.0",
    "eslint-plugin-react": "^7.5.1",
    "prettier-eslint": "^8.7.4"
  },
  "private": true
}

I use this library react-native-router-flux that use react-navigation 4.4.4

── react-native-reanimated@2.1.0
└─┬ react-native-router-flux@4.3.1
  ├─┬ react-navigation-drawer@2.7.1
  │ └── react-native-reanimated@1.13.3
  └─┬ react-navigation-tabs@2.11.1
    ├── react-native-reanimated@1.13.3 deduped
    └─┬ react-native-tab-view@2.16.0
      └── react-native-reanimated@2.1.0 deduped

the problem is only on Android.

From my personal experience this looks to be an issue with react-native 0.64.0. It works fine with iOS. So after downgrading to 0.63.0 it started up for me successfully on Android.

Can someone here please provide a minimal app that reproduces the problem?

Hi,
there is official information on supported React Native version in Expo 41 announcement, in the preamble section (https://blog.expo.io/expo-sdk-41-12cc5232f2ef):

Today we’re announcing the release of Expo SDK 41 . SDK 41 includes React Native 0.63, the same version as in SDK 40. (…)

If you drill down to forum, you’ll see more info: fyi/react-native-releases.md at master · expo/fyi · GitHub

You should downgrade React Native in package.json to newest supported, which is 0.63.