jgilfelt / chuck

An in-app HTTP inspector for Android OkHttp clients
Apache License 2.0
4.68k stars 452 forks source link

Multi-process not supported #58

Closed konokol closed 6 years ago

konokol commented 6 years ago

Chuck works perfect with single-process. But when coming to multi-process, it crashes.

The cause is ChuckContentProvider.TRANSACTION_URI. In another process, Conprovider.attachInfo(Context, ProviderInfo) seems to be not called, thus ChuckContentProvider.TRANSACTION_URI gets null. If we make a request in another process, NullPointerException occurs while saving data into database.

ckjoker commented 6 years ago

The same problem occurs to me, how you solve the multi-process?

konokol commented 6 years ago

@CKJOKER It seems that the author has no intent to support multi-process. I use chuck with source code instead of aar from maven, and I change some code. The value of ChuckContentProvider.TRANSACTION_URI is assigned with my package name when declared. So whether ContentProvider.attachInfo(Context, ProviderInfo) is called or not doesn't matter.