0

upgrade to 0.182.0 from 0.95, the app does not show, and got error in log.

Deprecation notice: [conn] RSockets are being deprecated at Flipper. Please, use the latest Flipper client in your app to migrate to WebSockets. App: 

Anything needs to change for working with 0.182.0?

dependency:

debugImplementation 'com.facebook.flipper:flipper:0.182.0'
debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.182.0'
debugImplementation 'com.facebook.soloader:soloader:0.10.4'
releaseImplementation 'com.facebook.flipper:flipper-noop:0.182.0'

code for set the fbflipperInterceptor

   if (com.facebook.flipper.android.utils.FlipperUtils.shouldEnableFlipper(context)) {
        com.facebook.soloader.SoLoader.init(context, false)
        val networkPlugin = NetworkFlipperPlugin()
        val client: FlipperClient = AndroidFlipperClient.getInstance(context)
        client.addPlugin(InspectorFlipperPlugin(context, com.facebook.flipper.plugins.inspector.DescriptorMapping.withDefaults()))
        client.addPlugin(networkPlugin)
        client.start()
        fbflipperInterceptor = FlipperOkhttpInterceptor(networkPlugin)

        val interceptors: MutableList<Interceptor> = ArrayList()
        fbflipperInterceptor?.let {
            interceptors.add(it)
        }

        val builder = OkHttpClient.Builder()
             .readTimeout(60, TimeUnit.SECONDS)
             .connectTimeout(60, TimeUnit.SECONDS)
             .writeTimeout(10, TimeUnit.MINUTES)
             .retryOnConnectionFailure(true)
        
        for (interceptor in interceptors) {
            builder.addInterceptor(interceptor!!)
        }

        val logging = HttpLoggingInterceptor()
        logging.setLevel(HttpLoggingInterceptor.Level.BODY)
        builder.addInterceptor(logging);
        return builder.build()
    }

the httpClient is used with Retrofit later:

Retrofit.Builder()
                .baseUrl(endPoint)
                .addConverterFactory(GsonConverterFactory.create())
                .client(httpClient)
                .build()

enter image description here

same code with 0.95 dependencies and Flipper app it works fine:

debugImplementation "com.facebook.flipper:flipper:0.95.0"
debugImplementation "com.facebook.flipper:flipper-network-plugin:0.95.0"
debugImplementation "com.facebook.soloader:soloader:0.10.1"

enter image description here

lannyf
  • 9,865
  • 12
  • 70
  • 152

1 Answers1

0

check your idb settings and make sure you can use idb command in terminal

NapChen
  • 1
  • 1