posthog icon indicating copy to clipboard operation
posthog copied to clipboard

Repeat source map uploads fail with Symbol set already has a release ID

Open tlvince opened this issue 1 month ago • 2 comments

Bug Description

I'm trying the new React Native source map uploads feature with Expo EAS (CI) build. Any given commit will trigger development and production build via build profiles.

The first build (production)'s source maps were uploaded correctly:

[2025-11-19T19:38:57.176Z] 2025-11-19T19:38:55.865117Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
[2025-11-19T19:38:57.376Z] 2025-11-19T19:38:57.332789Z  WARN posthog_cli::api::releases: release 01b0270b8d08f5bca1291cb173fe12ac6fa00f64 of project xxx not found
[2025-11-19T19:38:57.575Z] 2025-11-19T19:38:57.507799Z  INFO posthog_cli::api::releases: Release 01b0270b8d08f5bca1291cb173fe12ac6fa00f64 of xxx created successfully! 019a9da0-9220-0000-912a-de2d7c339fae
[2025-11-19T19:38:58.576Z] 2025-11-19T19:38:58.519417Z  INFO posthog_cli::sourcemaps::hermes::clone: Successfully cloned metadata to /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
[2025-11-19T19:38:58.576Z] 2025-11-19T19:38:58.519441Z  INFO posthog_cli::sourcemaps::hermes::clone: Finished cloning metadata
[2025-11-19T19:38:58.577Z] 2025-11-19T19:38:58.556015Z  INFO posthog_cli::invocation_context: Finishing up....
[2025-11-19T19:38:58.577Z] 2025-11-19T19:38:58.559758Z  INFO posthog_cli::invocation_context: Finished!
[2025-11-19T19:38:58.577Z] 2025-11-19T19:38:58.559861Z  INFO posthog_cli: All done, happy hogging!
[2025-11-19T19:38:59.076Z] 2025-11-19T19:38:59.021105Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
[2025-11-19T19:38:59.076Z] 2025-11-19T19:38:59.034119Z  INFO posthog_cli::sourcemaps::hermes::upload: Processing directory: /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release
[2025-11-19T19:38:59.775Z] 2025-11-19T19:38:59.674786Z  INFO posthog_cli::sourcemaps::hermes::upload: Found 1 maps to upload
[2025-11-19T19:38:59.776Z] 2025-11-19T19:38:59.674807Z  INFO posthog_cli::api::symbol_sets: Starting upload of batch 0, 1 symbol sets
[2025-11-19T19:39:00.375Z] 2025-11-19T19:39:00.300815Z  INFO posthog_cli::api::symbol_sets: Server returned 1 upload keys (0 skipped as already present)
[2025-11-19T19:39:03.076Z] 2025-11-19T19:39:03.020868Z  INFO posthog_cli::invocation_context: Finishing up....
[2025-11-19T19:39:03.076Z] 2025-11-19T19:39:03.020894Z  INFO posthog_cli::invocation_context: Finished!
[2025-11-19T19:39:03.076Z] 2025-11-19T19:39:03.020898Z  INFO posthog_cli: All done, happy hogging!

The 2nd build (development) failed with "Symbol set already has a release ID":

2025-11-19T22:36:51.836936Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
2025-11-19T22:36:52.915668Z  WARN posthog_cli::api::releases: release 56712b0ab66c6a2fad3a75b32aded9b304984fe6 of project xxx not found
2025-11-19T22:36:53.088053Z  INFO posthog_cli::api::releases: Release 56712b0ab66c6a2fad3a75b32aded9b304984fe6 of xxx created successfully! 019a9e43-77a0-0000-0256-cab3b06d5e4e
> Task :expo-av:buildCMakeRelWithDebInfo[x86]
> Task :react-native-picker_picker:lintVitalAnalyzeRelease
> Task :react-native-safe-area-context:writeReleaseLintModelMetadata
> Task :expo-av:configureCMakeRelWithDebInfo[x86_64]
> Task :app:createBundleReleaseJsAndAssets_PostHogUpload_com.example.xxx@1.1.7+75_75
2025-11-19T22:36:53.858212Z  INFO posthog_cli::sourcemaps::hermes::clone: Successfully cloned metadata to /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
2025-11-19T22:36:53.858373Z  INFO posthog_cli::sourcemaps::hermes::clone: Finished cloning metadata
2025-11-19T22:36:53.900463Z  INFO posthog_cli::invocation_context: Finishing up....
2025-11-19T22:36:53.904630Z  INFO posthog_cli::invocation_context: Finished!
2025-11-19T22:36:53.904647Z  INFO posthog_cli: All done, happy hogging!
2025-11-19T22:36:54.311993Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
2025-11-19T22:36:54.312917Z  INFO posthog_cli::sourcemaps::hermes::upload: Processing directory: /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release
2025-11-19T22:36:54.750362Z  INFO posthog_cli::sourcemaps::hermes::upload: Found 1 maps to upload
2025-11-19T22:36:54.750388Z  INFO posthog_cli::api::symbol_sets: Starting upload of batch 0, 1 symbol sets
2025-11-19T22:36:55.288693Z ERROR posthog_cli::commands: msg="Oops! Failed to start upload\n\nCaused by:\n    API error: error='validation_error' code='release_id_mismatch' details='Symbol set 185d1725-85f9-4b69-836d-6f2dc2435bd0 already has a release ID'"

