reactotron icon indicating copy to clipboard operation
reactotron copied to clipboard

Promise rejection followed by `INVALID_STATE_ERR` when there is no error

Open govi218 opened this issue 1 year ago • 0 comments

Describe the bug

Sporadically, when I refresh my app I get the following error message, even though I'm able to use Reactotron without problems:

 LOG  An error occurred communicating with reactotron. Please reload your app
 WARN  Possible Unhandled Promise Rejection (id: 1):
Error: INVALID_STATE_ERR
Error: INVALID_STATE_ERR
    at send (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:18533:26)
    at anonymous (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:382514:33)
    at tryCallOne (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:53:16)
    at anonymous (/Users/distiller/react-native/packages/react-native/sdks/hermes/build_iphonesimulator/lib/InternalBytecode/InternalBytecode.js:139:27)
    at apply (native)
    at anonymous (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:15271:26)
    at _callTimer (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:15150:17)
    at _callReactNativeMicrotasksPass (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:15195:17)
    at callReactNativeMicrotasks (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:15401:44)
    at __callReactNativeMicrotasks (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:2697:48)
    at anonymous (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:2470:45)
    at __guard (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:2669:15)
    at flushedQueue (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:2469:21)
    at callFunctionReturnFlushedQueue (http://localhost:8081/node_modules/expo-router/entry.bundle//&platform=ios&dev=true&lazy=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.pairusapp&transform.routerRoot=app&transform.engine=hermes&transform.bytecode=true:2454:33)

Here's how I use Reactotron:

function RootLayout() {
  // ...
  useEffect(() => {
    async function init() {
      // ...
      if (__DEV__) {
        try {
          Reactotron.configure({}).useReactNative().connect();
        } catch (err) {
          console.error(err);
        }
      }
    }
  }, []);
  return ( ... );
}

Reactotron version

[email protected]

govi218 avatar Feb 06 '25 19:02 govi218