jk-gan / flipper-plugin-redux-debugger

Flipper plugin for Redux in React Native
MIT License
117 stars 20 forks source link

Redux Debugger not registering in flipper #10

Open pmk1c opened 4 years ago

pmk1c commented 4 years ago

I'm using Flipper 0.39.0 on Linux with Android on an Emulator and I think I have enabled all the required initialization. But the Flipper Redux Debugger Pluing does not get listed and in the Flipper debugger console I see the following error:

Error: Feature not implemented
    at getUser (user.tsx:13)
    at e.default (user.tsx:17)
    at index.tsx:51
    at Array.map (<anonymous>)
    at _default (index.tsx:51)
    at init.tsx:109
    at Object.rehydrate (persistStore.js:82)
    at _rehydrate (persistReducer.js:61)
    at persistReducer.js:90
(anonymous) @ user.tsx:23
Promise.catch (async)
e.default @ user.tsx:21
(anonymous) @ index.tsx:51
_default @ index.tsx:51
(anonymous) @ init.tsx:109
rehydrate @ persistStore.js:82
_rehydrate @ persistReducer.js:61
(anonymous) @ persistReducer.js:90
Promise.then (async)
(anonymous) @ persistReducer.js:89
Promise.then (async)
(anonymous) @ persistReducer.js:84
combination @ redux.js:458
dispatch @ redux.js:212
persist @ persistStore.js:114
persistStore @ persistStore.js:123
(anonymous) @ init.tsx:106
loadModuleImplementation @ require.js:323
guardedLoadModule @ require.js:212
metroRequire @ require.js:130
(anonymous) @ reduxDevToolsConfig.tsx:37
pmk1c commented 4 years ago

The same is happening for the same App with an iOS Simulator on Mac.

jk-gan commented 4 years ago

Hey, thanks for using flipper-plugin-redux-debugger!

I've tested on my environment (macOS, flipper 0.39) and it works great. Can you try to restart Flipper a few times or using cmd+R to refresh Flipper? When I first install the plugin, I had to restart a few times to get the plugin active. (It could be Flipper bug or the plugin bug, I will find out later.)

Another thing to note that the current implementation of the plugin you have to dispatch your 1st action in order to get the plugin connected. I'm planning to change the behavior in the future. So if you can't see Redux Debugger on your Flipper, maybe you can try to dispatch an action.

wanschi commented 4 years ago

Same problem, refreshing Flippern isn't fixing it.

jk-gan commented 4 years ago

May I know what is your react-native and flipper version? and also step to reproduce. Thanks 🙏🏻

wanschi commented 4 years ago

@jk-gan

"react-native": "0.62.1", Flipper: Version 0.39.0 (50.0.0)

But I also have the same problem as mentioned here: https://github.com/facebook/react-native/issues/28531

(Debugger only connects only with having lot of problems with my app)

So I can't really say that this is a Flipper problem but I guess so. I have to fix the other problem first to be sure.

jk-gan commented 4 years ago

Did u try to dispatch any redux action? Because of the current implementation of the plugin you have to dispatch your 1st action in order to get the plugin connected.

salamancajr commented 4 years ago

I just switched to flipper and I am having the the same issue on the flipper desktop app running a react native project

image

I am getting the following status when clicking manage plugins. I am thinking maybe the fact that it shows flipper plugin sections as disabled has something to do with it. I have looked around to find out how to enable this and there is no documentation regarding this. Any help would be great.

jk-gan commented 4 years ago

Hi @salamancajr , just a quick check with you.

  1. react-native version?
  2. flipper desktop version?
  3. Did you install redux-flipper and react-native-flipper on your react-native app?
  4. Did you dispatch any redux action?

I just tested with 2 newly created react-native apps and they work fine on my side

salamancajr commented 4 years ago

i dispatched an action and i see it now.

jk-gan commented 4 years ago

I'm glad it works now @salamancajr! We will change the connection implementation in the next version to start the flipper connection when your app is started. So you will be able to see Redux Debugger in your Flipper before you dispatch any action.

plwai commented 4 years ago

Enhanced in redux-flipper V1.1.0

Connection will be added at createStore phase.

https://github.com/jk-gan/redux-flipper/pull/17

dewansneha commented 4 years ago

Not working for me. I have tried all the mention resolutions. image

React native version = 0.62.2 Flipper Desktop Version 0.42.0 (50.0.0)

I have installed both redux-flipper (1.1.0) and react-native-flipper (0.39.0)

jk-gan commented 4 years ago

This error message is from Flipper, I got it even my Flipper is empty without any plugin:

Screenshot 2020-05-19 at 12 21 09 AM

Can you elaborate more on your issue?

dewansneha commented 4 years ago

@jk-gan I have installed redux-debugger plugin, but not seeing it on flipper. image

image

jk-gan commented 4 years ago

Ok, let's work together to figure out what is the root cause, can you answer these questions for me?

  1. Did you install redux-flipper?
  2. Did you add redux-flipper middleware into redux store?
  3. Besides redux-flipper, what middlewares you use for redux?
  4. Is your app connecting to flipper?
dewansneha commented 4 years ago

@jk-gan

Did you install redux-flipper?

Yes, redux-flipper 1.1.0 is installed

Did you add redux-flipper middleware into redux store?

Yes.

Besides redux-flipper, what middlewares you use for redux?

Apart from redux-flipper, there is redux-logger and createReactNavigationReduxMiddleware from react-navigation-redux-helpers

Is your app connecting to flipper?

Yes app has connected to Flipper, and I am able to see other things like Logs, Layout, Network etc.

I also tried installing some other plugins, none of them show up. Also, I am not able to see the pre-installed React Dev tools plugin too. Could this be some other issue?

jk-gan commented 4 years ago

Can you show me your plugin status? Manage Plugins > Plugin Status

mweststrate commented 4 years ago

Looks like your Android setup is incorrect. That problem is unrelated to this plugin, best check the Flipper setup docs or file an issue at Flipper.

On Thu, 21 May 2020, 23:22 PoojaMD, notifications@github.com wrote:

@jk-gan https://github.com/jk-gan Even I'm facing the same issue [image: Screenshot 2020-05-22 at 3 50 28 AM] https://user-images.githubusercontent.com/19702886/82612019-80415900-9bdf-11ea-8fa8-5fa598ad8195.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jk-gan/flipper-plugin-redux-debugger/issues/10#issuecomment-632376326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBERZAYNUHSTIPU6XETRSWSRJANCNFSM4MQG54QA .

heyman333 commented 4 years ago

I had a same issue because i am using too low version of flipper(0.3.x) Upgrade flipper app then it works great! (0.43.0)

alina-beck commented 4 years ago

Same issue here, with latest react-native (0.63.2), Flipper (0.52.1) and redux-flipper (1.3.1) versions, on both android and iOS emulators.

I see the flipper-plugin-redux-debugger (v 1.2.0) with green plugin status in the Flipper app, but it's supposedly not supported by my app. The middleware is set up according to the documentation and it's the only one, besides redux-saga. I also made sure that an action is dispatched and tried reloading Flipper, uninstalling and reinstalling my app, cleaning build folders, clearing cache etc. and even installing react-native-flipper as a peer dependency (even though this shouldn't be required with react-native versions 0.62+) – nothing seems to work.

Did anybody solve this?

jk-gan commented 4 years ago

Same issue here, with latest react-native (0.63.2), Flipper (0.52.1) and redux-flipper (1.3.1) versions, on both android and iOS emulators.

I see the flipper-plugin-redux-debugger (v 1.2.0) with green plugin status in the Flipper app, but it's supposedly not supported by my app. The middleware is set up according to the documentation and it's the only one, besides redux-saga. I also made sure that an action is dispatched and tried reloading Flipper, uninstalling and reinstalling my app, cleaning build folders, clearing cache etc. and even installing react-native-flipper as a peer dependency (even though this shouldn't be required with react-native versions 0.62+) – nothing seems to work.

Did anybody solve this?

Hi, do you see Redux debugger in the sidebar?

alina-beck commented 4 years ago

No, all I am seeing is this:

Skärmavbild 2020-08-13 kl  17 48 06
jk-gan commented 4 years ago

Can you share the reproduce steps here? because I can get the plugin work on my side.

rikur commented 4 years ago

+1, not showing up. Used to work before. On Flipper desktop version 0.53.0.

plwai commented 4 years ago

Tested in Flipper desktop version 0.54.0 and it is working fine.

kimkr commented 4 years ago

Showing up.

Flipper : 0.62.0(50.0.0) react-native : 0.63.3 redux-flipper : 1.4.0

I followed his instruction @adi2412

ramakula commented 3 years ago

Thanks @kimkr it fixed for me as well.

ramakula commented 3 years ago

To those who are facing this issue on Android, auto linking seems to be returning Flipper instance undefined in react-native-flipper/index.js. I fixed it by adding if (BuildConfig.DEBUG) { packages.add(new FlipperPackage()); } in createAdditionalReactPackages method of MainApplication.java. Might help you as well. I'm on RN 63.4

zmanring commented 3 years ago

For the life of me I cannot get this to show up in the sidebar, Flipper version 0.102.0. As far as I got was to use the repo to load it in manually and it failed but at least I saw it in the sidebar. I even tried to bundle it myself with no luck.. any thoughts?

plwai commented 3 years ago

For the life of me I cannot get this to show up in the sidebar, Flipper version 0.102.0. As far as I got was to use the repo to load it in manually and it failed but at least I saw it in the sidebar. I even tried to bundle it myself with no luck.. any thoughts?

@zmanring There are a few of things you may check.

1) Is there any error message shown in the flipper chrome debugger for auto installation? Manual dynamic loading can be buggy if you are using windows environment. 2) Make sure the connection between your device and flipper success. 3) Make sure you installed and configured redux-flipper middleware in your app.

und3f1n3d commented 3 years ago

I am having the same issue but only on Android. iOS simulator was fine.

"react-native-flipper": "0.103.0" "redux-flipper": "2.0.0" "react-native": "0.64.2"

Flipper desktop version 103.

We use redux-observable (epics), on iOS simulator, it was running perfectly. I could see everything.

Once loading on Android device / or emulator, I know Flipper is connected to the device because I could see my device log via the Flipper desktop app. I also ran adb logcat and could see below returned , and no errors after that...

flipper: flipper: FlipperClient::onConnected
//..more other logging here... 
flipper: flipper: FlipperClient::addPlugin flipper-plugin-redux-debugger

On the Flipper desktop app, there is a green dot beside flipper-plugin-redux-debug under plugin status. So it is enabled. Is there any pointers where I could look? I don't see any errors coming from flipper nor the plugin itself from the device log. Yet just reading thru the redux-flipper code (index.ts file), it looks like maybe there is a connection issue with flipper....

So we installed the flipper using the manual android setup way.. i could see Network and Layout plugin enabled but not redux-debugger. would that make a difference?

plwai commented 3 years ago

I am having the same issue but only on Android. iOS simulator was fine.

"react-native-flipper": "0.103.0" "redux-flipper": "2.0.0" "react-native": "0.64.2"

Flipper desktop version 103.

We use redux-observable (epics), on iOS simulator, it was running perfectly. I could see everything.

Once loading on Android device / or emulator, I know Flipper is connected to the device because I could see my device log via the Flipper desktop app. I also ran adb logcat and could see below returned , and no errors after that...

flipper: flipper: FlipperClient::onConnected
//..more other logging here... 
flipper: flipper: FlipperClient::addPlugin flipper-plugin-redux-debugger

