mgoeppner / evemon

A lightweight, easy-to-use standalone Windows application designed to assist you in keeping track of your EVE Online character progression.
https://mgoeppner.github.io/evemon/
GNU General Public License v2.0
150 stars 20 forks source link

Crash on Wine due to unimplemented native HTTPListener #9

Closed njfox closed 1 month ago

njfox commented 2 years ago

The HTTPListener in https://github.com/mgoeppner/evemon/blob/main/src/EVEMon.Common/Service/SSOWebServerHttpListener.cs#L58 causes a crash on Wine during instantiation because the default System.Net assembly calls into an OS binary which is not implemented in Wine, and causes the app to crash when attempting to perform SSO authentication. As far as I know, this is the only thing preventing the app from running in Wine

.NET 6 (formerly .NET Core) includes support for Windows Forms, and allows the System.Net assembly to be compiled with a managed implementation of HTTPListener via the following attribute in the csproj:

<ForceManagedImplementation>true</ForceManagedImplementation>

This would resolve the crash on Linux. I started running some portability analyzers on the evemon project and it looks like it would be fairly trivial to port, but I ran into some errors with the upgrade-assistant tool when trying to clean up NuGet packages. I haven't had time to look into it, but maybe porting to modern .NET would be a feasible option?

mgoeppner commented 2 years ago

Hi @njfox!

Thanks for opening this issue! Porting the project to a modern .NET version is absolutely on the table, as is better cross platform support -- can you post your results from running the upgrade-assistant tool?

Thanks!

njfox commented 2 years ago

I will post some output from upgrade-assistant later on when I get a chance to run it with more logging options--the default output wasn't helpful (it was basically saying this step failed but didn't provide any further details)

As for porting to .NET 6, I am pretty rusty on .NET development and I have never worked with dotnet core--the main outstanding question I have (and haven't been able to figure it out from MSDN docs) is whether we can toggle that option for System.Net within our project, or if we have to actually custom build the dotnet runtime to toggle it. I found out about the ForcedManagedImplentation flag here but unfortunately it doesn't provide many details on how to actually use it. Do you happen to know anything about that?

njfox commented 2 years ago

Another potential approach that would avoid a port could be to try to find a different HTTP library that doesn't rely on HTTP.sys, although I don't know what all is out there.

For the SSO auth flow, would it be possible to just use raw TCP sockets to listen for the request from the browser containing the code? Or is a full HTTP listener necessary?

mgoeppner commented 2 years ago

A raw TCP socket would of course work, but it would be very un-.NET to do it that way, and a bit clunky.

My understanding is .NET core provides a managed version of HttpListener on the linux implementation. I think in the long run, updating to .NET core will provide more benefits to portability (Since with .NET core native linux binaries could be supported) than simply changing the underlying HttpListener implementation for WINE.

What do you think?

njfox commented 2 years ago

Agreed .NET core would be better for future proofing, unfortunately the managed implementation on Linux .NET won't work out of the box because while .NET core is cross platform, Windows Forms and WPF aren't. So it will have to run in wine, which as far as I know will try to use the unimplemented HTTP.sys driver.

I'll take another look at upgrade-assistant when I have time and see if I can share useful output about what went wrong with Nuget

mgoeppner commented 2 years ago

Another thought as a short term workaround -- Is it possible to provide wine with a mono .dll compiled with a managed implemention?

mgoeppner commented 2 years ago

Yeah, it looks like the main UI would need to move to use https://github.com/dotnet/maui for proper linux support.

I don't think this is a bad long term goal, but it is much bigger than just the .NET Core upgrade.

njfox commented 2 years ago

Another thought as a short term workaround -- Is it possible to provide wine with a mono .dll compiled with a managed implemention?

That's an interesting idea, I'll do some research to see if that seems feasible. One thing I remember seeing is that Mono's System.Net.HTTPListener supposedly didn't support TLS1.2, which was one of the blockers for Mono support on the upstream EVEMon project before you forked it. That was a couple of years ago so I'm not sure if it's changed, but being able to run on Mono instead of wine would be awesome.

Yeah, it looks like the main UI would need to move to use https://github.com/dotnet/maui for proper linux support.

Yeah, that would be awesome but seems like a pretty big undertaking for now

mgoeppner commented 2 years ago

https://github.com/mgoeppner/evemon/compare/main...mgoeppner:net-core-6?expand=1

I made a pass at upgrading to 6.0 with the upgrade-assistant, and that branch is the result. There's a healthy amount of work that needs to be done in some of the dependencies to fix the build. The old logitech g5 project should probably be dropped entirely.

njfox commented 2 years ago

BTW, I just tried running it in Mono (which should use mono version of HTTPListener), but for some reason got the same error:

System.NotImplementedException: The method or operation is not implemented.
  at EVEMon.Common.Service.SSOWebServerHttpListener..ctor () [0x0006e] in <764c96bbce0f45f49528f4269978950f>:0 
  at EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow..ctor () [0x00013] in <a11f83c1721c48fabcf97885f2eb7c49>:0 
  at (wrapper remoting-invoke-with-check) EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow..ctor()
  at EVEMon.MainWindow.addAPIKeyMenu_Click (System.Object sender, System.EventArgs e) [0x00000] in <a11f83c1721c48fabcf97885f2eb7c49>:0 
  at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00019] in <fef229f3059c47f39598bb88ddd21818>:0 
  at System.Windows.Forms.ToolStripMenuItem.OnClick (System.EventArgs e) [0x00090] in <fef229f3059c47f39598bb88ddd21818>:0 
