Coder Social home page Coder Social logo

Oh no! We couldn't connect to HTTP Toolkit. Is it running, and connected to the same network as this device? about httptoolkit-android HOT 5 CLOSED

httptoolkit avatar httptoolkit commented on May 19, 2024
Oh no! We couldn't connect to HTTP Toolkit. Is it running, and connected to the same network as this device?

from httptoolkit-android.

Comments (5)

pimterry avatar pimterry commented on May 19, 2024 1

Excellent! I'll close this now, glad that sorted it for you 👍

from httptoolkit-android.

pimterry avatar pimterry commented on May 19, 2024

Thanks @thorbn. When this happens, does anything appear on the 'View' page on your computer? If the phone can connect to your computer, there should be at least one http://android.httptoolkit.tech/config request there that's sent during setup.

from httptoolkit-android.

thorbn avatar thorbn commented on May 19, 2024

Hello. There is nothing appearing in the "View" tab on my computer. I don't get anything on my computer, just the error message on my phone.

from httptoolkit-android.

pimterry avatar pimterry commented on May 19, 2024

Ok, it's almost certain that there's some kind of connectivity issue in that case. At this stage the app is sending an HTTP request to your computer on your proxy port (8000, by default) testing each of your computer's IP addresses to see how to connect, and it's not arriving on any of them.

There's lots of things that can cause this unfortunately. Some networks don't allow connectivity between local devices, which would do this, as would a firewall on your computer that blocks all connections to that port.

You can test connectivity by trying to open http://<your computer's IP>:8000/ in a browser on your device. If you can connect, you should see a request appear on the View page, and see a response appear in the browser on your phone (typically a message like 'Passthrough loop detected' unless you've added a custom rule, because you're not really supposed to make direct requests to the proxy). In this case though, you'll probably see an error that may tell you more about the connectivity issues.

If none of that comes up with any clues, you can also try looking at the raw logs from the device. Those are available via ADB with adb logcat -T1, and you'll see messages in there like:

tech.httptoolkit.android.MainActivity: Connecting to VPN from URL: https://android.httptoolkit.tech/connect/?data=...
tech.httptoolkit.android.ProxySetup: URL data is {"addresses":["$IP", "$ANOTHER_IP"],"port":8000,"localTunnelPort":8000,"certFingerprint":"QWEASDQWEASDqweasdqweasd="}
tech.httptoolkit.android (kotlinx.coroutines.SupervisorCoroutine): Validating proxy info ProxyInfo(addresses=[$IP, $ANOTHER_IP], port=8000, localTunnelPort=8000, certFingerprint=QWEASDQWEASDqweasdqweasd=)
tech.httptoolkit.android (kotlinx.coroutines.SupervisorCoroutine): Proxy tests started
tech.httptoolkit.android (kotlinx.coroutines.UndispatchedCoroutine): Testing proxy $IP:8000
tech.httptoolkit.android (kotlinx.coroutines.UndispatchedCoroutine): Testing proxy $ANOTHER_IP:8000
tech.httptoolkit.android (kotlinx.coroutines.UndispatchedCoroutine): Error testing proxy address $IP: java.net.ConnectException: Failed to connect to $IP
tech.httptoolkit.android (kotlinx.coroutines.UndispatchedCoroutine): Error testing proxy address $ANOTHERIP: java.net.SocketTimeoutException: connect timed out

That will at least tell you exactly what IPs were used, and what the connection errors are. It's also technically possible something else could be failing here and causing this behaviour, and that will be listed in here if so, but I've never seen anything but connectivity problems cause cases like this so I'd be pretty surprised.

from httptoolkit-android.

thorbn avatar thorbn commented on May 19, 2024

Thanks for your help. I deactivated all firewalls that could be causing this and now it's working!

from httptoolkit-android.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.