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

Flipper plugin getting failed on android #67

Open
AdityaPahilwani opened this issue Jul 26, 2022 · 8 comments
Open

Flipper plugin getting failed on android #67

AdityaPahilwani opened this issue Jul 26, 2022 · 8 comments

Comments

@AdityaPahilwani
Copy link
Contributor

The Flipper plugin was getting failed on android, when I tried to debug it I could see somehow the plugin which sets the reactContext is getting null, I couldn't draw any more points beyond that. can you folks please help me to solve this?

debug log

android config

// build details
versions.compileSdkVersion = 28
versions.buildToolsVersion = '30.0.3'
versions.minSdkVersion = 21
versions.targetSdkVersion = 31
versions.flipper = '0.125.0'

RN deps

"react": "17.0.2",
"react-native": "0.66.4",
"react-native-flipper": "0.125.0",
"react-native-flipper-performance-plugin": "^0.3.1",
@Almouro
Copy link
Member

Almouro commented Jul 27, 2022

Good debugging skills!
Interesting that the Flipper plugin instance is null here, we added a weird hack for Expo projects to pass the React Context from the bridge (#56)

Basically this plugin is also a native RN module, which is automatically linked and pass the react context to the current Flipper plugin when instantiated. So that's why I had removed the line to pass in the reactInstanceManager

But in your case, the bridge seems to be instantiated before the Flipper plugin, so safer to change the doc like you did!

Thanks for the PR!

@Almouro Almouro closed this as completed Jul 27, 2022
@AdityaPahilwani
Copy link
Contributor Author

Actually, even after reactInstanceManager as param. the flipper plugin is getting null. so it's still not solved for me. though reactInstanceManager is passed correctly still the flipper plugin gets null. can you help me with where to look at?

@Almouro Almouro reopened this Jul 27, 2022
@Almouro
Copy link
Member

Almouro commented Jul 27, 2022

Oh my bad for closing then!
Yeah I've just realized passing reactInstanceManager doesn't actually do anything anymore

Can you try version 0.2.1 of the plugin?

@AdityaPahilwani
Copy link
Contributor Author

Sorry I was sick, couldn't try it.
I will try this on Monday and will update soon

@AdityaPahilwani
Copy link
Contributor Author

I tried it, but it didn't work.

we create our react context in the background, with createReactContextInBackground can that cause any issue?

@Almouro
Copy link
Member

Almouro commented Aug 4, 2022

Hey @AdityaPahilwani, hope you're feeling better!!

Ah indeed that might be the cause!
There's a simple example on the repo https://github.com/bamlab/react-native-flipper-performance-monitor/tree/master/example, if you have time, would you be able to check if it works if we use createReactContextInBackground?
That could at least make for a minimal reproduction example if it doesn't

@AdityaPahilwani
Copy link
Contributor Author

I am really really sorry, recently moved to a new city so was busy with some problems here.
I will check this asap

@Almouro
Copy link
Member

Almouro commented Aug 24, 2022

Hey @AdityaPahilwani no worries of course! ☺️
it's open source (and it's not even your repo), you don't have to feel obligated to do anything! I also didn't have the bandwidth to try it out

Hope you settle in well in your new environment then! ☺️

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

No branches or pull requests

2 participants