rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.28k stars 847 forks source link

Expo managed flow - android build 403 error (locally) #3603

Open dandrykevych opened 2 months ago

dandrykevych commented 2 months ago

Hey guys, I would like to create/test builds locally before CI and stuck with android for a bit. CI works fine for android/ios, locally I can build for ios only atm. Appreciate any help or advice.

The same opened issue for flutter I saw: https://github.com/mapbox/mapbox-maps-flutter/issues/580

Environment

Steps to reproduce

npx create-expo-app newApp --template blank
cd newApp
expo install @rnmapbox/maps

> add plugin to the app.json

"plugins": [
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsDownloadToken": "TOKEN" // selected every checkbox when generated this token just to be sure
        }
      ]
    ]

eas build --platform android --local

I can confirm that issue is not a token since IOS build is successfull and the app working fine but not for android. However I still get token related error I assume:

[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Could not determine the dependencies of task ':app:buildReleasePreBundle'.
[RUN_GRADLEW] > Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
[RUN_GRADLEW]    > Could not resolve com.mapbox.maps:android:10.16.2.
[RUN_GRADLEW]      Required by:
[RUN_GRADLEW]          project :app > project :rnmapbox_maps
[RUN_GRADLEW]       > Could not resolve com.mapbox.maps:android:10.16.2.
[RUN_GRADLEW]          > Could not get resource 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/10.16.2/android-10.16.2.pom'.
[RUN_GRADLEW]             > Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/10.16.2/android-10.16.2.pom'. Received status code 403 from server: Forbidden
[RUN_GRADLEW]    > Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:6.11.0.
[RUN_GRADLEW]      Required by:
[RUN_GRADLEW]          project :app > project :rnmapbox_maps
[RUN_GRADLEW]       > Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:6.11.0.
[RUN_GRADLEW]          > Could not get resource 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-turf/6.11.0/mapbox-sdk-turf-6.11.0.pom'.
[RUN_GRADLEW]             > Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-turf/6.11.0/mapbox-sdk-turf-6.11.0.pom'. Received status code 403 from server: Forbidden
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] > Get more help at https://help.gradle.org.
[RUN_GRADLEW] BUILD FAILED in 21s
[RUN_GRADLEW] 10 actionable tasks: 10 executed
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
priyanshusaini105 commented 2 months ago

I also getting error while installing

Nitrammets commented 2 months ago

Same problem, but can't even build in CI

mfazekas commented 2 months ago

403 sounds like a token issue. You can check the eas generated project grade files to see if the token is correct in them

Xx-Parks-xX commented 2 months ago

I had same problem, 403 forbidden. I tried with private one and it was ok. I used a full scope token so I don't know witch scope is sufficient