nativescript-community / flipper

A desktop debugging platform for mobile developers.
Apache License 2.0
4 stars 0 forks source link

Cannot read property 'NetworkFlipperPlugin' of undefined #1

Open fpaaske opened 2 years ago

fpaaske commented 2 years ago

I'm not sure if this is even supported, but I'm trying this out with an NS 8.1 + Angular 13 app, but get this error message:

JS: Error in Flipper.init: TypeError: Cannot read property 'NetworkFlipperPlugin' of undefined
JS: Unhandled Promise rejection: Cannot read property 'NetworkFlipperPlugin' of undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read property 'NetworkFlipperPlugin' of undefined TypeError: Cannot read property 'NetworkFlipperPlugin' of undefined
JS:     at file: src/webpack:/xxx/node_modules/@nativescript-community/flipper/flipper.android.js:21:0

I have installed the Flipper desktop client, the Android SDK is configured correctly and the emulator shows up in the client.

Which platform(s) does your issue occur on?

Tested only on Android emulator

Please, provide the following version numbers that your issue occurs with:

ns info ✔ Getting NativeScript components versions information... ✔ Component nativescript has 8.1.5 version and is up to date. ✔ Component @nativescript/core has 8.1.5 version and is up to date. ✔ Component @nativescript/ios has 8.1.0 version and is up to date. ✔ Component @nativescript/android has 8.1.1 version and is up to date.

Using latest version of this plugin (0.0.5).

Please, tell us how to recreate the issue in as much detail as possible.

I added the flipper.start() with plugins in main.ts, just like in the Vue demo example, and executed ns run android --no-hmr --emulator

Is there any code involved?

I can create a sample if needed.

farfromrefug commented 2 years ago

@fpaaske to be honest this plugin was an experiment. Though it was working at the time but there was some building errors with iOS. Now that being said your error is related to the android native lib not being found. I tested locally and also upgraded the plugin to latest android deps and it works fine here. Upgrade and let me know. BTW: look here for an example https://github.com/nativescript-community/flipper/blob/7ade80daecc90c9f996d914668f272814d7ae63c/demo-vue/app/main.ts#L9

fpaaske commented 2 years ago

I see, I'm currently investigating performance issues in one of our apps, and I can't find any good way of profiling.

This looks like an interesting tool/plugin, so I will check it out again at a later time. But first I need a vacation 😊

Thanks for the quick response, and have a wonderful holiday.