Skip to content

fix(android): track Fastlane Gemfile.lock to fix android-deploy#698

Merged
TaprootFreak merged 2 commits into
stagingfrom
feature/android-gemfile-lock
Jun 5, 2026
Merged

fix(android): track Fastlane Gemfile.lock to fix android-deploy#698
TaprootFreak merged 2 commits into
stagingfrom
feature/android-gemfile-lock

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

@TaprootFreak TaprootFreak commented Jun 5, 2026

Problem

The android-deploy lane (Release workflow, Upload to Play Store step) fails with:

bundler: failed to load command: fastlane
multi_json is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
  …representable-3.2.0/lib/representable/json.rb:1
  …google-apis-core-0.18.0/.../json_representation.rb:15
  …fastlane-2.235.0/.../create_app_on_managed_play_store.rb:1

Root cause

android/ had no committed Gemfile.lock (the global *.lock rule in .gitignore covers it, and unlike ios/ it was never tracked). So bundle install resolved gems fresh on every run — a non-reproducible build.

The previous release (v1.0.85) passed with the same Gemfile; the next run's fresh resolution pulled fastlane 2.235.0, whose google-apis → representable/json load path requires multi_json, which was no longer in the resolved bundle → LoadError before upload.

ios-deploy stayed green because ios/Gemfile.lock is committed (pins fastlane 2.232.2 + multi_json 1.19.1).

Fix

  1. Commit android/Gemfile.lock seeded from the proven ios/Gemfile.lock (the two Gemfiles are otherwise identical), giving a known-good graph: fastlane 2.232.2, multi_json 1.19.1.
  2. Add .gitignore negations (!android/Gemfile.lock, !ios/Gemfile.lock) so the lockfiles stay tracked despite the global *.lock rule, with a self-documenting comment.
  3. Pin fastlane to 2.232.2 in android/Gemfile (lock DEPENDENCIES synced to fastlane (= 2.232.2)). The android runner is ubuntu-latest and the lock carries arm64-darwin + ruby platforms; the non-frozen bundle install adds the linux platform at runtime. The exact pin guarantees no resolution path can re-select the broken 2.235.0 — multi_json 1.19.1 stays required transitively via googleauth/signet.

Note: after step 3 the android lock is no longer byte-identical to ios — the DEPENDENCIES line differs intentionally (= 2.232.2 vs ios >= 2.220). The resolved gem specs are identical.

Validation

  • Reviewed via the 3-subagent workflow: Quality/Compliance + Logic reviewers both PASS_CLEAN on the final diff.
  • No Dart code changed → Analyze & Test / Visual Regression / Coverage gates unaffected (path-filtered, skip on this PR).
  • Final proof is the android-deploy run once this reaches the release lane (local modern-bundler validation was not possible in this environment).

Test plan

  • CI green on this PR (staging gates)
  • After promotion to a release tag: android-deploy loads fastlane 2.232.2 and reaches the upload step

The android-deploy lane shipped without a committed Gemfile.lock, so
`bundle install` resolved gems fresh on every run. A transitive update
pulled fastlane 2.235.0, whose google-apis/representable load path requires
multi_json, which was no longer part of the resolved bundle. Result:
"multi_json is not part of the bundle" (Gem::LoadError), crashing
`fastlane beta` before the Play Store upload.

Mirror the proven ios/ setup by committing android/Gemfile.lock (identical
Gemfile, so identical graph: fastlane 2.232.2, multi_json 1.19.1) and add a
.gitignore negation so the lockfile stays tracked despite the global *.lock
rule.
The android runner is ubuntu-latest but the committed lock only carries the
arm64-darwin + ruby platforms, so the non-frozen `bundle install` adds the
linux platform at runtime. With the Gemfile constraint left at ">= 2.220",
that step could re-resolve fastlane up to the broken 2.235.0 again. Pin
fastlane to the known-good 2.232.2 (which the lock already resolves with
multi_json 1.19.1) so no resolution path can reintroduce the failure.
@TaprootFreak TaprootFreak marked this pull request as ready for review June 5, 2026 10:27
@TaprootFreak TaprootFreak merged commit 9e96989 into staging Jun 5, 2026
9 checks passed
@TaprootFreak TaprootFreak deleted the feature/android-gemfile-lock branch June 5, 2026 10:27
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

Successfully merging this pull request may close these issues.

1 participant