Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Atlantis is conflicting with my URLProtocol #113

Open
ChrisMash opened this issue Aug 5, 2022 · 1 comment
Open

Atlantis is conflicting with my URLProtocol #113

ChrisMash opened this issue Aug 5, 2022 · 1 comment
Assignees

Comments

@ChrisMash
Copy link

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.

@NghiaTranUIT
Copy link
Member

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

Going to investigate it 👍

@NghiaTranUIT NghiaTranUIT self-assigned this Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants