mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 16:45:57 +03:00
[GH-ISSUE #1241] Duplicated calls with 0 bytes #1237
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#1237
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ekurdesov on GitHub (May 19, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1241
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (Ex. Proxyman 1.4.3)
Version 3.5.0 (30500)
macOS Version? (Ex. mac 10.14)
11.6.4 (20G417)
Steps to reproduce
We are seeing multiple calls in proxyman dashboard, there will be 1 call with data returned back but other 3-4 calls will have 0 bytes on it. Tried to get the same results using Charles proxy but can't observe it there.
This was reproduced by my colleague as well and confirmed that Charles proxy isn't showing those duplicated calls.
Expected behavior
Seeing 1 single call in logs instead of 3-4
Screenshots (optional)
@ekurdesov commented on GitHub (May 19, 2022):
the difference between them could vary in like 10-20ms but the only 1 call will have a response with the data.
@Groovee60 commented on GitHub (May 19, 2022):
We also verified that our client code is only making one API call corresponding to these unexpected duplicate traffic listings.
Additionally, it now seems that we can only reproduce the failure immediately after clearing Proxyman's traffic window via the garbage can icon at the top of the screen.
@NghiaTranUIT commented on GitHub (May 19, 2022):
Thanks @ekurdesov and @Groovee60 for the report.
Just wondering:
Meanwhile, I will try to reproduce it in my end 👍
@Groovee60 commented on GitHub (May 20, 2022):
Hello, @NghiaTranUIT,
I did reach out to an iOS colleague and he confirmed that he had seen unexpected 0 byte responses. But we have yet to regress the specific steps we were able to nail down. We'll see if we can get further corroboration for you.
When I first saw the multiple API calls, I determined that in some cases, it was a client failure - i.e., I was not inhibiting the user from inadvertently requesting the refresh mechanism twice. When I fixed that, the problem seemed to be resolved, but I soon discovered that the multiple calls could still occur, and later determined that it seemed to require the clearing of the traffic window. None of this makes sense to me, but maybe it will be of assistance to you in reproducing it.
And yes, I was working on a physical device and my colleague was working with an emulator.
Thanks!
@NghiaTranUIT commented on GitHub (May 22, 2022):
Thanks for the input. I will investigate this issue this week 👍
@NghiaTranUIT commented on GitHub (May 23, 2022):
@Groovee60 what Networking library you're using on Android? Is it okhttp or retrofit or fast? 🤔
@Groovee60 commented on GitHub (May 23, 2022):
Retrofit 2.9.0
@NghiaTranUIT commented on GitHub (May 30, 2022):
@Groovee60 @ekurdesov if you don't mind, please try this Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.0_Fix_Duplicate_issue.dmg
Basically, when the connection is closed, Proxyman might incorrectly generate duplicated requests. Thus, it displays multiple requests.
Let me know if it fixes for you 👍
@Groovee60 commented on GitHub (May 31, 2022):
Hello - I'm sorry to report that I am still seeing the same failure - three entries for an API endpoint after invoking it only once.
.
@Groovee60 commented on GitHub (May 31, 2022):
@NghiaTranUIT commented on GitHub (Jun 1, 2022):
@Groovee60 It seems they are 3 separate requests, doesn't it? You can see they both have the Response Size, not zero bytes.
Just a side question: Do you have an app on PlayStore that I can install to my Emulator for testing?
@Groovee60 commented on GitHub (Jun 1, 2022):
I'm afraid we don't have an app on the PlayStore, it is an internal app. My logging shows that the API call is only being made once. At first I assumed it was some unexpected/misunderstood behavior of Retrofit, but I gave up on that theory when 1) it didn't happen with Charles as the web proxy and 2) it only happened after clearing the Proxyman window.
@NghiaTranUIT commented on GitHub (Jun 1, 2022):
Good news @Groovee60 @ekurdesov 🙌, I'm able to reproduce your issue, and here is the fix: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.1_Fix_duplicate_request_after_clearing_the_session.dmg
Basically, after we click on the Clear Session button, Proxyman will close all Swift NIO Channels. However, it's an async process. Thus, some requests might be added to the pool.
The fix makes sure that it properly closes the channel.
Not sure why it only happens on Android apps, and it works fine for iOS apps.
@Groovee60 commented on GitHub (Jun 1, 2022):
Looks like you nailed it - thanks!!!
@NghiaTranUIT commented on GitHub (Jun 2, 2022):
Thanks. I have 1 customer that confirmed this issue is fixed on their side too. I'm going to release a hotfit today 👍
@NghiaTranUIT commented on GitHub (Jun 2, 2022):
@Groovee60 I've released this fix on Proxyman 3.5.2, please update it 👍
Thanks guys for helping me to solve this case 😄
@adamdahan commented on GitHub (Jan 21, 2023):
This is still a problem with iOS
@adamdahan commented on GitHub (Jan 21, 2023):
I see 4 requests for each 1 request in my iOS app
@NghiaTranUIT commented on GitHub (Jan 22, 2023):
Hi @adamdahan you means the Proxyman for iOS app? If it's, what version you're using 🤔
@adamdahan commented on GitHub (Jan 22, 2023):
@NghiaTranUIT this is in the proxyman app. I can tail my server logs and see only a single request but in proxyman app for mac version 4.0.0 you see 4 x the amount of requests for every single endpoint. It's actually what made me stop using the app entirely. It's a lovely product but seems there are some core issues that need some TLC.
@adamdahan commented on GitHub (Jan 22, 2023):
The Traffic.Package has different UUID for same requests as well.
@NghiaTranUIT commented on GitHub (Jan 23, 2023):
@adamdahan not sure what the "Traffic.Package" is?
Can you share with me the name of your iOS app on AppStore? I'd like to download and investigate the bug.
@adamdahan commented on GitHub (Jan 23, 2023):
🤔 TrafficPackage is literally the class in Atlantis that represents an intercepted http request.
https://github.com/ProxymanApp/atlantis/blob/main/Sources/Packages.swift@adamdahan commented on GitHub (Jan 23, 2023):
And you can use any app, the proxyman app shows multiple requests for any http request. My app isn't special.
@NghiaTranUIT commented on GitHub (Jan 23, 2023):
Thanks. I'd like to verify @adamdahan
and you see multiple requests for a single request.
Is it correct? Sorry due to lack of information.
@adamdahan commented on GitHub (Jan 23, 2023):
And I see multiple requests for every request, whether it be from my app or third party sdk like snapchat / firebase etc...
@adamdahan commented on GitHub (Jan 23, 2023):
Sometimes filter by 2xx will clean the requests so it only shows 1. But this is only once in a while. Usually 4x per request.
@NghiaTranUIT commented on GitHub (Jan 23, 2023):
@adamdahan Sorry but I could not find a reliable way to reproduce your issue. Here is what I've tried:
Result
If you don't mind @adamdahan , please open the Podfile.lock and share with me the Atlantis version? If it's not the latest version, please update it. I remember that this duplicated was fixed in the latest Atlantis build.
@adamdahan commented on GitHub (Jan 23, 2023):
Oh you know what - this is using an older version of atlantis, Podfile.lock:
- atlantis-proxyman (1.18.2)@adamdahan commented on GitHub (Jan 23, 2023):
Let me upgrade to the latest and test again - I will report back - if I find issue I will upload a video for you to see. Keep you posted.
@adamdahan commented on GitHub (Jan 23, 2023):
Bug still persists. See image below running Proxyman 4.0.0, Atlantis 1.20.0, iOS 16:
[TERMINAL] - Dev server showing a single POST request transmitted
/ratings[PROXYMAN] - Showing 4 API requests.