Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Import suceeded" but nothing changes #4274

Closed
1 task done
kate-koll opened this issue Dec 6, 2021 · 44 comments · Fixed by #5869
Closed
1 task done

"Import suceeded" but nothing changes #4274

kate-koll opened this issue Dec 6, 2021 · 44 comments · Fixed by #5869
Assignees
Labels
B-bug Bug: general classification B-data-issues Data Migration issues C-improvement Category: Improvement / Enhancement PA-importers Package: Insomnia Importers S-unverified Status: Unverified by maintainer

Comments

@kate-koll
Copy link

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 kate-koll added B-bug Bug: general classification S-unverified Status: Unverified by maintainer labels Dec 6, 2021
@filfreire
Copy link
Member

@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
Copy link
Member

@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 filfreire added the C-improvement Category: Improvement / Enhancement label Dec 7, 2021
@RadoslavMarinov
Copy link

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

@kate-koll
Copy link
Author

kate-koll commented Dec 7, 2021

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

@gh-andre
Copy link

gh-andre commented Dec 8, 2021

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.

#4283

@filfreire filfreire added the PA-importers Package: Insomnia Importers label Dec 13, 2021
@blshkv
Copy link

blshkv commented Dec 25, 2021

is this report a duplicate of #4034?

@gh-andre
Copy link

@blshkv

See this comment in #4034 (comment) .

This bug was created, as requested, #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.

@demarchenac
Copy link

Are there any updates on this issue?

@stoccalino
Copy link

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

@gh-andre
Copy link

@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.

@justindupree01
Copy link

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?

@gh-andre
Copy link

gh-andre commented May 9, 2022

@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.

#4034 (comment)

@darrenbarklie
Copy link

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.

@Phuong5664
Copy link

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.

@sabatiny
Copy link

I have tried too, but not working

@vittorio-c
Copy link

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).

@adamxi
Copy link

adamxi commented Jun 8, 2022

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.

@gh-andre
Copy link

gh-andre commented Jun 8, 2022

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.

@Hema2810
Copy link

Hema2810 commented Jun 21, 2022

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

@CharlesMavundla
Copy link

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

@gh-andre
Copy link

@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.

@filfreire
Copy link
Member

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

@samadams412
Copy link

samadams412 commented Oct 21, 2022

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.

@gh-andre
Copy link

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

#4283 (comment)

@rehpotsirhc21
Copy link

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.

@BlakeGardner
Copy link

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

@bipsa
Copy link

bipsa commented Jan 6, 2023

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

@filfreire filfreire self-assigned this Jan 9, 2023
@filfreire filfreire added the B-data-issues Data Migration issues label Jan 19, 2023
@jramiresbrito
Copy link

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

@BarakAlmog
Copy link

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

@subnetmarco
Copy link
Member

@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.

@ghost
Copy link

ghost commented Mar 8, 2023

@subnetmarco You are right, I was struggling for hours with this problem and I let myself carry away by the moment.

@subnetmarco
Copy link
Member

@gabuch2 thank you. I will look into this with the team, and we will try to get it fixed. I understand this is a frustrating issue.

@maxxyme
Copy link

maxxyme commented Mar 9, 2023

@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.

nice advice pal... but only valid if you can code... not if you're just a simple end-user... 🤔

@gh-andre
Copy link

gh-andre commented Mar 9, 2023

@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.

It's a data loss issue at the heart of the product, which requires fundamental changes and is not something a drive-by PR would solve. Yes, people get frustrated when they lose data. It doesn't excuse rudeness, but telling people to fix it on their own isn't quite fair towards Insomnia users, especially for those who paid for subscription and just use in their testing activities.

@Theobano
Copy link

Is there any update or a workaround on this?

@filfreire filfreire mentioned this issue Mar 30, 2023
10 tasks
@gatzjames
Copy link
Contributor

👋 Hey everyone!
We just released a new Beta version that includes an improved Import experience for Insomnia. Please try it out and lets us know what you think.
Thanks for all your feedback!

@subnetmarco
Copy link
Member

@Theobano @gh-andre @gabuch2 @BarakAlmog @jramiresbrito @maxxyme @kate-koll and all, we have released a new Beta version that should fix this issue. @gatzjames has posted a link above in case you would like to try it.

@goodeye
Copy link

goodeye commented May 4, 2023

I battled this for a few hours, trying to just export from old computer, then import to new computer. Same symptoms with stable and beta release: Import dialog shows a lot of requests, then nowhere to be found. What finally worked was to export only 1 collection from old computer, uninstall and delete data folders on new computer, install beta, and import the 1 collection. (maybe stable version would have done this too).
Then the beta automatically "updated" back to the stable release.

@fellypsantos
Copy link

That's too bad, neither the native import feature or the plugin insomnia-plugin-gist-sync are working anymore, as others said, the import dialog shows a bunch of requests, but nothing is shown after complete.

@hosseio
Copy link

hosseio commented May 11, 2023

trying the beta with no success

@edencorbin
Copy link

Okay just commenting here I found that confusing too, you import a request collection and it says it finds the data but then shows an error "insomnia import the provided document does not match". However, if you are in the context of a request collection it imports fine. I suggest making that a little more intuitive.

@subnetmarco subnetmarco reopened this Jun 2, 2023
@subnetmarco
Copy link
Member

subnetmarco commented Jun 2, 2023

We are re-opening the issue since it seems like this problem keeps happening, and making this our top priority. We are taking a deeper approach now, and the fact that this is happening is unacceptable. This is what we are doing so far:

  • We know that version upgrades may trigger data migrations.
  • We are now implementing backups for migrations in such a way that data is never lost (electron app auto update performs a backup after download #6005). The data can be manually restored on a previous version of Insomnia if a problem happens.
  • We will then increase the amount of logging that we output during migrations in order to identify the problematic one. We think that there is one migration in particular that is entering an inconsistent state and that is very hard to catch.
  • We need to build better error handling

@gatzjames please chime in on "insomnia import the provided document does not match" error.

@gh-andre
Copy link

gh-andre commented Jun 6, 2023

I tried the new version. The original issue of overwriting the source collection seems to be fixed, but after a few of minutes of testing, I can identify a couple of issues.

  1. Environments in the exported YAML are ignored, so imported cannot be used until environments are recreated.

  2. When I'm focused on some collection in some project and in the context of that collection I select Import/Export from the top menu, the default collection name is my currently selected one, but the project is defaulted to Insomnia, which isn't obvious to begin with, but the import still goes into the selected project, while the focus switches to Insomnia project, which doesn't have the import.

@gatzjames
Copy link
Contributor

@gh-andre and everyone here thanks for the feedback!
We have added support for multiple workspace imports alongside with respecting the exported names and scope in 2023.3.0
We have also improved our logging and migration logic in the app.
We aim to have no issues related to data imports/exports and backups so your feedback is really valuable 🙏
Let us now how this release works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: general classification B-data-issues Data Migration issues C-improvement Category: Improvement / Enhancement PA-importers Package: Insomnia Importers S-unverified Status: Unverified by maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.