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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Mocked the response , but not getting reflected at device. #5639

Open
sumit-jha-Pw opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@sumit-jha-Pw
Copy link

sumit-jha-Pw commented Jun 20, 2024

馃悰 Bug Report

Have used this peace of code :-
`object FlipperDebugger {

val networkFlipper = NetworkFlipperPlugin()
fun initialize(context: Context) {
    SoLoader.init(context, false)
    val client = AndroidFlipperClient.getInstance(context)
    client.addPlugin(InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()))
    client.addPlugin(CrashReporterPlugin.getInstance())
    client.addPlugin(DatabasesFlipperPlugin(context))
    LeakCanary.config = LeakCanary.config.run {
        copy(eventListeners = eventListeners + FlipperLeakEventListener())
    }
    client.addPlugin(networkFlipper)
    client.addPlugin(LeakCanary2FlipperPlugin())
    client.start()
}

}andhttpClient.addNetworkInterceptor(FlipperOkhttpInterceptor(FlipperDebugger.networkFlipper,true))`
Attached image for mocked api
Screenshot 2024-06-20 at 1 20 47 PM

But when this API is hit again then no mocked response shown
Using flipper-> 0.250.0
have added all dependency
debugImplementation "com.facebook.flipper:flipper:$flipper" debugImplementation "com.facebook.soloader:soloader:$soLoader" debugImplementation "com.facebook.flipper:flipper-leakcanary2-plugin:$flipper" debugImplementation "com.facebook.flipper:flipper-network-plugin:$flipper"

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

1 participant