Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Undefined is not a function - reactotron startup #1043

Open
raybelisle opened this issue Oct 6, 2022 · 2 comments
Open

Undefined is not a function - reactotron startup #1043

raybelisle opened this issue Oct 6, 2022 · 2 comments

Comments

@raybelisle
Copy link

I just installed reactotron and when I start up my app with the desktop client or the flipper client, I get this message immediately and no connection is established.
Simulator Screen Shot - iPhone 11 - 2022-10-06 at 10 54 31

Environment is the latest version of the tools. In package.json:
"reactotron-react-native": "^5.0.3",
"reactotron-redux": "^3.1.3",

And my reactotron config when trying with flipper is:

`import Reactotron from 'reactotron-react-native';
import ReactotronFlipper from 'reactotron-react-native/dist/flipper';
import AsyncStorage from 'react-native';

Reactotron.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from react-native or @react-native-community/async-storage depending on where you get it from
.configure({
// name: 'Jobble QA Dev',
createSocket: (path) => new ReactotronFlipper(path),
// ...
}) // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.connect(); // let's connect!
`

If I try to connect to the desktop client I have used this instead:

`import Reactotron from 'reactotron-react-native';
import ReactotronFlipper from 'reactotron-react-native/dist/flipper';
import AsyncStorage from 'react-native';

Reactotron.setAsyncStorageHandler(AsyncStorage) // AsyncStorage would either come from react-native or @react-native-community/async-storage depending on where you get it from
.configure() // controls connection & communication settings
.useReactNative() // add all built-in react native plugins
.connect(); // let's connect!
`
and the following in App.js does output the message Reactotron Configured

if (__DEV__) { import('./ReactotronConfig').then(() => console.log('Reactotron Configured')); }

Any ideas on what to try here?

@labmorales
Copy link

Getting the same error here.

@labmorales
Copy link

Mine was getting this error when we migrated form AsyncStorage to MMKV. The solution for us was to just remove the setAsyncStorageHandler method:

Going from this:

Reactotron.setAsyncStorageHandler(asyncStorage)
    .configure()
    .useReactNative()
    .use(reactotronRedux());

To this

Reactotron
    .configure()
    .useReactNative()
    .use(reactotronRedux());

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants