Kong/insomnia · error · InsoError

Expected an Insomnia v4 export file; found an Insomnia v${pa

Error message

Expected an Insomnia v4 export file; found an Insomnia v${parsed.__export_format} export file in ${fileName}.

What it means

Error "Expected an Insomnia v4 export file; found an Insomnia v${parsed.__export_format} export file in ${fileName}." thrown in Kong/insomnia.

Source

Thrown at packages/insomnia-inso/src/db/adapters/insomnia-adapter.ts:113

      if (insomnia5Import.length > 0) {
        parsed = {
          __export_format: 5,
          // @ts-expect-error -- TSCONVERSION
          resources: insomnia5Import,
        };
      }
    }
  } catch (error) {
    throw new InsoError(`Failed to parse ${fileName}.`, error);
  }

  // We are supporting only v4 and v5 files
  if (!parsed) {
    throw new InsoError(`Failed to parse ${fileName}.`);
  } else if (!parsed.__export_format) {
    throw new InsoError(`Expected an Insomnia v4 export file; unexpected data found in ${fileName}.`);
  } else if (parsed.__export_format !== 4 && parsed.__export_format !== 5) {
    throw new InsoError(
      `Expected an Insomnia v4 export file; found an Insomnia v${parsed.__export_format} export file in ${fileName}.`,
    );
  }

  // Transform filter to a set for faster search
  // If it is undefined, it will return an empty set
  const toFilter = new Set<string>(filterTypes);

  // Execute translation between raw and imported models
  parsed.resources.forEach(model => {
    // If there is no filter to apply, or this model is included in the filter
    if (!toFilter.size || toFilter.has(parseRawType(model._type))) {
      // Rename field, transform value and return a new object
      const obj = parseRaw(model);

      // Store it, only if the key value exists
      (db[obj.type] as {}[])?.push(obj);
    }

View on GitHub (pinned to d9bb2b0142)

When it happens

Trigger: Thrown at packages/insomnia-inso/src/db/adapters/insomnia-adapter.ts:113 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Kong/insomnia@d9bb2b0142 (2026-08-26). Data as JSON: /api/errors/e6b22e720b2af195. Report an issue: GitHub.