[GH-ISSUE #611] migrate import: non-locale directories in metadata/ cause parse failure #170

Closed
opened 2026-02-26 21:33:53 +03:00 by kerem · 3 comments
Owner

Originally created by @cameronehrlich on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/611

Description

asc migrate import fails when the fastlane/metadata/ directory contains non-locale subdirectories like trade_representative_contact_information or review_information. The CLI attempts to parse every subdirectory as a locale and fails validation.

Steps to Reproduce

  1. Have a standard Fastlane metadata/ directory that includes trade_representative_contact_information/:
fastlane/metadata/
├── en-US/
├── de-DE/
├── trade_representative_contact_information/
│   ├── first_name.txt
│   ├── last_name.txt
│   ├── email_address.txt
│   └── ...
└── review_information/
  1. Run:
asc migrate import --app "APP_ID" --version-id "VERSION_ID" --fastlane-dir ./fastlane --dry-run

Expected Behavior

The CLI should skip known non-locale directories (trade_representative_contact_information, review_information, top-level .txt files, etc.) when scanning metadata/ for locale subdirectories, since these are standard parts of the Fastlane Deliver directory structure.

Actual Behavior

Error: migrate import: invalid locale "trade_representative_contact_information" in metadata: locale "trade_representative_contact_information" must match pattern like 'en', 'en-US', or 'zh-Hans'

Workaround

Temporarily move the directory out of metadata/ before running the import:

mv fastlane/metadata/trade_representative_contact_information fastlane/_trade_representative_contact_information
asc migrate import --app "APP_ID" --version-id "VERSION_ID" --fastlane-dir ./fastlane
mv fastlane/_trade_representative_contact_information fastlane/metadata/trade_representative_contact_information

Environment

  • asc version: 0.28.12
  • macOS: Darwin 25.2.0
  • Installed via: brew install rudrankriyam/tap/asc

Suggested Fix

When iterating subdirectories of metadata/, either:

  1. Skip known Fastlane special directories (trade_representative_contact_information, review_information)
  2. Validate directory names against the locale regex before attempting to parse, and skip non-matching directories with a warning instead of failing
  3. Add a --skip-unknown-locales flag

Option 2 seems most robust since it handles any non-locale directory without needing a hardcoded allowlist.

Originally created by @cameronehrlich on GitHub (Feb 17, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/611 ## Description `asc migrate import` fails when the `fastlane/metadata/` directory contains non-locale subdirectories like `trade_representative_contact_information` or `review_information`. The CLI attempts to parse every subdirectory as a locale and fails validation. ## Steps to Reproduce 1. Have a standard Fastlane `metadata/` directory that includes `trade_representative_contact_information/`: ``` fastlane/metadata/ ├── en-US/ ├── de-DE/ ├── trade_representative_contact_information/ │ ├── first_name.txt │ ├── last_name.txt │ ├── email_address.txt │ └── ... └── review_information/ ``` 2. Run: ``` asc migrate import --app "APP_ID" --version-id "VERSION_ID" --fastlane-dir ./fastlane --dry-run ``` ## Expected Behavior The CLI should skip known non-locale directories (`trade_representative_contact_information`, `review_information`, top-level `.txt` files, etc.) when scanning `metadata/` for locale subdirectories, since these are standard parts of the Fastlane Deliver directory structure. ## Actual Behavior ``` Error: migrate import: invalid locale "trade_representative_contact_information" in metadata: locale "trade_representative_contact_information" must match pattern like 'en', 'en-US', or 'zh-Hans' ``` ## Workaround Temporarily move the directory out of `metadata/` before running the import: ```bash mv fastlane/metadata/trade_representative_contact_information fastlane/_trade_representative_contact_information asc migrate import --app "APP_ID" --version-id "VERSION_ID" --fastlane-dir ./fastlane mv fastlane/_trade_representative_contact_information fastlane/metadata/trade_representative_contact_information ``` ## Environment - asc version: 0.28.12 - macOS: Darwin 25.2.0 - Installed via: `brew install rudrankriyam/tap/asc` ## Suggested Fix When iterating subdirectories of `metadata/`, either: 1. Skip known Fastlane special directories (`trade_representative_contact_information`, `review_information`) 2. Validate directory names against the locale regex *before* attempting to parse, and skip non-matching directories with a warning instead of failing 3. Add a `--skip-unknown-locales` flag Option 2 seems most robust since it handles any non-locale directory without needing a hardcoded allowlist.
kerem closed this issue 2026-02-26 21:33:53 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 17, 2026):

@cameronehrlich do you plan to take this up? A lot of folks will be migrating from fastlane soon ;)

<!-- gh-comment-id:3917015146 --> @rudrankriyam commented on GitHub (Feb 17, 2026): @cameronehrlich do you plan to take this up? A lot of folks will be migrating from fastlane soon ;)
Author
Owner

@cameronehrlich commented on GitHub (Feb 17, 2026):

@rudrankriyam Yeah, I just can't do it right now so I put this ticket up as a reminder

<!-- gh-comment-id:3917017821 --> @cameronehrlich commented on GitHub (Feb 17, 2026): @rudrankriyam Yeah, I just can't do it right now so I put this ticket up as a reminder
Author
Owner

@cameronehrlich commented on GitHub (Feb 17, 2026):

addresses: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/611

<!-- gh-comment-id:3917321791 --> @cameronehrlich commented on GitHub (Feb 17, 2026): addresses: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/611
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#170
No description provided.