On the Flipper desktop app, there is a green dot beside flipper-plugin-redux-debug under plugin status. So it is enabled. Is there any pointers where I could look? I don't see any errors coming from flipper nor the plugin itself from the device log. Yet just reading thru the redux-flipper code (index.ts file), it looks like maybe there is a connection issue with flipper....

So we installed the flipper using the manual android setup way.. i could see Network and Layout plugin enabled but not redux-debugger. would that make a difference?

@und3f1n3d What is the status of the redux-debugger in the flipper app device connected sidebar panel?

und3f1n3d commented 3 years ago

nd3f1n3d What is the status of the redux-debugger in the flipper app device connected sidebar panel?

OMG.. is this magic? now i see Redux-Debugger listed on the sidebar. all i did was restart my app, unplug and replug my device to the laptop. Now Flipper can see 'Redux-Debugger' and i could see redux running. Pretty sure i did this many times before i add my comment, so I don't embarrass myself!!

Anyway, thank you so much!!

axios-tech commented 2 years ago

This is how you add Flipper if your are using Redux Toolkit:

https://stackoverflow.com/a/70674665/7371269

Vincetroid commented 2 years ago

This is how you add Flipper if your are using Redux Toolkit:

https://stackoverflow.com/a/70674665/7371269

Not working with both answers

Flipper : 0.166.0 react-native : 0.67.1 redux-flipper : 2.0.2 on package.json RNReduxDebugger : 1.0.8 react-native-flipper : 0.164.0 on package.json

Appears on Unavailable Plugins image

plwai commented 2 years ago

Hi @Vincetroid , if possible, can you share the code you insert middleware into redux toolkit?

Vincetroid commented 2 years ago

It seems working now, I had to uninstall the incorrect redux plugin and worked with -> redux-debugger, 2.0.1, Redux Debugger for Flipper

const configureCustomStore = () => {
  const rootReducer = combineReducers({
    authentication: authenticationSlice,
    ...
  });

  const store = configureStore({
    reducer: rootReducer,
    middleware: getDefaultMiddleware =>
      __DEV__
        ? getDefaultMiddleware({ serializableCheck: false }).concat(
            createDebugger()
          )
        : getDefaultMiddleware({
            serializableCheck: false,
          }),
  });

  return { store };
};

export const { store } = configureCustomStore();
noumantahir commented 1 year ago

Was same issue, matching flipper version of desktop client and RN package to 174 resolved the issue for me

sergeyalikin commented 1 year ago

Hello @jk-gan, unfortunately I am getting the same error. I am using Redux toolkit. I tried the middleware options mentioned above, but none of them helped. Below is a screenshot of how I connect the middleware to my Redux toolkit. Also I didn't forget to run pod install. Plugin status is green in Flipper itself. It seems to me that I have a problem with the versions of something, but this is not accurate) Can you please tell me what could be the problem?

Flipper : 0.182.0 react-native : 0.67.4 redux-flipper : 2.0.2 on package.json react-native-flipper : 0.182.0 on package.json

image image image
jk-gan commented 1 year ago

Hey, thanks for reporting this, I will check on this later. Does this only happen for iOS?

sergeyalikin commented 1 year ago

Yes

sergeyalikin commented 1 year ago

@jk-gan Were you able to reproduce the bug? I'm pinging you just to raise this issue)

jk-gan commented 1 year ago

@sergeyalikin , actually everything works fine on my machine. https://github.com/jk-gan/flipper-plugin-redux-debugger/issues/67#issuecomment-1445004999

jk-gan commented 1 year ago

perhaps you can provide me a reproducible react-native project so I can take a look

sergeyalikin commented 1 year ago

@jk-gan This happens on a working project, so I'm not sure if I can do it( If everything works for you, I'll try to find the problem myself. I'll write here if I understand what the problem was. Thank you!

jk-gan commented 1 year ago

alright

mloisotto commented 1 year ago

I had the same problem, but fixed it by updating Flipper to the latest version!