[...]

It does look like mono supports TLS1.2 as of version 5, so that bug shouldn't be holding it back

njfox commented 2 years ago

Following up on #14 , it looks like the One drive SDK package is abandoned and doesn't support Core, although there is a fork that does. Perhaps that might be worth looking into.

Update--I started looking into the onedrive SDK fork, and like most of the other dependencies it's a mess of deprecated/broken functionality :( I'll let you know if I get anywhere with it, but I'm surprised this functionality even still works since the library has been abandoned for 5 years.

mgoeppner commented 2 years ago

Hi! I haven't had much time this week to dig into this, I'll do some more prodding this weekend. Thanks for the PR!

I am thinking of removing a lot of the legacy features like onedrive which make moving to .net6 harder -- will get a poll together to get some community feedback before we do that though.

mgoeppner commented 2 years ago

https://github.com/mgoeppner/evemon/pull/41 fixing the HttpListener under mono uncovers other delightful problems with threading.

mgoeppner commented 2 years ago

@njfox Give this branch a try and let me know how it goes for you -- it should run natively under mono: https://app.circleci.com/pipelines/github/mgoeppner/evemon/41/workflows/36f4907b-b4aa-46ce-9cdd-9034955a5720/jobs/38/artifacts

xiaoxi654 commented 2 years ago

@njfox Give this branch a try and let me know how it goes for you -- it should run natively under mono: https://app.circleci.com/pipelines/github/mgoeppner/evemon/41/workflows/36f4907b-b4aa-46ce-9cdd-9034955a5720/jobs/38/artifacts

There is another crash happend when logged in, then click import button in ESI key import window.

EDIT: Only happens when using mono, if use wine to run, then everything works fine.

