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

Remove the need for the MapBox Access token when building FHIR Core #3360

Open
1 task
dubdabasoduba opened this issue Jul 2, 2024 · 4 comments · May be fixed by #3674
Open
1 task

Remove the need for the MapBox Access token when building FHIR Core #3360

dubdabasoduba opened this issue Jul 2, 2024 · 4 comments · May be fixed by #3674
Assignees
Labels
Enhancement New feature or request

Comments

@dubdabasoduba
Copy link
Member

Describe the feature request.

  • The OpenSRP mobile app codename fhircore uses MapBox for the Geo-Widget for mapping.
  • MapBox requires an access token to allow access to the MapBox dependencies.
  • The Geo-Wdiget module is optional so the Mapbox dependency is not needed at every time.
  • This ticket is meant to decouple the MapBox dependency for apps that don't need Geo-Widget

Acceptance criteria

  • Be able to build the FHIR core app without without the MapBox dependency

Implementation plan (For Engineers)
The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed.
i.e. Describe how you intend to solve the problem

@dubdabasoduba dubdabasoduba added the Enhancement New feature or request label Jul 2, 2024
@aurangzaibumer
Copy link
Contributor

I have tested this by doing the following things to reproduce

  1. Removing mapbox token from local.properties to fail compilation of the project
  2. Doing step#1 and changed project from eusm to any other project
  3. Cloning new repository and trying to build the main without the local.properties
  4. Deleting .gradle folder and trying to recompile
  5. Invalidating/deleting cache of the android studio in order to fail compile without the mapbox sdk token

Still, I'm able to compile the project without the mapbox sdk token in the local.properties.

@dubdabasoduba

@Aleem92
Copy link
Contributor

Aleem92 commented Jan 13, 2025

Mapbox has made a significant change to their SDK distribution model. Previously, their Maven repository required authentication with a token, which would cause a 401 Unauthorized error if MAPBOX_SDK_TOKEN was not provided.

For reference, here's the error we used to encounter when building the project without providing the MAPBOX_SDK_TOKEN:
Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-android-sdk/9.7.1/mapbox-android-sdk-9.7.1.pom'. Received status code 401 from server: Unauthorized

Recently, Mapbox moved their Android SDK artifacts to Maven Central, making them publicly accessible without requiring authentication. As a result, we can now build the FHIR core app without providing the authentication required in gradle file by the Mapbox SDK while downloading the dependencies.

@Aleem92
Copy link
Contributor

Aleem92 commented Jan 14, 2025

Mapbox has made a significant change to their SDK distribution model. Previously, their Maven repository required authentication with a token, which would cause a 401 Unauthorized error if MAPBOX_SDK_TOKEN was not provided.

For reference, here's the error we used to encounter when building the project without providing the MAPBOX_SDK_TOKEN: Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-android-sdk/9.7.1/mapbox-android-sdk-9.7.1.pom'. Received status code 401 from server: Unauthorized

Recently, Mapbox moved their Android SDK artifacts to Maven Central, making them publicly accessible without requiring authentication. As a result, we can now build the FHIR core app without providing the authentication required in gradle file by the Mapbox SDK while downloading the dependencies.

Furthermore, these authentication-free changes are available in the newer versions of Mapbox SDK (versions 10.x.x and 11.x.x). Given this improvement, we should consider updating the Mapbox dependencies used in the Kujaku library (https://github.com/onaio/kujaku) to leverage these newer versions and simplify the dependency management process.

@ndegwamartin
Copy link
Contributor

This is blocked by the ticket here - onaio/kujaku#382

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

Successfully merging a pull request may close this issue.

5 participants