Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug(Android): SDK Registry token is null #787

Open
YuuWoods opened this issue Nov 27, 2024 · 6 comments
Open

Bug(Android): SDK Registry token is null #787

YuuWoods opened this issue Nov 27, 2024 · 6 comments

Comments

@YuuWoods
Copy link

I downloaded mapbox-maps-flutter2.4.1 from below, opened the example folder in Android Studio and tried to build it on Android.
https://github.com/mapbox/mapbox-maps-flutter

I could not build it with the following error

Launching lib/main dart on ***** in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
* Where:
Build file '/Users/*****/mapbox-maps-flutter/android/build.gradle' line: 21
* What went wrong:
A problem occurred evaluating project ':mapbox_maps_flutter'.
> SDK Registry token is null. See README.md for more information.

I followed the documentation below.
https://docs.mapbox.com/flutter/maps/guides/install/

There is no mention of “SDK Registry token” in this document, and the CHANGELOG.md for mapbox-maps-flutter states the following.

> [!IMPORTANT]
> Configuring Mapbox's secret token is no longer required when installing our SDKs.
スクリーンショット 2024-11-27 16 45 47

It would be helpful if you could please fix this.

@JakubBatel
Copy link

Seems like you actually need the "SDK Registry token" even though the documentation says otherwise. I tried calling the SDK without the token manually and it returned 403 Forbidden. So I've added the SDK Registry token according to some old tutorials and it works like a charm.

Here is a simple breakdown what to do:

  1. Create Mapbox account
  2. Go to Tokens
  3. Create a new token and make sure that Secret scope DOWNLOADS:READ is selected
  4. Copy the token and put the following line into ~/.gradle/gradle.properties
    SDK_REGISTRY_TOKEN=YOUR_TOKEN_HERE
  5. Build the app as usual

@YuuWoods
Copy link
Author

@JakubBatel
Thanks for the advice.
I posted this because I thought I might have forgotten to set something or other on the mapbox side, as it is stated in the CHANGELOG.md that secret token no longer needs to be set.

@JakubBatel
Copy link

@YuuWoods No doubt there is some issue on the Mapbox side. I just wanted to provide temporary solution for you and anyone else who will stumble upon this issue. I hope they will fix it soon life without the SDK registry token would be much nicer 😄

@YuuWoods
Copy link
Author

@JakubBatel
Thanks again for the help! Hopefully they'll get it fixed soon, but in the meantime, I really appreciate you having my back.

@maios
Copy link
Contributor

maios commented Dec 17, 2024

Hi @YuuWoods, we have addressed in #789 to remove the SDK registry token requirements in build script, could you please checkout v2.5.0-rc.1 to confirm this?

@YuuWoods
Copy link
Author

@maios
I confirmed.
I was able to build without a “secret token”.
Thank you very much for your support.

It would be helpful if you could tell us when the official release will be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants