insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

"Import suceeded" but nothing changes

Open kate-koll opened this issue 2 years ago • 22 comments

Expected Behavior

I am importing json document (originally insomnia export actually from my colleague) into a collection. Message pops up, that I imported Workspace, Enviroments, Requests etc. I would expect to see all imported in my collection.

Actual Behavior

Message pops up, that I imported Workspace, Enviroments, Requests etc. but my new collection is in fact still empty.

Reproduction Steps

  1. Insomnia Dashboard
  2. Click create - Request Collection
  3. Fill in name and click Create
  4. Click Import from File image
  5. Message about successful import shows up image
  6. My collection still empty, no environments, no folders with requests...

Is there an existing issue for this?

Additional Information

I also tried going through import/export by clicking on collection name; also through Preferences-Data-Import Data. When I tried to export my own Collection and than import it back, didn't work either.

Insomnia Version

2021.6.0

What operating system are you using?

Windows

Operating System Version

Windows 10

Installation method

downloaded from https://insomnia.rest/download and run as admin

Last Known Working Insomnia version

kate-koll avatar Dec 06 '21 19:12 kate-koll

@kate-koll it seems you might be trying to import an Insomnia export of a Design Document into a Request Collection.

I would suggest you try: A) to import the file from then initial start menu of Insomnia

import from file

Or,

B) Create a new Design Document, and inside that new Design Doc, attempt to re-import the file. design_doc

filfreire avatar Dec 07 '21 11:12 filfreire

@develohpanda @wdawson this might be an opportunity for improving UX, as users don't get a warning if they are trying to import a design doc into a request collection. req_collection_import_design_doc

filfreire avatar Dec 07 '21 11:12 filfreire

Same here: Version: Insomnia 2021.6.0 Release date: 10/28/2021 Windows 10 Electron: 11.2.3 Node: 12.18.3

RadoslavMarinov avatar Dec 07 '21 14:12 RadoslavMarinov

@filfreire Hi, thanks for the reply. Didn't work though :( image image image

kate-koll avatar Dec 07 '21 15:12 kate-koll

It actually overwrites the original collection that was exported, so that pop-up describes what was restored in the original collection, possibly overwriting latest changes in that collection. I created an issue for that.

https://github.com/Kong/insomnia/issues/4283

gh-andre avatar Dec 08 '21 15:12 gh-andre

is this report a duplicate of #4034?

blshkv avatar Dec 25 '21 00:12 blshkv

@blshkv

See this comment in https://github.com/Kong/insomnia/issues/4034#issuecomment-988338896 .

This bug was created, as requested, https://github.com/Kong/insomnia/issues/4283 in the comment above.

So, it's a duplicate of the latter. There's a couple more with the same problem, as far as I can see.

gh-andre avatar Dec 25 '21 03:12 gh-andre

Are there any updates on this issue?

demarchenac avatar Apr 18 '22 20:04 demarchenac

Hello guys, i had the same error. I was able to solve it really simple, just click here (top left corner where it says Insomnia / New document) and you should have the imports made in another collection of insomnia :

image

stoccalino avatar Apr 19 '22 14:04 stoccalino

@stoccalino

The bug is that it overwrites the original collection because it uses the same collection IDs as it exported. What most likely happened in your case is that the collection ID didn't exist on this computer and it appeared that it created a new one. If you change the collection you just imported and then import the original file again, your changes most likely will be gone.

gh-andre avatar Apr 19 '22 15:04 gh-andre

I'm running into this issue as well, even with a install of Insomnia that's never seen the collection before. Exact same behavior, shows all the successful import messages in the pop up and then there's nothing there.

Any new ideas on how to get around this?

justindupree01 avatar May 09 '22 17:05 justindupree01

@justindupree01 I used this hack, which worked that time, but this is not something that could be considered safe. Even if it still works you would need to verify the result really well in that it doesn't have some side effects.

https://github.com/Kong/insomnia/issues/4034#issuecomment-988267447

gh-andre avatar May 09 '22 20:05 gh-andre

Encountered this too -- frustrating bug to encounter immediately after paying for a subscription.

I had success by navigating to my INSOMNIA base environment, then Duplicate the Collection from there, selecting the Remote environment as the location.