EVEMon Version: 4.2.0.5040
.NET Runtime Version: 4.0.30319.42000
Operating System: Unix 5.17.8.1
Executable Path: /home/xiaoxi/Games/EVEMon/EVEMon.exe
System.NullReferenceException: Object reference not set to an instance of an object
  at System.Windows.Forms.WebBrowser.Refresh (System.Windows.Forms.WebBrowserRefreshOption opt) [0x00042] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.WebBrowser.Refresh () [0x00000] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x0004b] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnParentEnabledChanged (System.EventArgs e) [0x00008] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.OnEnabledChanged (System.EventArgs e) [0x00082] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.ChangeParent (System.Windows.Forms.Control new_parent) [0x00096] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.ChangeParent(System.Windows.Forms.Control)
  at System.Windows.Forms.Control+ControlCollection.Add (System.Windows.Forms.Control value) [0x00143] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.TabControl+ControlCollection.Add (System.Windows.Forms.Control value) [0x0002f] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.TabControl.InsertTab (System.Int32 index, System.Windows.Forms.TabPage value) [0x00014] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at (wrapper remoting-invoke-with-check) System.Windows.Forms.TabControl.InsertTab(int,System.Windows.Forms.TabPage)
  at System.Windows.Forms.TabControl+TabPageCollection.Insert (System.Int32 index, System.Windows.Forms.TabPage tabPage) [0x00000] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at EVEMon.MainWindow.LayoutTabPages () [0x00143] in <cdea080947d44539a22c2cee76c8a286>:0 
  at EVEMon.MainWindow.UpdateTabs () [0x00000] in <cdea080947d44539a22c2cee76c8a286>:0 
  at EVEMon.MainWindow.EveMonClient_MonitoredCharacterCollectionChanged (System.Object sender, System.EventArgs e) [0x00032] in <cdea080947d44539a22c2cee76c8a286>:0 
  at EVEMon.Common.Extensions.EventHandlerExtensions.ThreadSafeInvoke (System.EventHandler eventHandler, System.Object sender, System.EventArgs e) [0x00055] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.EveMonClient.OnMonitoredCharactersChanged () [0x0001d] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.Collections.Global.GlobalMonitoredCharacterCollection.OnCharacterMonitoringChanged (EVEMon.Common.Models.Character character, System.Boolean value) [0x0001e] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.Models.Character.set_Monitored (System.Boolean value) [0x00005] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.Collections.Global.GlobalCharacterCollection.Add (EVEMon.Common.Models.Character character, System.Boolean notify, System.Boolean monitor) [0x0000f] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.Models.ESIKey.Update (EVEMon.Common.CustomEventArgs.ESIKeyCreationEventArgs e) [0x000b6] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.Common.CustomEventArgs.ESIKeyCreationEventArgs.CreateOrUpdate () [0x0002f] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 
  at EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow.Complete () [0x00009] in <cdea080947d44539a22c2cee76c8a286>:0 
  at EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow.ButtonNext_Click (System.Object sender, System.EventArgs e) [0x00013] in <cdea080947d44539a22c2cee76c8a286>:0 
  at System.Windows.Forms.Control.OnClick (System.EventArgs e) [0x00019] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Button.OnClick (System.EventArgs e) [0x00011] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.ButtonBase.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00069] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Button.OnMouseUp (System.Windows.Forms.MouseEventArgs mevent) [0x00000] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00078] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001b4] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.ButtonBase.WndProc (System.Windows.Forms.Message& m) [0x00037] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Button.WndProc (System.Windows.Forms.Message& m) [0x00000] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 
  at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr lParam) [0x00085] in <c6f7ca72402d44ffad61bbfb1e840a0f>:0 

Datafile report:
  eve-properties-en-US.xml.gzip (57KiB - 2b61fbc476da11385fc1ab2f058d91e8)
  eve-items-en-US.xml.gzip (3870KiB - a551e809290c88c634953b1c713daa1b)
  eve-skills-en-US.xml.gzip (26KiB - 0a84e91dcbece4b0d8d1e56f2619f5c5)
  eve-certificates-en-US.xml.gzip (45KiB - 540000f7c111354769a54fa31e57d411)
  eve-masteries-en-US.xml.gzip (21KiB - 3668b50996fc40a0c0853fec427b5712)
  eve-blueprints-en-US.xml.gzip (239KiB - 410280ee6121f561ac7f09354972ce38)
  eve-geography-en-US.xml.gzip (1011KiB - 957829e60281e4d412a0eef3020aeef9)
  eve-reprocessing-en-US.xml.gzip (112KiB - 8d9835c8b474942685888927396f4b7a)

