DataDog / dd-sdk-android-gradle-plugin

The Datadog Gradle Plugin for Android
Apache License 2.0
14 stars 9 forks source link

Unable to upload mapping file for appId {variant: production} because of a request timeout; check your network connection #120

Closed shivamInshorts closed 1 year ago

shivamInshorts commented 1 year ago

Describe what happened After running ./gradlew :app:uploadMappingRelease for the production release of my app it throws the following error

Execution failed for task ':mobile:uploadMappingProductionRelease'.

Unable to upload mapping file for APPLICATION_ID:VERSION {variant:production} because of a request timeout; check your network connection.

BUILD FAILED in 2m 6s

My app's mapping.txt file is 21.03 MB

Steps to reproduce the issue:

  1. Add Datadog dependencies and build app in production release
  2. Mapping file
  3. export DD_API_KEY=
  4. Run ./gradlew :app:uploadMappingRelease

Describe what you expected: mapping.txt should have been uploaded successfully

Additional context

Am I missing something in this?

0xnm commented 1 year ago

Hello @shivamInshorts. We have write timeout set to 45 seconds in our plugin, which means mapping file transfer should be no longer that 45 seconds. Do you have an internet connection with enough speed?

shivamInshorts commented 1 year ago

Thanks for the quick reply. I have a decent internet speed of 30 Mbps. Also Is it so necessary for Datadog to put constraints on both time(45 sec) and size(50 MB according to docs)?

0xnm commented 1 year ago

These are the current constraints of our intakes. Are you able to connect to https://sourcemap-intake.datadoghq.com/api/v2/srcmap from your machine? If you are using another site, you can check the list of the hosts here.

shivamInshorts commented 1 year ago

yes I'm able to connect to https://sourcemap-intake.datadoghq.com/api/v2/srcmap.

0xnm commented 1 year ago

Can you run Gradle with info logging and see if upload fails approximately after 45 seconds or earlier? This will help us to understand if the issue is on the client or on the server side.

shivamInshorts commented 1 year ago

I ran it with --info and it takes approximately 2 mins finish & fail the gradle task. Also I was just trying different approaches to debug this and tried to upload an empty mapping.txt(deleting the original one), which uploads instantly within 2-3 seconds.

shivamInshorts commented 1 year ago

Thanks @0xnm I switched to a different network where the speed was 70 - 80 Mbps and it uploaded within 10 seconds. Thanks for the help 🥳