Skip to content

Postman/Insomnia import silently corrupts folders with duplicate or case-colliding sibling names #7821

@EmilienDaulhiac

Description

@EmilienDaulhiac

BRU-3177

I have checked the following:

  • I have searched existing issues and found nothing related to my issue.

This bug is:

  • slowing me down but I'm able to continue working

Bruno version

latest (reproduced on main @ c4dc0bc1)

Operating System

macOS (case-insensitive APFS)

Describe the bug

Importing a Postman collection into Bruno corrupts the result when it contains sibling folders that share the same name — either as exact duplicates or as case-only variants (e.g. OAuth2 vs oAuth2). Two distinct failure modes exist:

  1. UI import path (renderer:import-collection, uses mkdirSync(..., { recursive: true })): no error is raised, but both folders write into the same on-disk directory. The second folder's requests silently overwrite the first's. Partial, broken import with no indication to the user.
  2. Onboarding-service path (utils/collection-import.js, uses plain mkdirSync): crashes with EEXIST: file already exists, mkdir '…/oAuth2'. No recovery, no guidance.

Steps to reproduce

  1. Download the Sendcloud Postman collection (or any collection with duplicate-/case-variant sibling folder names — Sendcloud has both Returns+Returns and OAuth2+oAuth2 at /V3).
  2. In Bruno: Import Collection → Postman, pick the JSON.
  3. Observe either the EEXIST crash or a silently merged /V3/OAuth2 folder containing requests from both source folders.

Expected behavior

Bruno should deduplicate sibling folder names case-insensitively before writing, appending a suffix (e.g. oAuth2 - 2) so distinct source folders map to distinct on-disk directories. Same applies to request filenames.

Root cause

  • Converter-level dedup in postman-to-bruno.js uses a JS object keyed by exact name → catches Returns+Returns but not OAuth2+oAuth2.
  • Filesystem-writer layer has no sibling-level dedup; only the top-level collection name is checked.
  • mkdirSync in collection-import.js doesn't pass recursive: true, so the onboarding path crashes instead of silently merging.

Same pattern affects the Insomnia, OpenAPI, and WSDL importers — all converge on the same writer code path.

Screenshots/Live demo link

Import a collection with sibling folders OAuth2 and oAuth2 on macOS to reproduce deterministically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions