[GH-ISSUE #113] Atlantis is conflicting with my URLProtocol #69

Open
opened 2026-03-03 19:11:31 +03:00 by kerem · 1 comment
Owner

Originally created by @ChrisMash on GitHub (Aug 5, 2022).
Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/113

Originally assigned to: @NghiaTranUIT on GitHub.

The Atlantis library has been really useful because I couldn't get a working setup with just the Proxyman macOS app due to VPN issues (though have just managed to hopefully finally resolve that by using the allow-list!) and Alantis actually managed to get network logs working!

But there were some quirks regarding how Atlantis intercepts the network traffic and my app's own networking complexities conflicted (both use URLProtocol). It basically meant that the network logs weren't showing an accurate or stable picture of what was conceptually happening.

Largely this was down to my networking code intercepting looking for specific error responses to requests within my URLProtocol and then replaying the request differently to get a successful response (relating to handling custom authentication challenges).

I've put together a simple sample app that illustrates the difference between using Atlantis and not in this sort of scenario:
AtlantisTest.zip

The sample app sends a request that gets a 404 response, catches that in my URLProtocol and then makes another request that gets a 200 and reports that result to the request that made the 404 request. So the original request doesn't know about the replay, but gets the result that it really wanted (it's a simplified example so might not make a huge amount of sense!)

Without Atlantis without atlantis.proxymanlog.zip
Screenshot 2022-08-05 at 15 35 40
Just see the two requests, with IDs ordered the same as their timestamps, which is what I'd hope for as this is the reality

With Atlantis with atlantis.proxymanlog.zip
Screenshot 2022-08-05 at 15 35 06
See four requests, with IDs that don't match the order of the timestamps. This obviously makes it hard to look at exported network logs and make sense of what was really going on.

Not sure if there's a huge amount that can be done about this though! Even if I register my URLProtocol before or after starting Atlantis the result is the same.

Originally created by @ChrisMash on GitHub (Aug 5, 2022). Original GitHub issue: https://github.com/ProxymanApp/atlantis/issues/113 Originally assigned to: @NghiaTranUIT on GitHub. The Atlantis library has been really useful because I couldn't get a working setup with just the Proxyman macOS app due to VPN issues (though have just managed to hopefully finally resolve that by using the allow-list!) and Alantis actually managed to get network logs working! _But_ there were some quirks regarding how Atlantis intercepts the network traffic and my app's own networking complexities conflicted (both use `URLProtocol`). It basically meant that the network logs weren't showing an accurate or stable picture of what was conceptually happening. Largely this was down to my networking code intercepting looking for specific error responses to requests within my `URLProtocol` and then replaying the request differently to get a successful response (relating to handling custom authentication challenges). I've put together a simple sample app that illustrates the difference between using Atlantis and not in this sort of scenario: [AtlantisTest.zip](https://github.com/ProxymanApp/atlantis/files/9269463/AtlantisTest.zip) The sample app sends a request that gets a 404 response, catches that in my `URLProtocol` and then makes another request that gets a 200 and reports that result to the request that made the 404 request. So the original request doesn't know about the replay, but gets the result that it really wanted (it's a simplified example so might not make a huge amount of sense!) __Without__ Atlantis [without atlantis.proxymanlog.zip](https://github.com/ProxymanApp/atlantis/files/9269511/without.atlantis.proxymanlog.zip) ![Screenshot 2022-08-05 at 15 35 40](https://user-images.githubusercontent.com/2419640/183099703-2cd5028e-b997-48c0-b757-2a074b5c2e91.png) Just see the two requests, with IDs ordered the same as their timestamps, which is what I'd hope for as this is the reality __With__ Atlantis [with atlantis.proxymanlog.zip](https://github.com/ProxymanApp/atlantis/files/9269509/with.atlantis.proxymanlog.zip) ![Screenshot 2022-08-05 at 15 35 06](https://user-images.githubusercontent.com/2419640/183099676-b9443eaf-ee3e-4c83-94a7-dfd5027b9a78.png) See four requests, with IDs that don't match the order of the timestamps. This obviously makes it hard to look at exported network logs and make sense of what was really going on. Not sure if there's a huge amount that can be done about this though! Even if I register my `URLProtocol` before or after starting Atlantis the result is the same.
Author
Owner

@NghiaTranUIT commented on GitHub (Sep 5, 2022):

Sorry for the late reply. I totally missed your issue 😿

Going to investigate it 👍

<!-- gh-comment-id:1236474024 --> @NghiaTranUIT commented on GitHub (Sep 5, 2022): Sorry for the late reply. I totally missed your issue 😿 Going to investigate it 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/atlantis#69
No description provided.