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

"Timed out waiting for modules to be invalidated" error after reloading app over metro [iOS] #2516

Closed
callmehallo opened this issue Jul 1, 2024 · 14 comments · Fixed by #2544
Labels
bug Something isn't working released

Comments

@callmehallo
Copy link

callmehallo commented Jul 1, 2024

Description

When starting the application and reloading it over metro, the app crashes with following error:

Timed out waiting for modules to be invalidated

__26-[RCTCxxBridge invalidate]_block_invoke
    RCTCxxBridge.mm:1296
decltype(std::declval<void () block_pointer __strong&>()()) std::__1::__invoke[abi:ue170006]<void () block_pointer __strong&>(&&, decltype(std::declval<void () block_pointer __strong&>()())&&...)
std::__1::__function::__func<void () block_pointer __strong, std::__1::allocator<std::__1::allocator>, void ()>::operator()()
std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const
std::__1::function<void ()>::operator()() const
facebook::react::tryAndReturnError(std::__1::function<void ()> const&)
-[RCTCxxBridge _tryAndHandleError:]
__NSThreadPerformPerform
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
__CFRunLoopDoSource0
__CFRunLoopDoSources0
__CFRunLoopRun
CFRunLoopRunSpecific
+[RCTCxxBridge runRunLoop]
__NSThread__start__
_pthread_start
thread_start

image

metro doesn't show any error or log.
there's nothing else shown inside xcode except "Timed out waiting for modules to be invalidated":

image

Background Information

  • The app seems to work after the error appearing.
  • Using RN 0.71.3, bur error is also appearing in 0.74 (RN upgrade is not merged yet)
  • The error does not show, if I don't reload the app over metro
  • versions <= 1.3.4 work fine
  • in my case all versions from 1.3.5 onwards are affected.
  • I am the only in my team of 3 people, who is affected by this error.
  • We are using react native cli
  • I already tried cleaning the project with 'react-native-clean-project'
  • also I tried connecting the iOS simulator over the dev settings with my ip adress, bc it was recommended else where

Version

1.3.5

Steps to reproduce

  1. Start App.

  2. Reload over metro. (pressing 'r' inside the metro cli)

  3. Wait 1 minute.

Snack, code example, screenshot, or link to a repository

Sadly I am not able to reproduce it in expo

