Skip to content

Mappings fail to upload when behind a proxy #199

@jrodbx

Description

@jrodbx

Expected behavior

Bugsnag uploads succeed

Observed behavior

Uploads fail with the following message:
"Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407 Proxy Authentication Required”"

Steps to reproduce

Attempt to access upload.bugsnag.com via a proxy connection

Version

4.7.4

Additional information

After upgrading from 4.0.0 to 4.7.4, we started to see CI build failures when running the uploadBugsnag${VARIANT}Mapping task.

18:29:58  Attempting upload of mapping file to Bugsnag
18:29:58  Bugsnag upload failed: java.net.ConnectException: Connection refused (Connection refused)
18:29:58  
...
18:29:59  
18:29:59  > Task :app:bugsnagReleaseInternal-releaseTask
18:29:59  https://build.bugsnag.com
18:29:59  Failed to POST request
18:29:59  java.io.IOException: Unable to tunnel through proxy. Proxy returns “HTTP/1.1 407 Proxy Authentication Required”
18:29:59  	at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2142)

While reviewing and comparing current and past build logs, we discovered this error message has been logged for awhile, but only surfaced due to this change in 4.1.0:

Note: this version of the plugin will fail the build if a mapping file is not uploaded successfully.
Previously if this occurred the failure would have been logged as an error and the build would have continued.

The root cause: some workers in our CI infrastructure can only make outbound internet connections via an internal proxy, but it appears the upload mapping task currently doesn't support proxy connections or proxy authentication.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest for a new featurereleasedThis feature/bug fix has been released

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions