ChuckerTeam/chucker

Chucker doesnt allow saving file of this request

MadRatSRP opened this issue · 8 comments

✍️ Bug description

Request and response body copied from Chucker:
URL: https://example.com/
Method: POST
Protocol: null
Status: Failed
Response: javax.net.ssl.SSLHandshakeException: Unacceptable certificate: CN=GlobalSign Root CA, OU=Root CA, O=GlobalSign nv-sa, C=BE
SSL: Yes
Request time: Tue May 02 20:30:37 GMT+03:00 2023
Response time: null
Duration: null

Request size: 43 B
Response size: null
Total size: 43 B
---------- Request ----------
{
"login": "example" }
---------- Response ----------
(body is empty)

When i press save button on it it says "Failed to save file" (but it still saves an empty file)
With other requests i was able to save file properly, with requests like this one - nope.

📱 Tech info

  • Device: Redmi 9C NFC
  • OS: Android 10
  • Chucker version: 3.5.2

When i press save button on it it says "Failed to save file" (but it still saves an empty file)
With other requests i was able to save file properly, with requests like this one - nope.

Can you provide a logcat of what is happening?
Is there anything specific in this request that might cause the failing?

I don't think there is something specific in request.

I sorted logcat by ERROR and WARN levels and after i click save button (not save icon one) here is what logcat shows:

19:32:35.922 W removeWindowToken: Attempted to remove non-existing token: android.os.Binder@5588798
19:32:36.241 W java.io.IOException: Transaction not ready
19:32:36.241 W at com.chuckerteam.chucker.internal.ui.transaction.TransactionPayloadFragment$saveToFile$3.invokeSuspend(TransactionPayloadFragment.kt:283)
19:32:36.241 W at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
19:32:36.241 W at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
19:32:36.242 W at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
19:32:36.242 W at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
19:32:36.242 W at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
19:32:36.242 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
19:32:36.242 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
19:32:36.242 W at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
19:32:36.326 E App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
19:32:36.597 E perfLockRel handle:10626

also logcat writes this after i click save icon button and explorer screen shows up:
19:37:43.523 E No package ID ff found for ID 0xffffffff.
19:37:43.562 E No package ID ff found for ID 0xffffffff.
19:37:43.570 E App trying to use insecure INPUT_FEATURE_NO_INPUT_CHANNEL flag. Ignoring
19:37:43.576 E No package ID ff found for ID 0xffffffff.
19:37:43.684 E No package ID ff found for ID 0xffffffff.
19:37:43.822 E perfLockRel handle:10639
19:37:44.179 E No package ID ff found for ID 0xffffffff.

Any thoughts about it?

Response size: null

I believe what is happening is that this HTTP response failed to save as it has no body so Chucker can't save it. I'm unsure what are you looking into doing @MadRatSRP, like why do you want to save it?

Response size: null

I believe what is happening is that this HTTP response failed to save as it has no body so Chucker can't save it. I'm unsure what are you looking into doing @MadRatSRP, like why do you want to save it?

This problems happens when our server doesnt have valid SSL sertificate.

Why do i want to save it as a file - for sharing it from external device where i don't have installed telegram, e.t.c for sharing directly so i would have to create text document, copy text from Chucker and then move the document.

Why doesnt it allow to save it as a file when this error occurs?

I understand now what i was missing - i thought that clicking save button on Response tab allow you to save an entire file, hence why i thought of empty file as a bug.

Could you please add a way to save entire request with responce, e.t.c as a file? By clicking save button. Or to add an option to save a file into explorer when we press "Share as file"?

Also one more thing to add - instead of showing "Failed to save file" message (which for the most users tells about something about permission not granted, e.t.c) when response | request body is empty, please show the exact message, "response is empty" | "request is empty" when trying to save files like these.

This will help most users like myself to understand whats going on faster. It may sound like the obvious thing, but its not always like this, you know :D

Could you please add a way to save entire request with responce, e.t.c as a file? By clicking save button. Or to add an option to save a file into explorer when we press "Share as file"?

That's already possible today with the "Share as file" which allows you to save the whole file.
I've improved the error message here: #1038