flipper icon indicating copy to clipboard operation
flipper copied to clipboard

Cannot see plugin & conflict with react-native

Open Aquarids opened this issue 7 years ago • 7 comments

🐛 Bug Report

I followed the steps of the official website and tried to use it in my application. But when I open the desktop app I cannot see any plugin. Screen Shot 2019-09-19 at 11 26 07

And when I tried to run the other app, I got an error. Program type already present: com.facebook.fbjni.CppSystemErrorException Program type already present: com.facebook.yoga.YogaConfig Program type already present: com.facebook.proguard.annotations.DoNotStrip Screen Shot 2019-09-19 at 11 06 51

Environment

Flipper: 0.23.7 MacOS: 10.14.6 Android: MI 6

Aquarids avatar Sep 19 '19 04:09 Aquarids

Hey @Aquarids! Part of the issue here is that Flipper can't find adb which causes the experience to be partially degraded. If you could set the ANDROID_HOME environment variable and restart Flipper, that part should be fixed.

About the second part, you may need to manually exclude the conflicting dependencies. We're currently working on ensuring that this won't be necessary going forwards but it's not quite ready yet.

If you add these exclude rules to your project, it should take care of that:

 debugImplementation ('com.facebook.flipper:flipper:x.y.z') {
        exclude group: 'com.facebook.flipper', module: 'fbjni'
        exclude group: 'com.facebook.yoga', module:'yoga'
 }

passy avatar Sep 19 '19 09:09 passy

Hi @passy , thanks for your replay.

After I set ANDROID_HOME in my .zshrc file, I still got errors.

export ANDROID_HOME=/Users/aquarids/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$ANDROID_HOME/tools:$PATH

Screen Shot 2019-09-19 at 18 11 39 Screen Shot 2019-09-19 at 18 07 33

And the second one, after I exclude fbjni, I got FlipperConnectionThread when my app launch. Here is the stacktrace:

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libflipper.so caused by: dlopen failed: library "libfbjni.so" not found
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
        at com.facebook.flipper.android.EventBase.<clinit>(EventBase.java:18)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:24)

BTW, I think it might be exclude group: 'com.facebook.fbjni', module: 'fbjni' rather then exclude group: 'com.facebook.flipper', module: 'fbjni'.

Maybe I should try again after you have solved all the conflicts? I really like flipper and hope to recommend it to our QA team. Hope to see stable official version as soon as possible.

Aquarids avatar Sep 19 '19 10:09 Aquarids

Yes, you're right about the fbjni group! Sorry, that only changed with the last release and slipped my mind. However, the .so loading problem is actually more tricky than this. It looks like React Native bundles fbjni but with a different name for the library. Perhaps it might be easier for you to downgrade to (I think) 0.23.5 where we haven't done the recent changes to how we bundle it.

And lastly, could you try launching Flipper directly from the console that will definitely have sourced your zsh config, i.e. /Applications/Flipper.app/Contents/MacOS/Flipper or open -a Flipper?

passy avatar Sep 19 '19 16:09 passy

It works now, thanks. I think it would be better if we can set the SDK directory on the flipper desktop app.

Aquarids avatar Sep 20 '19 01:09 Aquarids

@Aquarids Yes, agreed. That's something we're looking into at the moment.

passy avatar Sep 23 '19 15:09 passy

Hi, Any news on the flipper 0.25 / React Native compatibility ? thanks !

Alaa-Ben avatar Oct 01 '19 07:10 Alaa-Ben

@Alaa-Ben We are working on it, but there's no ETA for it at the moment, unfortunately.

passy avatar Oct 01 '19 16:10 passy