Skip to content

When the client fails to connect to the UPS (because of access denied), it then also fails to generate a bug report #80

Closed

Description

@miguno

In my case a forbidden IP address on which the client was running caused the client to fail its connection to the UPS. This was expected. What was not expected was that the client app then failed to generate a bug report.

Here is the original error message, when the client's IP address was not yet permitted to connect to the UPS:

Exception type: WinNUT_Client_Common.NutException
Exception message: ACCESSDENIED (ERR ACCESS-DENIED)
Query: LOGOUT
Exception stack trace:
   at WinNUT_Client_Common.Nut_Socket.Query_Data(String Query_Msg)
   at WinNUT_Client_Common.Nut_Socket.Disconnect(Object silent, Object forceful)
   at WinNUT_Client_Common.UPS_Device.Disconnect(Boolean cancelReconnect, Boolean silent, Boolean forceful)
   at WinNUT_Client.WinNUT.UPSDisconnect()
   at WinNUT_Client.WinNUT.Menu_Reconnect_Click(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The actual problem described in this issue is, however, that the client then also failed to generate a bug report:

Exception type: System.InvalidOperationException
Exception message: Collection was modified; enumeration operation may not execute.
Exception stack trace:
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
   at WinNUT_Client.My.MyApplication.Generate_Button_Click(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The attached screenshots show the same information.

error1

error2

Activity

  1. gbakeman commented on Feb 27, 2023

    @gbakeman
    Contributor

    Thank you for the detailed report! I just want to mention that the Generate Report bug sounds related to #79 , so I'm going to focus on that first if you won't mind testing some debug builds soon.

  2. miguno commented on Feb 27, 2023

    @miguno
    Author

    Thanks. Works for me!

  3. gbakeman commented on Feb 27, 2023

    @gbakeman
    Contributor

    So just to be sure, I'm assuming that this is happening on Pre-Release 2.2.8436?

  4. miguno commented on Feb 27, 2023

    @miguno
    Author

    Yes, this was the latest available release (tag) when I downloaded it.

  5. myself248 commented on Apr 30, 2023

    @myself248

    This is happening to me too. I reported the initial crash in #82 but then the while-generating-the-report crash is here:

    Exception type: System.InvalidOperationException
    Exception message: Collection was modified; enumeration operation may not execute.
    Exception stack trace:
    at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
    at System.Collections.Generic.Dictionary`2.Enumerator.MoveNext()
    at WinNUT_Client.My.MyApplication.Generate_Button_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    I am using 2.2.8436.

  6. gbakeman commented on May 25, 2023

    @gbakeman
    Contributor

    Everyone,

    Apologies for the long wait. I've released a new debug build that hopes to at least address the crash when you try generating a bug report. Please download the debug build here, extract it to a temporary folder (in your Downloads folder for example), run it, then provide the log when you see the crash again. Thank you!

  7. self-assigned this
    on May 26, 2023
  8. added this to the 2.2 Stable Release milestone on May 26, 2023
  9. linked a pull request that will close this issueImprovements to Login subroutine #88on May 26, 2023
  10. gbakeman commented on May 26, 2023

    @gbakeman
    Contributor

    I've tried to replicate this crash by connecting to a NUT server that I shouldn't be allowed to connect to (by way of hosts.deny/allow), but I can't seem to reproduce it. I did clean up the authentication/login code a little, so I'd like everyone experiencing this issue to please download the latest debug build and try running it. If you still experience the error, please describe in detail how you're producing it. Thanks everyone!

  11. andsoitgoes commented on Jun 20, 2023

    @andsoitgoes

    I've tried to replicate this crash by connecting to a NUT server that I shouldn't be allowed to connect to (by way of hosts.deny/allow), but I can't seem to reproduce it. I did clean up the authentication/login code a little, so I'd like everyone experiencing this issue to please download the latest debug build and try running it. If you still experience the error, please describe in detail how you're producing it. Thanks everyone!

    Just wondering if there's anything that's come of this? Do I need to upload further debug logs or are the ones I submitted sufficient?

  12. gbakeman commented on Jul 2, 2023

    @gbakeman
    Contributor

    I've tried to replicate this crash by connecting to a NUT server that I shouldn't be allowed to connect to (by way of hosts.deny/allow), but I can't seem to reproduce it. I did clean up the authentication/login code a little, so I'd like everyone experiencing this issue to please download the latest debug build and try running it. If you still experience the error, please describe in detail how you're producing it. Thanks everyone!

    Just wondering if there's anything that's come of this? Do I need to upload further debug logs or are the ones I submitted sufficient?

    I had made some changes that I thought would help with the crashing, but I had confirmation that that is not the case in #79. I'm actually wondering if this is a duplicate of #79, and I realize I forgot to check what NUT server everyone is connecting to here. Do you all connect to a Synology NUT server by any chance?

  13. added a commit that references this issue on Jul 2, 2023
  14. linked a pull request that will close this issueError Reporting & Exception Catching Refactor #86on Jul 3, 2023
  15. gbakeman commented on Jul 4, 2023

    @gbakeman
    Contributor

    All,

    Please download the latest debug build and extract to a temporary location to test. If you would please, provide the full log even if the test is successful (should be in the Data directory, which you can find in your settings menu in the log section). Also I would like to know exactly what the NUT server is that you're connecting to.

    Thank you!

  16. myself248 commented on Jul 15, 2023

    @myself248

    Hey, this one works! Okay, the NUT sever I'm connecting to is on a Synology NAS, and it has a dialog for entering the IP addresses of permitted hosts. Evidently my desktop's IP was stable for a very long time but then changed, and the server was rejecting it, which I suspect might've been causing the crashes, but I didn't think to check the server config because "nothing had changed". Hah.

    Now that this build doesn't immediately crash, it still wouldn't connect, so I went looking for other causes, found the server config, and added my desktop's current IP. (I'll go fix this with static DHCP later.) Now it connects!

    WinNUT-Client-2023-07-15.log

  17. gbakeman commented on Aug 2, 2023

    @gbakeman
    Contributor

    All,

    The issue closed as a result of me merging the pull request with the main branch. I think the primary problem(s) here have been resolved so I'm working towards a pre-release now. I think we still need to do a better job handling ACCESS-DENIED errors, so if you're interested, please subscribe to issue #96 for further updates. And stay tuned for a pre-release in the near future.

  18. andsoitgoes commented on Aug 31, 2023

    @andsoitgoes

    All,

    The issue closed as a result of me merging the pull request with the main branch. I think the primary problem(s) here have been resolved so I'm working towards a pre-release now. I think we still need to do a better job handling ACCESS-DENIED errors, so if you're interested, please subscribe to issue #96 for further updates. And stay tuned for a pre-release in the near future.

    Thank you!! It's so nice to have this back up and working!!

    I had to go through the whole setup again because I'd totally forgotten what the heck I needed to do, tested it again and it fully connected!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions