Kong / insomnia

The open-source, cross-platform API client for GraphQL, REST, WebSockets, SSE and gRPC. With Cloud, Local and Git storage.
https://insomnia.rest
Apache License 2.0
34.65k stars 1.96k forks source link

My entire project just disappeared #5167

Closed ghost closed 1 year ago

ghost commented 2 years ago

Expected Behavior

Work

Actual Behavior

There were 4 folders of 10-12 requests each. After I closed and opened the program, most of the requests 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 requests 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

filfreire commented 2 years ago

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

Please reply with the following information:

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

ghost commented 2 years ago

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 commented 2 years ago

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

dunhamjared commented 1 year ago

Also have this issue on my Windows 11 environment.

kguskov commented 1 year ago

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

filfreire commented 1 year ago

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)

dunhamjared commented 1 year ago

@filfreire

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

Thank you for the workaround!

filfreire commented 1 year ago

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.

kguskov commented 1 year ago

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

filfreire commented 1 year ago

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 🙏

tmerten commented 1 year ago

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?

ghost commented 1 year ago

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.

MaestroJurko commented 1 year ago

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

alittlebitweird commented 1 year ago

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

jmrobbins13 commented 1 year ago

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.

TomCosta commented 1 year ago

I lost everything without notice after update... 😳

reyqn commented 1 year ago

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

bredwrd commented 1 year ago

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.

IamMayankThakur commented 1 year ago

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

wollkind commented 1 year ago

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.

dusinof commented 1 year ago

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.

lukasz-dobek commented 1 year ago

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

kasperfp commented 1 year ago

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

mikebm commented 1 year ago

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.

ghost commented 1 year ago

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

agencia3w commented 1 year ago

@dusinof, thanks, worked for me.

R13e commented 1 year ago

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

janmonterrubio commented 1 year ago

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

ls-philippe-khodara commented 1 year ago

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.

r2inlondon commented 1 year ago

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

fdimauro commented 1 year ago

WTF This also just happened to me? Why would you release a product that destroys everyone's projects!!! You are going to lose most of your users including me!!! Duh!!

ldevoco commented 1 year ago

I came here because I thought all my requests were deleted. But, I just clicked the Debug tab, and they were all in there?

Doesn't seem intuitive to me honestly. The reason I like Insomnia is because it was intuitive and clean. Design/Debug/Test... could probably be named something else, or they could be colored instead of slightly darker gray... or it could just go to the tab automatically instead of going to the Design tab, which didn't have anything in it.

I'd think Debug would be named Requests, since it contains all of my requests. I'm not debugging anything.

Anyway, thanks for your work.

igorshandrov commented 1 year ago

Same happened to me! WTF???! I've lost all my projects, I'm removing this app right now and for good.

stevevets commented 1 year ago

This is how I restored my Insomnia and hope it helps

  1. Go to app data folder image

You should be able to find these 2 folders

