rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.66k stars 308 forks source link

wrapper: failed with: gRPC call failed: Connection reset by peer #493

Closed insorker closed 1 year ago

insorker commented 1 year ago

Describe the bug bear fails here with

wrapper: failed with: gRPC call failed: Connection reset by peer

I read issue #419 , and solved my problem by commenting shell scripts below.

if [ $GPROXY ]; then
# export http_proxy='http://192.168.137.1:7890'
# export https_proxy='http://192.168.137.1:7890'
# export all_proxy='socks5://192.168.137.1:7890'
# export ALL_PROXY='socks5://192.168.137.1:7890'
fi

Proxy above is determined by clash. I tried to change ip and port randomly, the output was same as #419 .

wrapper: failed with: gRPC call failed: failed to connect to all addresses

I just wonder if this is a bug or something limited by grpc. (PS: why bear v3 must add '--' before commands? I was confused at first time, XD

To Reproduce add proxy in .zshrc, and run bear

export http_proxy='http://IP:PORT'
export https_proxy='http://IP:PORT'
export all_proxy='socks5://IP:PORT'
export ALL_PROXY='socks5://IP:PORT'

Expected behavior

wrapper: failed with: gRPC call failed: Connection reset by peer

or

wrapper: failed with: gRPC call failed: failed to connect to all addresses

Environment:

rizsotto commented 1 year ago

Thanks @insorker for the report. The problem roots from that Bear is using gRPC for IPC. This is not easy to change. But maybe I should document that proxy environment variables are influencing the capture process.