I don't know if it's relevant, but here's my package.json

  "name": "App",
  "version": "0.24.0",
  "private": true,
  "scripts": {[...]}",
  "dependencies": {
    "@hookform/resolvers": "3.6.0",
    "@notifee/react-native": "7.8.2",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-native-firebase/analytics": "14.11.1",
    "@react-native-firebase/app": "14.11.1",
    "@react-native-firebase/crashlytics": "14.11.1",
    "@react-native-firebase/messaging": "14.11.1",
    "@react-native-firebase/perf": "14.11.1",
    "@react-navigation/bottom-tabs": "6.5.20",
    "@react-navigation/native": "6.1.17",
    "@react-navigation/native-stack": "6.9.26",
    "@reduxjs/toolkit": "2.2.5",
    "@shopify/react-native-skia": "1.3.5",
    "async-mutex": "0.4.0",
    "date-fns": "3.6.0",
    "date-fns-tz": "3.1.3",
    "jwt-decode": "3.1.2",
    "lodash": "4.17.21",
    "node-polyglot": "2.5.0",
    "react": "18.2.0",
    "react-hook-form": "7.52.0",
    "react-native": "0.71.6",
    "react-native-auth0": "3.2.1",
    "react-native-code-push": "8.0.2",
    "react-native-gesture-handler": "2.17.0",
    "react-native-reanimated": "3.10.1",
    "react-native-safe-area-context": "4.10.5",
    "react-native-screens": "3.32.0",
    "react-native-video": "5.2.1",
    "react-redux": "9.1.2",
    "redux-persist": "6.0.0",
    "socket.io-client": "4.7.2",
    "yup": "1.2.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native-community/eslint-config": "^3.2.0",
    "@trivago/prettier-plugin-sort-imports": "^4.1.1",
    "@tsconfig/react-native": "^2.0.2",
    "@types/jest": "^29.2.1",
    "@types/lodash": "^4.14.191",
    "@types/node-polyglot": "^2.4.2",
    "@types/react": "^18.0.24",
    "@types/react-native-auth0": "^2.17.4",
    "@types/react-native-video": "^5.0.20",
    "@types/react-test-renderer": "^18.0.0",
    "appcenter-cli": "^2.14.0",
    "babel-jest": "^29.2.1",
    "babel-plugin-module-resolver": "^5.0.0",
    "basil-ws-flipper": "^1.0.0",
    "eslint": "^8.19.0",
    "eslint-config-prettier": "^8.6.0",
    "eslint-plugin-prettier": "^4.2.1",
    "husky": "^8.0.3",
    "jest": "^29.2.1",
    "jest-junit": "^16.0.0",
    "lint-staged": "^13.1.1",
    "metro-react-native-babel-preset": "0.73.7",
    "prettier": "^2.8.4",
    "react-native-flipper": "0.164.0",
    "react-test-renderer": "18.2.0",
    "redux-flipper": "^2.0.3",
    "typescript": "4.9.5"
  },
  "jest": {
    "maxWorkers": 2,
    "testTimeout": 10000,
    "preset": "react-native",
    "transformIgnorePatterns": [
      "node_modules/(?!(react-native|@react-native|react-redux)/)"
    ]
  },
  "jest-junit": {
    "outputDirectory": "artifacts/test-results/junit",
    "outputName": "jest-junit.xml",
    "uniqueOutputName": "true",
    "reportTestSuiteErrors": "true",
    "moduleDirectories": [
      "<rootDir>/",
      "node_modules"
    ]
  }
}```
@callmehallo callmehallo added the bug Something isn't working label Jul 1, 2024
@xkelxmc
Copy link

xkelxmc commented Jul 2, 2024

Same problem

    "@shopify/react-native-skia": "1.3.7",
    "expo": "^51.0.17",
    "expo-dev-client": "~4.0.19",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.74.2",
    ...

@DaveGlad
Copy link

DaveGlad commented Jul 4, 2024

Same problem 😶

    "@shopify/react-native-skia": "1.3.7",
    "expo": "^51.0.17",
    "expo-dev-client": "~4.0.19",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.74.2",
    ...

@basharmengana-dev
Copy link

Same 😢

    "@shopify/react-native-skia": "^1.3.6",
    "react": "18.2.0",
    "react-native": "0.74.2",
    "react-native-gesture-handler": "^2.16.2",
    "react-native-reanimated": "^3.12.0"

@LMarcinkowski
Copy link

Same. Similar version as above.

@napsta32
Copy link

napsta32 commented Jul 6, 2024

Same. I am using victory native.

"@shopify/react-native-skia": "^1.3.7",
"react": "18.2.0",
"react-native": "0.74.3",
"react-native-gesture-handler": "^2.17.1",
"react-native-reanimated": "^3.13.0",
"victory-native": "^41.0.1"

If I remove all the charts, I don't get the error. As soon as I add a graphics it fails to reload.

EDIT: This is not reproducible if I downgrade @shopify/react-native-skia to 1.3.4

@natuanorg
Copy link

same problem

@DaveGlad
Copy link

DaveGlad commented Jul 8, 2024

I had this problem, after building my application with the command eas build --profile development-simulator --platform ios then launch the application I no longer have this problem

@DarkShtir
Copy link

Same issue

"@shopify/react-native-skia": "1.3.8",
"react": "18.3.1",
"react-native": "0.73.9",
"react-native-reanimated": "3.14.0",
"react-native-gesture-handler": "2.17.1",

@ovidb
Copy link

ovidb commented Jul 15, 2024

We have the exact same issue and we ended up reverting, which fixed the issue

@carlosriveroib
Copy link

Same. I am using victory native.

"@shopify/react-native-skia": "^1.3.7",
"react": "18.2.0",
"react-native": "0.74.3",
"react-native-gesture-handler": "^2.17.1",
"react-native-reanimated": "^3.13.0",
"victory-native": "^41.0.1"

If I remove all the charts, I don't get the error. As soon as I add a graphics it fails to reload.

EDIT: This is not reproducible if I downgrade @shopify/react-native-skia to 1.3.4

Same as you, I'm using victory-native, same error with 1.3.8 but if I downgrade to 1.3.4 I don't get the error

@nat-jones
Copy link

Are you installing with npx expo install @shopify/react-native-skia? I had the same problem installing with a simple npm install @shopify/react-native-skia, but this + a rebuild fixed my issues.

@omarbakr2020
Copy link

Same problem here. Any solution ?

@wcandillon
Copy link
Contributor

Thank you for reporting this. We were also affected by this issue. We will publish a fix for it today.

Copy link
Contributor

🎉 This issue has been resolved in version 1.3.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.