image
  1. Open insomnia.Request.db with text editor. This file stores all requests created. If this file is empty, I am sorry this method cannot help you :(

  2. Lookup "parentId":"wrk_ from the files. This is the workspace id your requests have been put under it. If you have multiple workspaces created before, make sure you have captured them all.

  3. Open insomnia.Workspace.db. We need to recreate those missing workspaces here.

Find the dummy workspace with "type":"Workspace","parentId":"proj_default-project", and set parentId to null "type":"Workspace","parentId":null. This prevents the dummy default project from showing up. Do not remove it here since there are many relations binding to this id. Remove it through the UI later.

Add all new workspaces like this {"_id":"[[your workspace id]]","type":"Workspace","parentId":"proj_default-project","modified":1678912448235,"created":1678911590955,"name":"Restore collection","description":"","scope":"collection"}

  1. Save the file, restart Insomnia. You should be able to see there is a collection "Restore collection" in the dashboard.
SeanBracksDev commented 1 year ago

How is this still an issue? I'm uninstalling Insomnia, as I've met this issue multiple times, losing all requests and collections. What a joke.

lovedisaster commented 1 year ago

I lost everything today, and found this ...

MikeNGarrett commented 1 year ago

@stevevets Thank you!

yair-rodriguez commented 1 year ago

This happened to me yesterday after clicking the home icon. Fortunately, I found my collections in the "Debug" tab, as @kasperfp mentioned.

gethari commented 1 year ago

This happened to me yesterday after clicking the home icon. Fortunately, I found my collections in the "Debug" tab, as @kasperfp mentioned.

Yes same happened with me as well @dusinof solution worked for me

timgavin commented 1 year ago

This happened to me as well. I don't even have a debug tab, in fact I don't have any tabs across the top; even the GitHub badge is gone. This app is an unintuitive mess. And no, @dusinof 's solution did not work for me. The only thing that works is a Time Machine restore.

errob37 commented 1 year ago

Happened to me this morning... few hours before a demo..... Nightmare:(

danilopeixoto commented 1 year ago

Seems everything I create disappears after closing the application.

Version: Insomnia 2023.2.2
Build date: 5/17/2023
OS: Windows_NT x64 10.0.22000
Electron: 22.0.0
Node: 16.17.1
V8: 10.8.168.20-electron.0
Architecture: x64
jifernandezv commented 1 year ago

Happened to me as well, and I was able to access my requests under the "Debug" tab, as @kasperfp pointed out.

Note that you will not see a "Debug" tab here:

imagen

Instead, you need to open a Document in order for the tab to appear:

imagen

ellamurii commented 1 year ago

Happened to me today. after relaunching Insomnia, it says it was updated successfully. And all my requests are gone. Tried all suggested fixes here, nothing works. Instead, I imported from Insomnia backup folder, though it is outdated. Last backup was from March. this is sad.

tmanley1985 commented 1 year ago

Just adding to the pile at this point, but all of my requests are gone. It's been a few months since I opened it last and everything's gone. All of my requests are dust in the wind.

timgavin commented 1 year ago

@ellamurii @tmanley1985 It's sad. However, if a project has over 500 open issues I think it's safe to say we shouldn't use the product because the developers either don't care about it, or they are too lazy to fix it. I went back to Postman and haven't had a single issue since :)

AnEmortalKid commented 1 year ago

It's sad. However, if a project has over 500 open issues I think it's safe to say we shouldn't use the product because the developers either don't care about it, or they are too lazy to fix it. I went back to Postman and haven't had a single issue since :)

This is a pretty terrible attitude to have @timgavin . The last commit was 30 minutes ago which doesn’t show a lack of care or laziness. I understand this issue is frustrating, but anyone who cares enough to fix it can go fix it and submit a PR.

In fact, work like #6184 shows that the developers care about their product.

camilotorron commented 1 year ago

Same thing happened to me. I created a collection because i have some requests with no collections i suddenly all my requests disappeared. Trying to fix it using all the tricks explained before, but non worked. Very sad to loose my work. Hopefully we can solve it soon but i guess our deleted work is gone.

ingemoody commented 1 year ago

Experienced this today. After an auto update all my data is lost. Extremely frustrating experience! I opened the application and discovered all my projects were gone on my desktop and I was logged out. No biggie I thougt so I tried to log in. This resulted to the deletion of my projects on my laptop which was already logged in. So now all the .db files are at default/empty. I fail to see how this issue is closed? As you can see on the photo every single files was created after the update. This is unacceptable behaviour from an application.

image
paulohliima commented 1 year ago

Hope this walkthrough helps too. In my case, I updated my insomnia through the ubuntu snap, and I lost all the collections I had. The solution was:

1 - Go to the personal folder, enable see hidden files. 2- Enter .config/Insomnia, and copy everything inside. 3 - Go to the newly installed insomnia, and in the help tab - show app data folder. 4 - Enter insomnia, and paste everything, overwrite. 5 - Close and open insomnia and that's it.

I hope it helped you. =)