Diagnostic Log:
0d 0h 00m 00s > Starting up
0d 0h 00m 00s > EveMonClient.Initialize - begin
0d 0h 00m 00s > EveMonClient.Initialize - done
0d 0h 00m 00s > Settings.Import - begin
0d 0h 00m 00s > EveMonClient.OnSchedulerChanged
0d 0h 00m 00s > Settings.Import - done
0d 0h 00m 00s > EveMonClient.OnSettingsChanged
0d 0h 00m 00s > Main loop - start
0d 0h 00m 00s > EveMonClient.Run
0d 0h 00m 00s > TimeCheck.ScheduleCheck - in 00:00:01
0d 0h 00m 00s > UpdateManager.ScheduleCheck - in 00:00:10
0d 0h 00m 00s > Main window - loaded
0d 0h 00m 00s > Datafiles.Load - begin
0d 0h 00m 02s > EveMonClient.OnServerStatusUpdated

0d 0h 00m 02s > ExceptionHandler.LogException - Handled exception
    System.EntryPointNotFoundException: LoadCursorFromFile assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) EVEMon.Common.Controls.NativeMethods.LoadCursorFromFile(string)
  at EVEMon.Common.Controls.CustomCursors.GetCursorFromResource (System.Byte[] resource) [0x00036] in <f0d5b66cac1841678a3f3e196cd5fb34>:0 

0d 0h 00m 05s > Datafiles.Load - done
0d 0h 00m 05s > Settings.ImportData - begin
0d 0h 00m 05s > EveMonClient.OnCharacterCollectionChanged
0d 0h 00m 05s > EveMonClient.OnESIKeyCollectionChanged
0d 0h 00m 05s > EveMonClient.OnMonitoredCharactersChanged
0d 0h 00m 05s > Settings.ImportData - done
0d 0h 00m 05s > EveMonClient.OnSettingsChanged
0d 0h 00m 25s > EveMonClient.OnMonitoredCharactersChanged
malinkb commented 1 year ago

Probably as expected, but I tried to run the app version: 4.2.2.5058 with wine 8.0 and get the same still:

EVEMon Version: 4.2.2.5058
.NET Runtime Version: 4.0.30319.42000
Operating System: Microsoft Windows NT 10.0.18362.0
Executable Path: "C:\EVEMon\EVEMon.exe" 
System.Net.HttpListenerException (0x80004005): Call not implemented
   at System.Net.HttpListener.SetUrlGroupProperty(HTTP_SERVER_PROPERTY property, IntPtr info, UInt32 infosize)
   at System.Net.HttpListener.SetServerTimeout(Int32[] timeouts, UInt32 minSendBytesPerSecond)
   at System.Net.HttpListenerTimeoutManager.SetTimespanTimeout(HTTP_TIMEOUT_TYPE type, TimeSpan value)
   at EVEMon.Common.Service.SSOWebServerHttpListener..ctor()
   at EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow..ctor()
   at EVEMon.MainWindow.addAPIKeyMenu_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.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.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Datafile report:
  eve-blueprints-en-US.xml.gzip (240KiB - 75d32177171a550e1b268514f7506b35)
  eve-certificates-en-US.xml.gzip (45KiB - 540000f7c111354769a54fa31e57d411)
  eve-geography-en-US.xml.gzip (1011KiB - 26e0fb4abc67d508c78d68ff80dc286e)
  eve-items-en-US.xml.gzip (4024KiB - 24aaf0e9708b8034be89415ebac1bdd9)
  eve-masteries-en-US.xml.gzip (21KiB - 3668b50996fc40a0c0853fec427b5712)
  eve-properties-en-US.xml.gzip (58KiB - 3e0d7f712f8a4567047450b1882e498a)
  eve-reprocessing-en-US.xml.gzip (113KiB - 82e24f4699edeb85bbe8160dd5646760)
  eve-skills-en-US.xml.gzip (26KiB - 8e17b179c6a95bf79a6fc7b19f260014)