Oops! Failed to start upload

Caused by:

    0: API error: error='validation_error' code='release_id_mismatch' details='Symbol set 185d1725-85f9-4b69-836d-6f2dc2435bd0 already has a release ID'

This then fails the build (non-zero exit code). Is this expected? Should've the 2nd upload be skipped?

The project previously used Sentry with the same build set up/profiles, which did not throw this error.

Additional context

posthog-cli v0.5.13

Debug info

- [x] PostHog Cloud, Debug information:

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/019aa1f5-082d-768a-b510-c08e6c0c36ad?t=650
Admin: http://go/adminOrgEU/019483e3-14ab-0000-376d-6449795712f9 (project ID 46465)

tlvince avatar Nov 20 '25 15:11 tlvince

Retesting with [email protected]:

With the same commit, the upload was skipped (ignore the iOS failure):

Image
posthog-cli logs
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:52.127003Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:52.805399Z  INFO posthog_cli::api::releases: found release 4339b1f67d8db34dfa8bab22e873b01d820c5dff of project xxx
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.233074Z  INFO posthog_cli::sourcemaps::hermes::clone: Successfully cloned metadata to /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.233099Z  INFO posthog_cli::sourcemaps::hermes::clone: Finished cloning metadata
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.246271Z  INFO posthog_cli::invocation_context: Finishing up....
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.246294Z  INFO posthog_cli::invocation_context: Finished!
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.246298Z  INFO posthog_cli: All done, happy hogging!
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.606898Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
[2025-11-20T23:47:53.743Z] 2025-11-20T23:47:53.609136Z  INFO posthog_cli::sourcemaps::hermes::upload: Processing directory: /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release
[2025-11-20T23:47:53.942Z] 2025-11-20T23:47:53.873137Z  INFO posthog_cli::sourcemaps::hermes::upload: Found 1 maps to upload
[2025-11-20T23:47:53.942Z] 2025-11-20T23:47:53.876548Z  INFO posthog_cli::api::symbol_sets: Starting upload of batch 0, 1 symbol sets
[2025-11-20T23:47:54.543Z] 2025-11-20T23:47:54.498904Z  INFO posthog_cli::api::symbol_sets: Server returned 0 upload keys (1 skipped as already present)
[2025-11-20T23:47:54.742Z] 2025-11-20T23:47:54.647677Z  INFO posthog_cli::invocation_context: Finishing up....
[2025-11-20T23:47:54.743Z] 2025-11-20T23:47:54.648185Z  INFO posthog_cli::invocation_context: Finished!
[2025-11-20T23:47:54.743Z] 2025-11-20T23:47:54.648193Z  INFO posthog_cli: All done, happy hogging!

With a different commit with an unrelated change (e.g. docs), the validation error is thrown:

Image
posthog-cli logs
2025-11-21T10:24:47.390175Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
2025-11-21T10:24:48.529839Z  WARN posthog_cli::api::releases: release 44092a2133d02d4886d0836dc384b32f7cdb9874 of project xxx not found
2025-11-21T10:24:48.676624Z  INFO posthog_cli::api::releases: Release 44092a2133d02d4886d0836dc384b32f7cdb9874 of xxx created successfully! 019aa5f1-f3e5-0000-39f6-60ff5ff81519
2025-11-21T10:24:49.649696Z  INFO posthog_cli::sourcemaps::hermes::clone: Successfully cloned metadata to /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
2025-11-21T10:24:49.653800Z  INFO posthog_cli::sourcemaps::hermes::clone: Finished cloning metadata
2025-11-21T10:24:49.696343Z  INFO posthog_cli::invocation_context: Finishing up....
2025-11-21T10:24:49.696369Z  INFO posthog_cli::invocation_context: Finished!
2025-11-21T10:24:49.696374Z  INFO posthog_cli: All done, happy hogging!
2025-11-21T10:24:50.145145Z  INFO posthog_cli::utils::auth: Using token from env var, for environment 1234
2025-11-21T10:24:50.149190Z  INFO posthog_cli::sourcemaps::hermes::upload: Processing directory: /home/expo/workingdir/build/workspaces/app/android/app/build/generated/sourcemaps/react/release
2025-11-21T10:24:50.601523Z  INFO posthog_cli::sourcemaps::hermes::upload: Found 1 maps to upload
2025-11-21T10:24:50.601683Z  INFO posthog_cli::api::symbol_sets: Starting upload of batch 0, 1 symbol sets
2025-11-21T10:24:51.197936Z ERROR posthog_cli::commands: msg="Oops! Failed to start upload\n\nCaused by:\n    API error: error='validation_error' code='release_id_mismatch' details='Symbol set bee79104-f877-425d-946f-0cd041c2e0f1 already has a release ID'"
Oops! Failed to start upload

tlvince avatar Nov 21 '25 11:11 tlvince

@tlvince thanks @PostHog/team-error-tracking will tackle this, sorry missed this from this repo, feel free to open issues directly on the sdk/plugin repo

marandaneto avatar Dec 10 '25 09:12 marandaneto