lightbody / browsermob-proxy

A free utility to help web developers watch and manipulate network traffic from their AJAX applications.
http://bmp.lightbody.net
Apache License 2.0
2.17k stars 658 forks source link

"ERR_EMPTY_RESPONSE" Android #863

Open EvilCifer opened 4 years ago

EvilCifer commented 4 years ago

Hi,

I'm trying to implement the browsermob api in an Android App. It looks like it is starts the Proxy, but everytime I set the Proxy in the Wifi settings I'm getting an "ERR_EMPTY_RESPONSE" from Chrome. I also installed the keystore (.p12).

I've also tried out a different Browser (Firefox for Android) and this one says, that the authentication with the remote server failed.

Bildschirmfoto von 2020-08-27 15-20-49

aristeia commented 4 years ago

I am seeing this myself too:


      - BROWSERMOB_PORT=7500
      - ./browsermob-proxy-2.1.4/bin/browsermob-proxy -port $BROWSERMOB_PORT >> $DEVICEFARM_LOG_DIR/browsermob.log 2>&1 &

      - >-
        start_proxy_timeout=0;
        PROXY_PORT=$(curl -X POST http://localhost:$BROWSERMOB_PORT/proxy | grep "port" | cut -d":" -f2 | cut -d "}" -f1);
        while [ "$PROXY_PORT" = "" ];
        do
            if [ $start_proxy_timeout -gt 30 ];
            then
                echo "proxy never started in 30 seconds. Exiting";
                exit 1;
            fi;
            echo "Waiting for proxy to start. Sleeping for 1 second";
            sleep 1;
            start_proxy_timeout=$((start_proxy_timeout+1));
            PROXY_PORT=$(curl -X POST http://localhost:$BROWSERMOB_PORT/proxy | grep "port" | cut -d":" -f2 | cut -d "}" -f1);
        done;

      - adb reverse tcp:$PROXY_PORT tcp:$PROXY_PORT
      - adb shell settings put global http_proxy localhost:$PROXY_PORT

It appears my proxy configuration is correct, but for whatever reason, data isn't being returned from my requests.

lindaxuxlj commented 3 years ago

I am seeing the same error on Chrome