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

ReactotronFlipper not working with Reactotron #80

Open
orhangazi opened this issue Nov 1, 2022 · 0 comments
Open

ReactotronFlipper not working with Reactotron #80

orhangazi opened this issue Nov 1, 2022 · 0 comments

Comments

@orhangazi
Copy link

orhangazi commented Nov 1, 2022

I want to work with Flipper (flipper-plugin-reactotron). When I import ReactotronFlipper and add createSocket: (path) => new ReactotronFlipper(path), line in the configure, I am getting an error: "The native module for Flipper seems unavailable. Please verify that react-native-flipper is installed....". I tried to install react-native-flipper but not work.

How can I do that?

Related packages and versions:
"react-native-flipper": "^0.173.0",
"reactotron-react-native": "~5.0.1",
"react-native": "0.69.6",
"react": "18.0.0",

ReactotronConfig.js:

import Reactotron, { openInEditor } from 'reactotron-react-native'
import { reactotronRedux } from 'reactotron-redux'
import { NativeModules } from 'react-native'
import AsyncStorage from '@react-native-async-storage/async-storage'
import url from 'url'
import ReactotronFlipper from 'reactotron-react-native/dist/flipper'

const reactotron = ( port= 9999, monkeyPatchConsoleLog=true) => {
	const {hostname} = url.parse(NativeModules.SourceCode.scriptURL)
	const portNumber = 9090
	console.log("Host name: "+hostname) // mine was 192.168.1.2

	Reactotron.configure({
			name: "Ulak",
			createSocket: (path) => new ReactotronFlipper(path),
			host: hostname,
			port: Number(portNumber),
			//createSocket: path => new ReactotronFlipper(path),
		})
		.setAsyncStorageHandler(AsyncStorage)
		.useReactNative({
			networking: {
				ignoreUrls: /\/symbolicate|\/logs|127.0.0.1|\/open-stack-frame/,
			},
			errors: true,
			editor: {url: "http://192.168.1.36:19000"}
		})
		.use(reactotronRedux())
		.use(openInEditor())
		.connect()
		.clear()
...

Error screenshot:
image

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

1 participant