Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close CKAN if not connected to the internet while refreshing mod list #1981

Closed
fat-lobyte opened this issue Jan 11, 2017 · 6 comments · Fixed by #3645
Closed

Can't close CKAN if not connected to the internet while refreshing mod list #1981

fat-lobyte opened this issue Jan 11, 2017 · 6 comments · Fixed by #3645
Labels
Enhancement New features or functionality GUI Issues affecting the interactive GUI Network Issues affecting internet connections of CKAN

Comments

@fat-lobyte
Copy link

fat-lobyte commented Jan 11, 2017

CKAN Version:
v1.22.1-0-g174271a

Operating System:
Windows 7, 64 Bit

The issue you are experiencing:
CKAN is not closable with the "X" while the "Updating repositories" operation is running. If no internet connection is present when refreshing, sometimes this operation never finishes (not even when restoring the internet connection). Since the Cancel button is greyed out and the X-Button on the window does not react, there is no way to cleanly shutdown CKAN. You are required to kill CKAN via the task manager.

Additionally, if CKAN is then killed, the CKAN.ModuleNotFoundKraken is shown at every subsequent start, until a refresh is successful.

How to recreate this issue:

  1. Start CKAN
  2. Disable your computers internet connection
  3. Click refresh
  4. Observe that there is no way to escape CKAN now.
  5. You are trapped forever.
@ayan4m1 ayan4m1 added the Enhancement New features or functionality label Sep 17, 2017
@flashmeow

This comment was marked as off-topic.

@politas

This comment was marked as off-topic.

@flashmeow

This comment was marked as off-topic.

@politas

This comment was marked as off-topic.

@HebaruSan HebaruSan added the Network Issues affecting internet connections of CKAN label Jan 5, 2018
@HebaruSan
Copy link
Member

This happens because GUI cancels closing if the main menu is disabled:

CKAN/GUI/Main/Main.cs

Lines 435 to 442 in 2f3d817

protected override void OnFormClosing(FormClosingEventArgs e)
{
// Only close the window, when the user has access to the "Exit" of the menu.
if (!menuStrip1.Enabled)
{
e.Cancel = true;
return;
}

And it disables the main menu during registry update:

public void UpdateRepo()
{
tabController.RenameTab("WaitTabPage", Properties.Resources.MainRepoWaitTitle);
try
{
Wait.StartWaiting(UpdateRepo, PostUpdateRepo, false, null);
}
catch { }
Util.Invoke(this, SwitchEnabledState);

private void SwitchEnabledState()
{
_enabled = !_enabled;
menuStrip1.Enabled = _enabled;

It also disables the main menu when you click Apply in the change set tab to start an install:

private void Changeset_OnConfirmChanges()
{
menuStrip1.Enabled = false;

I would have to investigate to determine whether closing the app in these situations would cause problems. Hopefully judicious use of transactions and exception handling would at least not corrupt the registry if operations don't complete.

@HebaruSan
Copy link
Member

This would be good to address with #1238, the user ought to be able to cancel out of updating with a broken network connection, and an unreachable repo should revert you to whatever registry you had before.

@HebaruSan HebaruSan added the GUI Issues affecting the interactive GUI label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New features or functionality GUI Issues affecting the interactive GUI Network Issues affecting internet connections of CKAN
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants