pitpit
03/25/2022, 1:24 PMColton Idle
03/29/2022, 1:05 PMEddie J
04/02/2022, 4:18 PMContextWrapper
to wrap the Resources for mostly the string.
My codes on that are like:
// BaseActivity.java
@Override
protected void attachBaseContext(Context newBase) {
// ResourcesContextWrapper extends from ContextWrapper
resourcesContextWrapper = ResourcesContextWrapper.wrap(newBase);
super.attachBaseContext(resourcesContextWrapper);
}
...
...
...
// In ResourcesContextWrapper.java
private ResourcesWrapper resourcesWrapper;
@Override
public Resources getResources() {
return resourcesWrapper == null ? super.getResources() : resourcesWrapper;
}
By this code above, when I call:
getContext().getResources()
it will return me ResourcesWrapper
Without Chucker or with Chucker-No-op, the wrapper works fine. Calling getResources()
returns me ResourcesWrapper
which is what I need but with Chucker, it keep returning me the default system Resources instead.
I’ve tried couple times and still get the same result so I just want to know if it really is unrelated 😅 or somebody has faced this before.
Apart from what I mentioned above, every Chucker’s features work fine.
Please suggest 🙏Colton Idle
04/13/2022, 4:06 AMalthaf
04/13/2022, 6:24 AMalthaf
04/18/2022, 8:19 AMhandstandsam
04/26/2022, 12:55 PMToast.makeText(
, so put up a PR to address: https://github.com/ChuckerTeam/chucker/pull/810handstandsam
04/26/2022, 12:56 PMArjanSM
07/21/2022, 1:22 PMpsh
07/21/2022, 3:51 PMgammax
07/25/2022, 9:36 PMWhat can we do to revive the discussion and move the issue forward?Ideally, we're looking for people to help us out. As of today is just me + @Vova Buberenko doing the work. We're both quite busy that's why reviews are slower then usual. I'm doing this during my free time whenever possible 🙂 If there is anyone who's willing to help us out, that would be great. Otherwise, be patient and, at least from my end, I'd love to land the redesign of the internal model 👍
Frank Harper
09/26/2022, 5:09 PMgammax
09/26/2022, 5:10 PMdevelop
branch, you will find them here: https://github.com/ChuckerTeam/chucker/#snapshots- 👍Colton Idle
11/11/2022, 12:45 AMColton Idle
01/31/2023, 6:14 PMpsh
01/31/2023, 7:15 PMSlackbot
03/07/2023, 12:16 PMbeom
05/18/2023, 2:26 AMconfigurations.creating
, I get the following error, can I know why?
Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find library-no-op-3.5.2.aar (com.github.chuckerteam.chucker:library-no-op:3.5.2).
Searched in the following locations:
<https://jitpack.io/com/github/chuckerteam/chucker/library-no-op/3.5.2/library-no-op-3.5.2.aar>
at
gammax
07/03/2023, 3:25 PMgammax
07/04/2023, 7:59 AMColton Idle
08/02/2023, 4:11 PMSuraj Sahani
12/01/2023, 5:28 PM_debugImplementation_("com.github.chuckerteam.chucker:library:4.0.0")
Okhttp
fun provideHttpClient(context: Context
): OkHttpClient {
val okHttpClientBuilder = OkHttpClient.Builder()
.addInterceptor(ChuckerInterceptor(context))
okHttpClientBuilder.addInterceptor(provideLogInterceptor())
getting this error, Can't determine type for tag '<macro name="m3_comp_assist_chip_container_shape">?attr/shapeAppearanceCornerSmall</macro>'
at run time at the latest version.
Manage to run it on older version od Chucker which is
debugImplementation 'com.github.chuckerteam.chucker:library:3.5.2'
Even after doing this Not getting an y notification. My Android Level is 13, and already added <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
this to my Android Manifest. Anything else I'm missing here??Amitesh
01/10/2024, 7:44 AMmiqbaldc
01/16/2024, 10:50 AMmultipart/form-data
or am i missing something in the setup(?)
details in 🧵Colton Idle
01/31/2024, 7:33 PMColton Idle
06/05/2024, 7:42 PMandroidexpertmanish
07/27/2024, 11:12 AMIlia Kazantsev
10/03/2024, 2:07 PMpathSegments
filter in Chucker.
I’d really appreciate it if you could take a look and provide any feedback, as the fix is quite specific and I’m unsure if it fits the library.
Thank you and have a good day.Swapnil Musale
11/16/2024, 9:22 AMclass AndroidNetworkGateway(
private val debug: Boolean,
private val interceptors: List<Interceptor>,
private val networkInterceptor: List<Interceptor>,
private val aesEncryptionManager: AesEncryptionManager,
) : INetworkGateway {
override val client: HttpClient
get() = HttpClient(OkHttp) {
engine {
config {
callTimeout(30, TimeUnit.SECONDS)
connectTimeout(30, TimeUnit.SECONDS)
readTimeout(30, TimeUnit.SECONDS)
writeTimeout(30, TimeUnit.SECONDS)
}
interceptors.forEach { addInterceptor(it) }
networkInterceptor.forEach { addNetworkInterceptor(it) }
}
install(ContentNegotiation) {
json(BaseApi.networkJsonParser)
}
install(Logging) {
level = if (debug) LogLevel.ALL else LogLevel.NONE
}
install(ApiEncryption) {
encryptionManager = aesEncryptionManager
}
}
}
ApiEncryption
class ApiEncryption(private val aesEncryptionManager: AesEncryptionManager) {
class Config {
var encryptionManager: AesEncryptionManager? = null
}
companion object : HttpClientPlugin<Config, ApiEncryption> {
override val key: AttributeKey<ApiEncryption> = AttributeKey(name = "ApiEncryption")
override fun prepare(block: Config.() -> Unit): ApiEncryption {
val config = Config().apply(block)
val aesEncryptionManager = config.encryptionManager
?: throw IllegalArgumentException("AesEncryptionManager must be provided")
return ApiEncryption(aesEncryptionManager)
}
@OptIn(ExperimentalStdlibApi::class, InternalAPI::class)
override fun install(plugin: ApiEncryption, scope: HttpClient) {
val aesEncryptionManager = plugin.aesEncryptionManager
// Encrypt API Request
scope.requestPipeline.intercept(phase = HttpRequestPipeline.Before) {
if (this.context.body !is EmptyContent) {
val originalRequest = this.context.body.toString()
val encryptedRequest =
aesEncryptionManager.encrypt(plainText = originalRequest)
proceedWith(subject = encryptedRequest)
} else {
proceed()
}
}
// Decrypt API Response
scope.responsePipeline.intercept(phase = HttpResponsePipeline.Receive) { (info, body) ->
try {
val encryptedResponse = this.context.response.content.readUTF8Line()
if (encryptedResponse?.isEncryptedResponse() == true) {
aesEncryptionManager.decrypt(
cipherText = encryptedResponse.data?.hexToByteArray()!!,
ivByteArray = encryptedResponse.iv?.hexToByteArray()!!,
).also { decryptedResponse ->
proceedWith(
subject = HttpResponseContainer(
expectedType = info,
response = buildPacket {
writeText(text = decryptedResponse)
},
),
)
}
} else {
proceedWith(
subject = HttpResponseContainer(
expectedType = info,
response = body,
),
)
}
} catch (exception: Exception) {
exception.printStackTrace()
}
}
}
}
}
As of now chucker intercepting a app encrypted request and server encrypted response in Chucker UI.
I want to display decrypted response as well (will be available via ktor HttpResponsePipeline.After)
Is there any plan to support this feature request? or Any way to do this at this momentsVlad
02/18/2025, 11:42 AM