insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

My entire project just disappeared

Open pheianox opened this issue 1 year ago • 3 comments

Expected Behavior

Work

Actual Behavior

There were 4 folders of 10-12 requests each. After I closed and opened the program, most of the queries and folders were gone...

Reproduction Steps

No response

Is there an existing issue for this?

Additional Information

I was disapponted after my entire project just disappeared. There were 4 folders of 10-12 requests each. After I closed and opened the program, most of the queries and folders were gone! I was very angry, very angry. All my hard work had gone to waste. Before that, I sometimes noticed that something was wrong with the program, or some requests were deleted, or the address bar deleted its content, this happened after closing the program. And here came this terrible bug!

Insomnia Version

2022.5.1

What operating system are you using?

Other (specify below)

Operating System Version

Linux 5.15.0-47-generic #51-Ubuntu x86_64 GNU/Linux

Installation method

download

Last Known Working Insomnia version

same

pheianox avatar Sep 12 '22 00:09 pheianox

Hi @pheianox thanks for reporting this! This sounds like it could be a bug.

Please reply with the following information:

  • How did you install Insomnia?
  • Did you create your folders and requests manually, or by importing anything (e.g. like a Postman collection or OpenApi spec)
  • Also can you share with us what does your project structure/dashboard look like? (e.g.

image

You can also sharing here a screenshot of your application data folder. And you can also try moving it, and see if that affects anything. Moving the folder instead of deleting it means you can restore it later. App Data on Linux: $XDG_CONFIG_HOME/Insomnia or ~/.config/Insomnia

filfreire avatar Sep 12 '22 12:09 filfreire

Hello @filfreire! Thank you for response.

  1. I downloaded file (Insomnia.Core-2022.5.1.deb) and installed via GUI
  2. I created requests manually, I've never used import
  3. Here's dashboard screenshot (empty, but there were only one collection with folders and each folder had requests + global env vars) image

Additinal details: Also when you duplicate loaded with env vars requests (e.g.{{_.baseUrl}}/products) the address bar clears itlsef (not always, but you feel it sometime)

ghost avatar Sep 17 '22 17:09 ghost

I had this structure

(collection)

myproject/
  authentication/
    [POST] {{_.baseUrl}}/sessions
    [DELETE] {{_.baseUrl}}/sessions/{{_.authentication.refreshToken}}
    [GET] {{_.baseUrl}}/sessions/{{_.authentication.refreshToken}}/token
    ...
  account/
    ...
  product/
    ...
  category/
    ...

(global env)

{
  "baseUrl": "...",
  "authentication": {
     "accessToken": "...",
     "refreshToken": "...",
      ...
  },
  ...
}

So after I closed and came back folders product, account, ..., were deleted, but some were not. It looked like unsaved version, but maybe it's bug. I never actually thought about saving project, it would save it automatically every time, so it's mostly bug. Maybe something wrong with the state managment, you guys know it better how it works

ghost avatar Sep 17 '22 17:09 ghost

Also have this issue on my Windows 11 environment.

dunhamjared avatar Nov 14 '22 16:11 dunhamjared

I have the same issue on Mac OS. Version: Insomnia 2022.7.0-beta.4

kguskov avatar Nov 15 '22 11:11 kguskov

Hi folks, this might be the same problem that was reported on https://github.com/Kong/insomnia/issues/5384 and then fixed on https://github.com/Kong/insomnia/pull/5397. The fix should go out in an upcoming beta release.

@pheianox @dunhamjared @kguskov if you feel comfortable in trying a workaround until then, I would recommend the following steps in the meantime to debug if it's the same issue that got fixed:

  1. First, check in your Data folder (see first screenshot) on the insomnia.Workspace.db file (you can open with text editor like VS Code)

image

  1. Inside the insomnia.Workspace.db, please confirm if there any of the entries show up with the field parentId as null ?

image

  1. If there are entries in that file that the parentId is null then:
  • Make sure you closed Insomnia
  • Replace the null with the string "proj_default-project"
  • Reopen Insomnia and see if you now are able to see your data

Another user from has tried these steps and it worked for them (link)

filfreire avatar Nov 16 '22 17:11 filfreire

@filfreire

I can confirm that my issue is related to the null value for the parent ID.

Thank you for the workaround!

dunhamjared avatar Nov 16 '22 19:11 dunhamjared

Thank you for the confirmation @dunhamjared

We will keep this issue open until we release 2022.7.0-beta.5 that has the fix for this.

filfreire avatar Nov 17 '22 09:11 filfreire

@filfreire

I can confirm that my issue is related to the null value for the parent ID.

Thank you for the workaround!

It worked for me too! Thank you!

kguskov avatar Nov 17 '22 09:11 kguskov

2022.7.0-beta.5 is out now, https://github.com/kong/insomnia/releases

Marking this issue as closed. If you folks notice the behavior again, please feel free to reopen a new ticket. Hopefully after updating to this one it shouldn't happen though 🙏

filfreire avatar Nov 17 '22 16:11 filfreire

That did not not work for me but then I switched from snap to deb install because of this issue #5531 . Aren't both versions using the same folder for storage?

tmerten avatar Dec 16 '22 10:12 tmerten

I also have this issue. All my stuff just disapeared when Insomnia updated itself. No clue where it is if it still exists.

Using windows 11.

Im unhappy and thinking about writing my own curl scripts in a git instead. Both postman and insomnia now come with bloat and problems it seems.

ghost avatar Dec 16 '22 16:12 ghost

Deleting my Insomnia because of this issue. I lost all my requests and collections.

MaestroJurko avatar Dec 18 '22 11:12 MaestroJurko

wow. this just happened to me at the most mission-critical time imaginable 👎🏻

alittlebitweird avatar Dec 20 '22 00:12 alittlebitweird

Yeah, data is gone from the ui. Going to extract what I need from the requests file and move my requests to a new app.

jmrobbins13 avatar Dec 20 '22 19:12 jmrobbins13

I lost everything without notice after update... 😳

TomCosta avatar Dec 20 '22 20:12 TomCosta

Just in case, your issues seem to be related to #5559, here is what fixed it for me.

reyqn avatar Dec 21 '22 08:12 reyqn

I restored my environments by manually creating new environments, then copying the values of the data field from insomnia.Environment.db into the text editor in Manage Environments.

My requests were initially present in the Debug tab (top centre, just below the title bar) after opening or creating a new file, but then they disappeared after restoring the environment data as described above. I created a new request in the now-empty request panel, and then exited Insomnia and opened insomnia.Request.db. I copied the value of the parentID field of the new request over the value of the parentID field for all of my actual requests, and then saved and re-opened Insomnia.

I lost all my folder structure, but at least I don't have to create my requests from scratch. If I had a more complex folder structure that would have been painful to recreate, I may have tinkered in insomnia.RequestGroup.db and insomnia.RequestGroupMeta.db instead.

bredwrd avatar Dec 22 '22 15:12 bredwrd

Had the same issue after the latest update. Lost all requests, parentID is not null.

IamMayankThakur avatar Dec 28 '22 13:12 IamMayankThakur

Same here, just restarted my machine and everything in Insomnia is gone. I think it auto-updated to 2022.6 when I restarted and I'm guessing that had something to do with it. No one reading this needs me to point out that this is beyond frustrating and, honestly, a pretty mind-blowing bug. "The software just deleted all my work" is about as bad as it gets.

wollkind avatar Dec 28 '22 15:12 wollkind

My solution: Create new : Request Collection Screenshot 2023-01-02 at 12 40 29

close insomnia.

open in the editor: insomnia.workspace.db and copy the _id of the newly created collection. then open insomnia.request.db and replace the parent_id with the one you've just copied. Start insomnia. In my case, all request was back. Give it the try.

dusinof avatar Jan 02 '23 11:01 dusinof

Can confirm @dusinof fix is working for requests - however, the same thing happened to my Environments and replacing parent_id of insomnia.Environment.db rows isn't enough (I guess some of them get deleted through {"$$deleted":true,"_id":"..."} mechanism on every Insomnia restart).

lukasz-dobek avatar Jan 02 '23 12:01 lukasz-dobek

Hi all. I had the same issue. For me it helped to choose the "DEBUG" tab inside the Document: image

kasperfp avatar Jan 03 '23 13:01 kasperfp

Also lost everything. I came back from the holidays with an updated insomnia and a blank collection. image

As you can see, I don't have a Design/Debug/Test section at the top of mine.

I was lucky enough to snag a copy of my insomnia.Request.db before the app blew it away, but now no matter what I do trying to restore it (adjusting parentId), Insomnia empties the file out everytime I start the app.

Update - Deleting the Deleted entries like lukasz-dobek pointed out works. However, I don't trust Insomnia anymore. Back to postman I go. Unfortunately, I wasn't quick enough to copy other things like environment before it purged them too. Now I have hundreds of requests all without environment variables and folder structure. Gah.

mikebm avatar Jan 03 '23 17:01 mikebm

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

ghost avatar Jan 04 '23 08:01 ghost

@dusinof, thanks, worked for me.

agencia3w avatar Jan 16 '23 13:01 agencia3w

I just stumbled across this. I haven't used Insomnia since 10/2022, but I regularly keep it updated via brew. All queries gone. A no-go for not-so-technical users. Sorry, but I'll switch to another app after all.

brew remove insomnia

R13e avatar Feb 02 '23 08:02 R13e

Also ran into this as a surprise after closing the app today (finally updated I guess).

I followed the tip of attaching everything to one workspace (RIP MY FOLDERS). I had about 400 requests to go through, so I was able to use this regex:

"parentId": "(\w+)"

To replace it with the new workspace id. Save file, quit, restart app. At least all my requests aren't gone...

janmonterrubio avatar Feb 03 '23 22:02 janmonterrubio

Deleting my Insomnia because of this issue. I lost all my requests and collections.

Same here, honestly I can't fathom how something like that can happen. Hours of work have been lost.

I suggest renaming the product from Insomnia to Nightmare.

ls-philippe-khodara avatar Feb 09 '23 10:02 ls-philippe-khodara

Restarted my computer today and all my projects and data are gone !

Can't believe this just happened and that ticket for this issue is closed !

I am going back to Postman

r2inlondon avatar Feb 12 '23 18:02 r2inlondon