Diagnostic Log:
0d 0h 00m 00s > Starting up
0d 0h 00m 00s > EveMonClient.Initialize - begin
0d 0h 00m 00s > Program.StartupAsync - done
0d 0h 00m 00s > Settings.TryDeserializeFromFile - begin
0d 0h 00m 02s > Settings.TryDeserializeFromFile - done
0d 0h 00m 02s > Settings.Import - begin
0d 0h 00m 02s > EveMonClient.OnSchedulerChanged
0d 0h 00m 02s > Settings.Import - done
0d 0h 00m 02s > EveMonClient.OnSettingsChanged
0d 0h 00m 02s > Main loop - start
0d 0h 00m 02s > MainWindow.OnLoad
0d 0h 00m 02s > TimeCheck.ScheduleCheck - in 00:00:01
0d 0h 00m 02s > UpdateManager.ScheduleCheck - in 00:00:10
0d 0h 00m 02s > Main window - loaded
0d 0h 00m 02s > Datafiles.Load - begin
0d 0h 00m 03s > TimeCheck.BeginCheckAsync
0d 0h 00m 03s > TimeCheck.OnCheckCompleted - Synchronised
0d 0h 00m 03s > TimeCheck.ScheduleCheck - in 1.00:00:00
0d 0h 00m 04s > EveMonClient.OnServerStatusUpdated
0d 0h 00m 07s > Datafiles.Load - done
0d 0h 00m 07s > Settings.ImportData - begin
0d 0h 00m 07s > EveMonClient.OnCharacterCollectionChanged
0d 0h 00m 07s > EveMonClient.OnESIKeyCollectionChanged
0d 0h 00m 07s > EveMonClient.OnMonitoredCharactersChanged
0d 0h 00m 07s > Settings.ImportData - done
0d 0h 00m 07s > EveMonClient.OnSettingsChanged
mgoeppner commented 1 year ago

Probably as expected, but I tried to run the app version: 4.2.2.5058 with wine 8.0 and get the same still:

EVEMon Version: 4.2.2.5058
.NET Runtime Version: 4.0.30319.42000
Operating System: Microsoft Windows NT 10.0.18362.0
Executable Path: "C:\EVEMon\EVEMon.exe" 
System.Net.HttpListenerException (0x80004005): Call not implemented
   at System.Net.HttpListener.SetUrlGroupProperty(HTTP_SERVER_PROPERTY property, IntPtr info, UInt32 infosize)
   at System.Net.HttpListener.SetServerTimeout(Int32[] timeouts, UInt32 minSendBytesPerSecond)
   at System.Net.HttpListenerTimeoutManager.SetTimespanTimeout(HTTP_TIMEOUT_TYPE type, TimeSpan value)
   at EVEMon.Common.Service.SSOWebServerHttpListener..ctor()
   at EVEMon.ApiCredentialsManagement.EsiKeyUpdateOrAdditionWindow..ctor()
   at EVEMon.MainWindow.addAPIKeyMenu_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.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.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Datafile report:
  eve-blueprints-en-US.xml.gzip (240KiB - 75d32177171a550e1b268514f7506b35)
  eve-certificates-en-US.xml.gzip (45KiB - 540000f7c111354769a54fa31e57d411)
  eve-geography-en-US.xml.gzip (1011KiB - 26e0fb4abc67d508c78d68ff80dc286e)
  eve-items-en-US.xml.gzip (4024KiB - 24aaf0e9708b8034be89415ebac1bdd9)
  eve-masteries-en-US.xml.gzip (21KiB - 3668b50996fc40a0c0853fec427b5712)
  eve-properties-en-US.xml.gzip (58KiB - 3e0d7f712f8a4567047450b1882e498a)
  eve-reprocessing-en-US.xml.gzip (113KiB - 82e24f4699edeb85bbe8160dd5646760)
  eve-skills-en-US.xml.gzip (26KiB - 8e17b179c6a95bf79a6fc7b19f260014)

