insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

Application Freezes / Unresponsive

Open jonathan-fsa opened this issue 1 year ago • 8 comments

Expected Behavior

I leave my computer on and apps open. I expect the app to be responsive when I come back the next day.

Actual Behavior

App is frozen (can't click or do anything besides the menus in the top bar)

Occasionally there is a popup that says "app appears to be unresponsive" and I can refresh it, otherwise I have to quit and reopen

Reproduction Steps

  1. Open app (macOS, latest)
  2. Put on second display
  3. Leave open overnight, let computer sleep
  4. Attempt to use the app the next day

Is there an existing issue for this?

Additional Information

Version: Insomnia 9.2.0 Build date: 5/15/2024 OS: Darwin arm64 23.4.0 Electron: 29.3.0 Node: 20.9.0 Node ABI: 121 V8: 12.2.281.27-electron.0 Architecture: arm64

MacBook Pro M1 MacOS 14.4.1 (23E224)

Insomnia Version

Insomnia 9.2.0

What operating system are you using?

macOS

Operating System Version

MacOS 14.4.1 (23E224)

Installation method

download from insomnia

Last Known Working Insomnia version

?

jonathan-fsa avatar May 22 '24 15:05 jonathan-fsa

@CurryYangxx maybe related to your current work to improve performance

subnetmarco avatar Jun 03 '24 13:06 subnetmarco

@CurryYangxx maybe related to your current work to improve performance

I will try to reproduce this issue

CurryYangxx avatar Jun 05 '24 07:06 CurryYangxx

I have the same issue. Insomnia works fine all day, but when I return the next day it's unresponsive. If I click on the frozen window and wait a minute, then an alert appears:

image

If I click 'Reload' then it comes right.

This reliably happens to me every day.

sgarner avatar Jun 26 '24 21:06 sgarner

I am able to reproduce, for some reason it does freeze when the application is kept running in the background, but not used for a day and the computer goes into standby. It's like the application cannot "wake up" anymore after such state.

subnetmarco avatar Jun 27 '24 13:06 subnetmarco

Hi @sgarner. Which page did your application stay on before you left your computer?

CurryYangxx avatar Jul 25 '24 08:07 CurryYangxx

Which page did your application stay on before you left your computer?

I would have left it open editing the body of a request. I mostly work with GraphQL requests, in case that makes a difference. I wonder if it's hanging when auto-refreshing the schema?

I'll try some things and see if I can narrow it down.

sgarner avatar Jul 25 '24 08:07 sgarner

Thanks for your feedback! I will look into this issue more.

CurryYangxx avatar Jul 25 '24 09:07 CurryYangxx

Well, I tried leaving Insomnia open on non-GraphQL requests and still experienced the same hangs, so that doesn't appear to be a factor.

I believe I've also encountered hangs without my computer going into sleep mode at all, just by using other apps and coming back to Insomnia after an hour or two.

It seems like the longer I've been away, the more "Insomnia has become unresponsive" dialogs I have to click through before reloading actually brings it back to life. Often it stays hung, and another "unresponsive" dialog appears about 10 seconds later. This can repeat four or five times before the app is usable.

sgarner avatar Jul 29 '24 05:07 sgarner

I’m having the same problem on my M1 Mac. It’s not happening with any other apps I’ve tried. I think it started with version 10. I don’t have any plugins installed either.

mar-schmidt avatar Nov 05 '24 18:11 mar-schmidt

@mar-schmidt @sgarner @jonathan-fsa Are you using Git sync or Insomnia cloud sync? If the workspace you are working on has a large number of requests?

Also, we did some git improvements in recent versions. If you encounter this issue when using Git sync in the older version, please try to update and see if this still exists. Thanks!

CurryYangxx avatar Nov 11 '24 03:11 CurryYangxx

I don't use the sync features so I'm not sure. When I open the sync menu it gives me the option to "Switch to Git Repository", so I guess it's using Insomnia cloud sync. Could switching to Git help?

I have a few workspaces, some larger than others. The largest probably has about 100 requests, but I've had freezes in the smaller workspaces as well.

Lately I've found that when the UI freezes up I can still close the Insomnia window (macOS - red button, top left) and then reopen it. This recovers much quicker than going through the "unresponsive" loop. But I still have to do this at least once a day. 😫

sgarner avatar Nov 11 '24 07:11 sgarner

@sgarner Thanks! It seems you are using the Insomnia cloud sync, it is by default if the workspace is under a cloud project. Do you still have this problem in the latest version? I can not reproduce but I found a sync-related logic that will be executed every minute, I guess it might be related to this.

I create a pr to temporarily cancel this part of the logic, and you can download the app artifacts here. Could you please help to test if this issue still happend in this artifact?

If everything is OK, we can be sure that this is the problem, and then I will try to optimize it.

Thank you very much!

CurryYangxx avatar Nov 12 '24 10:11 CurryYangxx

Thanks @CurryYangxx I've installed the app from the artifact now. Will report back in a few days :+1:

sgarner avatar Nov 12 '24 22:11 sgarner

@CurryYangxx I'm pleased to report that since installing this version I have not encountered a freeze yet. So it would appear that the logic you removed was indeed the culprit. 🧐

sgarner avatar Nov 16 '24 20:11 sgarner

@sgarner Thanks for your help! This artifact is just for testing, and I am considering stopping the logic execution when the app is inactive. When it's done, I'll release a beta version and comment it here.

CurryYangxx avatar Nov 18 '24 06:11 CurryYangxx

We shipped a beta release and included this issue fix. https://github.com/Kong/insomnia/releases

CurryYangxx avatar Nov 22 '24 10:11 CurryYangxx