ArchGPT / insomnium

Insomnium is a fast local API testing tool that is privacy-focused and 100% local. For testing GraphQL, REST, WebSockets and gRPC. This is a fork of Kong/insomnia
MIT License
3.33k stars 125 forks source link

Workspace Not Found error when copying Insomnia files #44

Open designbyadrian opened 9 months ago

designbyadrian commented 9 months ago

Expected Behavior

Application starts with my settings from Insomnia

Actual Behavior

Application hopens with this window:

image

Error: Workspace not found at _t (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:68:7551) at Module.Ot (file:///Applications/Insomnium.app/Contents/Resources/app.asar/workspace-c2145993.js:1:491) at async kl (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:50:3691) at async Promise.all (index 1) at async Ie (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:21936) at async He (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:16864) at async le (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:15041) at async s1 (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:21835) at async He (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:17112) at async le (file:///Applications/Insomnium.app/Contents/Resources/app.asar/index-e5e8515f.js:49:15041)

Reproduction Steps

Is there an existing issue for this?

Additional Information

No response

Insomnium Version

0.2.1-b

What operating system are you using?

macOS

Operating System Version

macOS Sonoma 14.0

Installation method

Downloaded from GitHub repository

Last Known Working Insomnium version

0.19.X

archywillhe commented 9 months ago

hey thanks for posting this bug;

I think it should work after you click on "Try to reload this app" button (below the workspace not found error)

(I think it's a UI/db init thing (i.e. UI somehow initialized earlier than changes were written to the DB))

I will try to roll a patch that fixes this bug in a day or less

archywillhe commented 9 months ago

Were you coming from Insomnia 8.0 or above?

Or were you on the older version of the Insomnia?

designbyadrian commented 9 months ago

@archywillhe Thanks for taking your time to look into this.

From Insomnia 8. I wish I had copied the data from the older version, but I couldn't forsee what a complete mess the update would be.

After clicking "Try to reload", the app does indeed start and work properly, but has no content.

archywillhe commented 9 months ago

Yeah.. This problem arises because the data structure implemented in Insomnia 8 is substantially different from its pervious version, and so it messes the exsting .db files in ~/Library/Application\ Support/Insomnia.

(This is why after you cp over to the Insomnium folder, this crash would arise and after reload you would be left with an empty "Scratch Pad" collection.) Insomnium is a fork based on v2023.5.8 and it parses data the same way Insomnia 2023.5.8 does.

To get your data back, the easiest way now is to download Insomnia 2023.5.8, replace Insomnia 8.0 with it. Now when you reopen the old Insomnia, the data should be back. (As long as you don't upgrade it, the data will stay as is and the migration will work.)

Now you can simply close the old Insomnia and peform cp -r ~/Library/Application\ Support/Insomnia/*.db ~/Library/Application\ Support/Insomnium/ again. And if you open Insomnium, you should see everything intact.

In short: Insomnia 8 -> reinstall/downgrade back to Insomnia 2023.5.8 -> open Insomnia 2023.5.8 and this will be automatically fixed, and now the migration to Insomnium should work.