Interestingly, this then revealed the previously hidden file-migrated Collection. I then had to delete the cloned remote environment.

darrenbarklie avatar May 17 '22 14:05 darrenbarklie

I have tried all options possible (importing different ways) and also have tried to reinstall with the latest version: Insomnia 2022.3.0 but unable to import any collection.

Phuong5664 avatar May 24 '22 04:05 Phuong5664

I have tried too, but not working

sabatiny avatar May 24 '22 14:05 sabatiny

If you're like me, importing a collection in remote project, previously existing in local project and exported from there, try first deleting the local one. Because otherwise, since they have same ID or something like that, the import of the collection simply overwrite the local previous collection (the one from which you created the export).

vittorio-c avatar May 26 '22 21:05 vittorio-c

Can confirm. I wanted to move my old insomnia collection to a personal project.

  • First export your old old collection.
  • Then delete the old collection.
  • Then! switch to your personal project and import the old collection.

adamxi avatar Jun 08 '22 14:06 adamxi

For those who just want to move collections/documents between projects, there's a simpler way.

  • Create an empty target project
  • Go to the source project
  • Click triple dots in the collection/document you want to move and click Duplicate
  • Change the name to your liking, select the target project and click Duplicate

This copies collections/documents/environments to the target project. Check that the copy is good and delete the original from the source project.

I also find this hack useful for committing exported YAML into the repository - duplicating collections/documents to a transient project before exporting what goes into the repository helps with subsequent check-out/import because it won't overwrite the original collection.

gh-andre avatar Jun 08 '22 15:06 gh-andre

Worst UI ever, wasted a lot of time. It is definitely not obvious that the word "Insomnia" needs to be clicked to view, a different collection

Hema2810 avatar Jun 21 '22 15:06 Hema2810

The solution is very simple. Insomnia imports your collection but it does not show you where to find your imported collection. So import your collection and then to view your imported collection you need to go to the Dashboard. Click on the word "Insomnia" next to the purple circle, you should see your dashboard and then after that choose your collection and you should now see all the requests/endpoints in your collection.

1 2

CharlesMavundla avatar Jun 27 '22 12:06 CharlesMavundla

@CharlesMavundla The real issue here is not so much where imported data ends up, but rather that it will wipe out your existing data after the import. See issue #4283 for details.

gh-andre avatar Jun 27 '22 14:06 gh-andre

Hi folks, we'll try to prioritise this issue, and also #4283 as soon as possible as like many of you mention the current user experience is very stressful or surprising (in a wrong way).

Heads up @wongstein and @subnetmarco - marking these in our internal Needs Fix area in the internal GH triage project

filfreire avatar Aug 05 '22 08:08 filfreire

For anyone still having this issue: I exported the collection as HAR - HTTP Archive Format instead of Insomnia V4(JSON) and was then able to successfully import it without any issues.

samadams412 avatar Oct 21 '22 17:10 samadams412

@samadams412 You lose all variables, etc using HAR. Use this instead.

https://github.com/Kong/insomnia/issues/4283#issuecomment-1167459831

gh-andre avatar Oct 21 '22 17:10 gh-andre

wow. It took way to long and a lot of bad answers. Are they doing anything to make it more clear as to what is happening? right now the whole file process is terrible you cant tell what happened from the import and its unclear where to navigate.

rehpotsirhc21 avatar Nov 22 '22 22:11 rehpotsirhc21

I just paid for the team version of Insomnia and had issues importing my collections into a team project. This solved my issue.

BlakeGardner avatar Nov 28 '22 15:11 BlakeGardner

The same here, it tells me if I want to import it, but I need something to happen after. :/

bipsa avatar Jan 06 '23 20:01 bipsa

Any update on this? Using the export feature messed up my Insomnia.

jramiresbrito avatar Feb 10 '23 17:02 jramiresbrito

Same problem. I didn't imagine this simple feature would turn out to be such a huge headache.

BarakAlmog avatar Feb 16 '23 06:02 BarakAlmog

@gabuch2 submit a PR if you care about it, rather than calling the contributors clowns, this is an open source project and anybody can contribute. Have some respect.

subnetmarco avatar Mar 08 '23 20:03 subnetmarco