WormaCeptor

Migrating from Chucker

Step-by-step guide to move an existing Chucker setup to WormaCeptor V2.

Overview

This guide moves an existing Chucker setup to WormaCeptor V2. Besides HTTP inspection, WormaCeptor includes:

  • HTTP traffic inspection (OkHttp + Ktor)
  • WebSocket monitoring
  • WebView monitoring
  • Performance monitoring (FPS, Memory, CPU)
  • SQLite database browser with live query execution
  • SharedPreferences editor and read-only DataStore viewer
  • Leak detection
  • Crash reporting
  • Push notification simulator
  • Location mocking
  • Crypto tools
  • Feature toggles
  • Deep link navigation to every tool

1. Swap Dependencies

Before (Chucker)

build.gradle.kts
debugImplementation("com.github.chuckerteam.chucker:library:4.x.x")
releaseImplementation("com.github.chuckerteam.chucker:library-no-op:4.x.x")

After (WormaCeptor)

WormaCeptor is on Maven Central — no extra repository setup is needed if you already have mavenCentral() in your settings.gradle.kts (the Android default).

build.gradle.kts
implementation("com.azikar24.wormaceptor:wormaceptor-client:3.4.4")
debugImplementation("com.azikar24.wormaceptor:wormaceptor-persistence:3.4.4")

No release no-op artifact needed. The wormaceptor-client module auto-discovers the implementation at runtime. In release builds where wormaceptor-persistence is absent, it falls back to a built-in no-op automatically.

2. Swap the Interceptor

Before (Chucker)

val client = OkHttpClient.Builder()
    .addInterceptor(
        ChuckerInterceptor.Builder(context)
            .collector(ChuckerCollector(context))
            .maxContentLength(250_000L)
            .redactHeaders("Authorization")
            .alwaysReadResponseBody(true)
            .build()
    )
    .build()

After (WormaCeptor)

val client = OkHttpClient.Builder()
    .addInterceptor(
        WormaCeptorInterceptor()
            .showNotification(true)
            .maxContentLength(250_000L)
            .redactHeader("Authorization")
    )
    .build()

Key differences:

  • No Builder pattern -- direct method chaining
  • No Collector object -- handled internally
  • No context parameter -- the interceptor is context-free
  • No alwaysReadResponseBody: the response body is captured as your code reads it, so streaming responses are not buffered up front. text/event-stream bodies are not stored

3. Add Initialization

WormaCeptor needs one initialization call.

Add this to your Application.onCreate():

MyApp.kt
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        WormaCeptorApi.init(this)
    }
}

This is a one-liner and is safe to call in all build types. If wormaceptor-persistence is not on the classpath (release builds), the call is a no-op.

4. Redaction API Mapping

Headers

ChuckerWormaCeptor
.redactHeaders("Authorization", "Cookie").redactHeader("Authorization").redactHeader("Cookie")

WormaCeptor uses individual calls per header instead of varargs.

Body Redaction

WormaCeptor can also redact request and response bodies:

WormaCeptorInterceptor()
    .redactHeader("Authorization")
    .redactHeader("Cookie")
    .redactJsonValue("token")       // Redacts JSON fields named "token"
    .redactXmlValue("apiKey")       // Redacts XML elements named "apiKey"
    .redactBody("pattern")          // Redacts body content matching pattern

5. Remove Chucker Leftovers

After migrating, search your codebase for and remove:

import com.chuckerteam.chucker
ChuckerInterceptor
ChuckerCollector

6. Explore the Other Tools

Once traffic shows up, the rest of the toolkit is available from the same UI. See Feature Toggles for the full list and how to turn tools off.

FAQ

Do I need to change my OkHttp version?

No. WormaCeptor works with the same OkHttp versions Chucker supports.

Can I use WormaCeptor alongside Chucker during migration?

Yes. Both add OkHttp interceptors and can coexist. Remove Chucker once you've confirmed WormaCeptor captures traffic correctly.

Does WormaCeptor support Ktor?

Yes. WormaCeptor provides a native Ktor plugin in addition to the OkHttp interceptor. See the Ktor setup docs for details.

What about ProGuard / R8?

Consumer R8 rules ship inside the artifacts (wormaceptor-core-ui, pulled in by wormaceptor-client, and wormaceptor-persistence). No manual configuration needed.

Is there a size impact?

The wormaceptor-client module (included in release) is minimal -- it contains only interfaces and the no-op fallback. The wormaceptor-persistence module (debug only) adds the full implementation and UI, but it never ships to production.

What if I was using ChuckerCollector to programmatically clear transactions?

WormaCeptor manages storage internally. Use WormaCeptorApi for any programmatic control over recorded data.

I used maxContentLength to limit memory usage. Does WormaCeptor support this?

Yes. The API is identical: .maxContentLength(250_000L). Payloads exceeding this limit are truncated.

On this page