Diagnostic Log:
0d 0h 00m 00s > Starting up
0d 0h 00m 00s > EveMonClient.Initialize - begin
0d 0h 00m 00s > Program.StartupAsync - done
0d 0h 00m 00s > Settings.TryDeserializeFromFile - begin
0d 0h 00m 02s > Settings.TryDeserializeFromFile - done
0d 0h 00m 02s > Settings.Import - begin
0d 0h 00m 02s > EveMonClient.OnSchedulerChanged
0d 0h 00m 02s > Settings.Import - done
0d 0h 00m 02s > EveMonClient.OnSettingsChanged
0d 0h 00m 02s > Main loop - start
0d 0h 00m 02s > MainWindow.OnLoad
0d 0h 00m 02s > TimeCheck.ScheduleCheck - in 00:00:01
0d 0h 00m 02s > UpdateManager.ScheduleCheck - in 00:00:10
0d 0h 00m 02s > Main window - loaded
0d 0h 00m 02s > Datafiles.Load - begin
0d 0h 00m 03s > TimeCheck.BeginCheckAsync
0d 0h 00m 03s > TimeCheck.OnCheckCompleted - Synchronised
0d 0h 00m 03s > TimeCheck.ScheduleCheck - in 1.00:00:00
0d 0h 00m 04s > EveMonClient.OnServerStatusUpdated
0d 0h 00m 07s > Datafiles.Load - done
0d 0h 00m 07s > Settings.ImportData - begin
0d 0h 00m 07s > EveMonClient.OnCharacterCollectionChanged
0d 0h 00m 07s > EveMonClient.OnESIKeyCollectionChanged
0d 0h 00m 07s > EveMonClient.OnMonitoredCharactersChanged
0d 0h 00m 07s > Settings.ImportData - done
0d 0h 00m 07s > EveMonClient.OnSettingsChanged

Linux support is not in mainline -- you need a build of this branch for it to work correctly.

malinkb commented 1 year ago

Linux support is not in mainline -- you need a build of this branch for it to work correctly.

Ah, I see. Where is the build of this branch that I need?

mgoeppner commented 1 year ago

Sorry thought this was in the PR -- the artifacts with linux support are here: https://app.circleci.com/pipelines/github/mgoeppner/evemon/69/workflows/374f790e-0483-4726-9b7b-1b998b8f8708/jobs/65/artifacts

malinkb commented 1 year ago

Thanks

That one works like a charm as far as I can see :heart:

malinkb commented 10 months ago

Here is a build I did with circleci and the linux-fixes branch

https://app.circleci.com/pipelines/github/malinkb/evemon/1/workflows/0b97fbf7-8a9c-43f3-9d61-d7c0d3f1fa49/jobs/1/artifacts

eqvinox commented 1 month ago

3-line wine fix:

diff --git a/dlls/httpapi/httpapi_main.c b/dlls/httpapi/httpapi_main.c
index b320e1c11956..f248b75a7508 100644
--- a/dlls/httpapi/httpapi_main.c
+++ b/dlls/httpapi/httpapi_main.c
@@ -672,6 +672,9 @@ ULONG WINAPI HttpSetUrlGroupProperty(HTTP_URL_GROUP_ID id, HTTP_SERVER_PROPERTY
         case HttpServerLoggingProperty:
             WARN("Ignoring logging property.\n");
             return ERROR_SUCCESS;
+        case HttpServerTimeoutsProperty:
+            WARN("Ignoring timeouts property.\n");
+            return ERROR_SUCCESS;
         default:
             FIXME("Unhandled property %u.\n", property);
             return ERROR_CALL_NOT_IMPLEMENTED;

../wine/configure --enable-win64; make -C dlls/httpapi; sudo cp -i dlls/httpapi/x86_64-windows/httpapi.dll /opt/wine-devel/lib64/wine/x86_64-windows/

mgoeppner commented 1 month ago

https://github.com/mgoeppner/evemon/commit/d2333b1ba2d0070f62346e6c5806f60deec2a274 resolved by rewriting the HttpListener code to use kestrel.