insomnia: Insomnia Can't Run without Public Internet Connection

Expected Behavior

Insomnia API tool should be able to run locally without a connection to the public internet.

Actual Behavior

I lost connection due to unstable wifi and was met with a pop-up window displaying the following:

Application Error
Failed to render. Please report to our Github Issues
Network connectivity issue: Failed to load Organizations. Error invoking remote method 'insomniafetch': Error: net: :ERR_CONNECTION_RESET
Try to reload the app
Logout
Error: Network connectivity issue: Failed to load Organizations. Error invoking remote method 'insomniaFetch': Error: net :ERR_ CONNECTION_ RESET at Module.t81 [as indexLoader] (file: ///Applications/Insomnia.app/Contents/Resources/app.asar/index-553746a2.js:1255:3095) at async m8 (fil e:///Applications/Insomnia.app/Contents/Resources/app.asar/index-553746a2.js:31:3691) at async Promise.all (index 2) at async ce (file: ///Appli cations/Insomnia.app/Contents/Resources/app.asar/index-553746a2.js:30:21935) at async qe (file:///Applications/Insomnia. app/Contents/Resources / app.asar/index-553746a2.js:30:16866) at async we (file:///Applications/Insomnia.app/Contents/Resources/app.asar/index-553746a2.js: 30:15042) at async Object.ie [as navigate] (file:///Applications/Insomnia.app/Contents/Resources/app.asar/index-553746a2.js:30:13764)

Reproduction Steps

Revised:

  1. Be connected to the internet
  2. Open Insomnia
  3. Close Insomnia
  4. Disconnect from internet
  5. Open Insomnia
  6. See error that blocks usage

Is there an existing issue for this?

Additional Information

No response

Insomnia Version

8.1.0

What operating system are you using?

macOS

Operating System Version

13.6 (22G120)

Installation method

download from insomnia.rest

Last Known Working Insomnia version

No response

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 11
  • Comments: 19 (11 by maintainers)

Most upvoted comments

The first time you open the app we need to fetch your organizations.

After that it’s cached and it can be used without a connection.

This is how Linear, Notion and other apps work too.

@suchislife801 please never do that again. Use normal text size like a decent human being.

The first time you open the app we need to fetch your organizations.

After that it’s cached and it can be used without a connection.

This is how Linear, Notion and other apps work too.

@subnetmarco one question though: did anyone ever ask for this?

Yeah, OR…

Last Working Version! Sort Order Fix!

Also, everything that used to work, works on this version.

2023.4.0

ANY version ABOVE 2023.4.0 will absolutely WRECK your sort orders.

Thanks for the feedback! Currently whenever you open the app it should be connected so that we can get your organizations and verify the session. If you have it open and go offline the app will continue working. We want to improve this experience in the following versions but we want to make sure we cover all cases so any feedback will help us design this UX better! 🙏

That feels like an odd choice. For e.g., the power in my block went out for a couple of seconds, while I was in the middle of developing and testing a feature. PC rebooted in less than a minute, but the modem itself bugs out and for some reason takes 20 mins to get back online. Meanwhile I can spin up my IDE and keep doing work locally, no problem. Except now Insomnia is unusable until my internet link restablishes, so I gotta either wait until it comes back on, or go to cUrl or switch to Postman;

I’m guessing this also means if I ever go to granny’s ‘country’ house and turn on my laptop there (not internet at all available) then I just need to start creating my requests from scratch…?

Used to work offline; Now doesn’t.

Idk if I’m missing something, but feels like a weird “feature”. 😅

@viniciusribeiro-hotmart So, this is the current situation (Insomnia v8.3):

  1. When the user is logged-in into the application, and then the connection goes down, the application is still usable in an offline state. You can make requests, you can even create new collections, you can browse across existing organizations that you have already used in the past.
  2. But if the application is closed, and then re-opened, at this point Insomnia doesn’t store the previous session anywhere therefore it needs to ask for login again. The login will redirect to the browser, and then back to the desktop application. At this point if the connection goes offline again, we are in the first scenario (1).

So as long as the application is not being closed, then Insomnia is usable in an offline state.

It seems that Insomnia could remember the previous session, and when present and not timed out, could re-open the application without asking for login again. We would need to investigate if there is a secure way to do this, without compromising the user’s security, I would assume so since it sounds a lot similar to what a browser does when the user checkboxes the “keep me logged in” button.

Most likely we would introduce such a checkbox in Insomnia too.

The parent issue has been fixed in the new 9.0 GA release available today.

@gatzjames thanks for the response! I’m not sure what more to add really except maybe my perspective on this functionality:

I understand the desire/want to verify a session before starting. However, if it continues working when the internet connection drops, it isn’t really any more secure than allowing someone to start a session with no internet connection, is it?

For example, if the goal is to prevent a former employee from gaining access to a workspace offline, this works in the sense that they won’t be able to use the app. However, they can still hop on over to (on macos) $HOME/Library/Application Support/Insomnia and scan through all the data in plain text there.

So I guess my question is, what is it is that you’re trying to accomplish with this behavior?

My use case specifically:

  • I’d like to be able to continue working if my internet connection is unstable and I need to restart the app or my machine for some reason. I can still develop plugins without the internet and run API’s that I want to test against on localhost.