Skip to content

@rnmapbox/maps cannot be upgraded past 10.1.x: MapboxCommon 24.x needs a secret downloads token we don't have #509

Closed

Description

@thinkclay

What

Dependabot's @rnmapbox/maps 10.1.45 → 10.3.5 bump (part of the everything-else group, #505) breaks the iOS build at pod install. Caught locally before it reached EAS; the bump has been held back out of the batch that lands the rest of that group.

Why

10.3.x pulls MapboxCommon 24.23.1. Mapbox serves 24.x only from its gated downloads API, which requires a secret token (sk.) carrying DOWNLOADS:READ. What we supply is public:

apps/scaffald/app.config.ts:367
RNMapboxMapsDownloadToken: process.env.MAPBOX_DOWNLOADS_TOKEN || process.env.EXPO_PUBLIC_MAPBOX_TOKEN

MAPBOX_DOWNLOADS_TOKEN is set in no env file (.env, .env.dev, .env.preview, .env.production) and in no EAS environment (checked preview and production — they hold only APPLE_SECRET, RESEND_API_KEY, POSTHOG_KEY_PROD). So it always falls back to EXPO_PUBLIC_MAPBOX_TOKEN, which is a pk. token by construction, and Mapbox answers 403:

curl -u mapbox:pk.eyJ1Ijoic2NhZmZhbGQi… \
  https://api.mapbox.com/downloads/v2/mapbox-common/releases/ios/packages/24.23.1/MapboxCommon.zip
curl: (56) The requested URL returned error: 403

Note the explicit -u overrides ~/.netrc, so local netrc mapbox entries do not rescue it either.

Why it looked fine until now

10.1.45 resolves MapboxCommon 23.12.0, which predates the gating — and locally it is already in ~/Library/Caches/CocoaPods/Pods/Release/MapboxCommon/23.12.0-9fe25, so nothing was ever downloaded. An EAS builder has neither the warm cache nor a netrc, which is why this would have surfaced as a remote failure at the Install pods phase — historically the most expensive place to find a problem here (see the AppCheckCore saga, resolved 2026-06-18).

To actually do the upgrade

  1. Mint a Mapbox secret token with DOWNLOADS:READ.
  2. Add it as MAPBOX_DOWNLOADS_TOKEN to the EAS production (and preview) environments, and to local .env* for anyone running pod install.
  3. Then bump @rnmapbox/maps and verify with a local expo prebuild --platform ios --clean && pod install before spending an EAS build.

Until then the catalog entry carries a comment pointing here so the next dependabot bump doesn't silently re-land it.

Unrelated but adjacent

10.3.x also deprecates the config key itself: RNMapboxMapsDownloadToken is deprecated. Use RNMAPBOX_MAPS_DOWNLOAD_TOKEN environment variable instead. Worth folding into the same change.

Activity

  1. added a commit that references this issue on Jul 30, 2026
  2. thinkclay commented on Aug 27, 2026

    @thinkclay
    ContributorAuthor

    Held back for a second wave. Dependabot's everything-else group (#642) proposed the same @rnmapbox/maps ~10.1.45 → ~10.3.5 again; the catalog comment did its job and the bump was pulled out of the batch rather than re-landed.

    Nothing has changed on the blocking side: MAPBOX_DOWNLOADS_TOKEN is still set in no env file and no EAS environment, so RNMapboxMapsDownloadToken still falls back to the public pk. token and MapboxCommon 24.x still 403s at pod install.

    The mapbox-gl catalog entry (~3.27.0 → ~3.29.0) was taken in this batch — it is the web GL library and does not touch the CocoaPods path, so it is not coupled to this.

    This will keep recurring every wave until the secret token is provisioned. If that is not happening soon, the cheaper move is a dependabot.yml ignore entry for @rnmapbox/maps pointing here, the same way the Expo family is handled (#483).

  3. added 2 commits that reference this issue on Aug 27, 2026
  4. added a commit that references this issue on Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions