insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Cannot import simple exported collection

Open matthjes opened this issue 1 year ago • 11 comments

Expected Behavior

I can import a simple exported collection into version 2023.2.2.

Actual Behavior

The import fails and just shows the message "The provided document does not match any of the registered formats."

Reproduction Steps

  1. Create a new collection.
  2. Create a new simple request.
  3. Click on collection name at the top.
  4. Click on "Import/Export".
  5. Click on "Export data".
  6. Choose to export only the collection.
  7. Export everything as Insomnia V4.
  8. Goto projects.
  9. Click "Create" -> "Import" and choose file.
  10. Select file to import.
  11. After import, the collection is empty with the warning message shown in "Actual behavior".

Is there an existing issue for this?

Additional Information

It seems like Insomnia tries to import the collection as a document, because after importing a new document (instead of collection) is added to the project.

Import works fine with version 2023.1.0.

Insomnia Version

2023.2.2

What operating system are you using?

Windows

Operating System Version

Windows 11 Enterprise 22H2

Installation method

Download from insomnia.rest

Last Known Working Insomnia version

2023.1.0

matthjes avatar May 19 '23 06:05 matthjes

Hi @matthjes I can't seem to reproduce your issue. I'll share my steps so we can compare:

  1. I go to export menu and pick a single request Screenshot 2023-05-19 at 09 40 01

  2. Export it to JSON Screenshot 2023-05-19 at 09 40 09

  3. Open the JSON on the import menu Screenshot 2023-05-19 at 09 41 45

  4. See the imported request on the new document Screenshot_2023-05-19_at_09_40_50

filfreire avatar May 19 '23 08:05 filfreire

Hi @filfreire,

It's not quite the steps I've made, so here is a more detailed explanation:

  1. Update to version 2023.2.2.
  2. Create a new collection in the default project (Insomnia). 2023-05-19 11_00_05-Insomnia
  3. Export the collection (choose the "Export the MyCollection collection"). 2023-05-19 11_01_02-Insomnia 2023-05-19 11_01_35-Insomnia
  4. Export everything.
  5. Choose v4 JSON.
  6. Save file.
  7. Now go back to the project selection. 2023-05-19 11_03_25-Insomnia
  8. Click "+ Create" -> "Import" 2023-05-19 11_03_53-Insomnia
  9. Select the newly exported collection.
  10. Click "Scan" -> A summary is shown what is imported.
  11. Klick "Import"
  12. Now an "empty" screen is shown
  13. Go back to the project selection -> new untitled document is there. If you open it then an orange warning sign is shown. 2023-05-19 11_06_15-Insomnia 2023-05-19 11_06_36-Insomnia

I hope this helps.

matthjes avatar May 19 '23 09:05 matthjes

@matthjes I see. Check if you see your request when you switch tabs there into the Debug tab.

filfreire avatar May 19 '23 12:05 filfreire

Hi @filfreire,

Yes, when I import the collection, open the document and then switch to debug I can see the request. However, i have to do this every time I open the collection (or document, as it is shown in the project overview).

Is this the intended behaviour? I would have expected that when I export a collection and then import the exported file I get the same state / the same collection, not a document.

matthjes avatar May 19 '23 12:05 matthjes

I have the same issue, can't import any exported collection

SergioSuarezDev avatar May 24 '23 12:05 SergioSuarezDev

Captura de pantalla 2023-05-24 a las 14 02 27

SergioSuarezDev avatar May 24 '23 12:05 SergioSuarezDev

Same here. This is the file I'm trying to import: https://github.com/codecon-dev/codecodes-api/blob/master/insomnia.json

It was exported on Sep 5, 2021.

Markkop avatar May 24 '23 23:05 Markkop

@matthjesEu vejo. Verifique se você vê sua solicitação ao alternar as guias para a Debugguia.

I understand, I have the same problem as the others, but from what I understand when importing, insomnia is fixed in this design "tab" and then it is necessary to click on this "debug" button to view the imported collections. When I generated my collection, it doesn't have these options, but when I import one, it appears!

nilsonaf avatar May 25 '23 00:05 nilsonaf

I have the same problem and one more thing. After importing and switching to DEBUG environments hasn't been imported

fandimri avatar Jun 16 '23 10:06 fandimri

Hi everyone, same problem ("The provided document does not match any of the registered formats..."), same version (2023.2.2). Any news about that?

flopail avatar Jun 27 '23 10:06 flopail

I found a way (but not sure it's the best one) to solve this pb. In my case, the pb was linked to the fact that Insomnia environnements/sub-environnements weren't saved in exported JSON (only collections). So, before importing data, I initialized a first collection and associated this one to an envrionnement/sub-environnement which contains all environment variables I previously used (for example my BASE_URL, my TOKEN, etc.). After that, I imported data and it worked. I hope it will helps.

flopail avatar Jun 27 '23 15:06 flopail

Hey, I've also encountered this bug, which seems a really bad UX job here. My team frequently shares Insomnia collections with each other for testing. Had me removing and recreating the collection for about an hour until I found this thread - thought I was crazy and couldn't find the imported collections.

JMR-Asurion avatar Aug 22 '23 19:08 JMR-Asurion

I have same issue. Is there a functional way to import collection from different device?

Edit: Same issue happens when I sync my project using Git sync. So it's just impossible to sync a collection now?

DavidFencl avatar Aug 28 '23 17:08 DavidFencl