EDCD / EDMarketConnector

Downloads commodity market and other station data from the game Elite: Dangerous for use with all popular online and offline trading tools.
GNU General Public License v2.0
988 stars 155 forks source link

Latest update rebooted Windows 10 without asking for confirmation #1492

Closed b-vest closed 2 years ago

b-vest commented 2 years ago

Please check the Known Issues in case this has already been reported.

Please also check if the issue is covered in our Troubleshooting Guide. It might be something with a known work around, or where a third party (such as EDSM) is causing logging that is harmless.

Please complete the following information:

Describe the bug When the update completed Windows went straight to restarting.

To Reproduce Steps to reproduce the behavior: Update to latest version. I am not sure if it is reproducible. Windows Event logs does have the messages below.


Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:30 PM
Event ID:      10005
Task Category: None
Level:         Information
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Machine restart is required.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10005</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:30.8595509Z" />
    <EventRecordID>119975</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="12000" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <nApplications>3</nApplications>
      <Applications>
        <Application>EDMarketConnector.exe</Application>
        <Application>EDMarketConnector.exe</Application>
        <Application>System</Application>
      </Applications>
      <RebootReasons>3</RebootReasons>
    </RmRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:30 PM
Event ID:      10010
Task Category: None
Level:         Warning
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Application 'C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe' (pid 16816) cannot be restarted - Application SID does not match Conductor SID..
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10010</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:30.8453541Z" />
    <EventRecordID>119974</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="12000" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmUnsupportedRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <Pid>16816</Pid>
      <FullPath>C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe</FullPath>
      <DisplayName>EDMarketConnector.exe</DisplayName>
      <AppVersion>0</AppVersion>
      <AppType>0</AppType>
      <TSSessionId>1</TSSessionId>
      <Status>67108865</Status>
      <Reason>1</Reason>
    </RmUnsupportedRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:30 PM
Event ID:      10010
Task Category: None
Level:         Warning
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Application 'C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe' (pid 7300) cannot be restarted - Application SID does not match Conductor SID..
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10010</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:30.8313254Z" />
    <EventRecordID>119973</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="12000" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmUnsupportedRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <Pid>7300</Pid>
      <FullPath>C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe</FullPath>
      <DisplayName>EDMarketConnector.exe</DisplayName>
      <AppVersion>0</AppVersion>
      <AppType>0</AppType>
      <TSSessionId>1</TSSessionId>
      <Status>67108865</Status>
      <Reason>1</Reason>
    </RmUnsupportedRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:28 PM
Event ID:      10000
Task Category: None
Level:         Information
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Starting session 0 - ‎2022‎-‎02‎-‎25T18:08:28.938852700Z.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10000</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:28.9389407Z" />
    <EventRecordID>119972</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="12000" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmSessionEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <UTCStartTime>2022-02-25T18:08:28.9388527Z</UTCStartTime>
    </RmSessionEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:28 PM
Event ID:      10005
Task Category: None
Level:         Information
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Machine restart is required.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10005</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:28.6424673Z" />
    <EventRecordID>119971</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="18124" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <nApplications>3</nApplications>
      <Applications>
        <Application>EDMarketConnector.exe</Application>
        <Application>EDMarketConnector.exe</Application>
        <Application>System</Application>
      </Applications>
      <RebootReasons>3</RebootReasons>
    </RmRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:28 PM
Event ID:      10010
Task Category: None
Level:         Warning
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Application 'C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe' (pid 16816) cannot be restarted - Application SID does not match Conductor SID..
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10010</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:28.6240051Z" />
    <EventRecordID>119970</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="18124" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmUnsupportedRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <Pid>16816</Pid>
      <FullPath>C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe</FullPath>
      <DisplayName>EDMarketConnector.exe</DisplayName>
      <AppVersion>0</AppVersion>
      <AppType>0</AppType>
      <TSSessionId>1</TSSessionId>
      <Status>67108865</Status>
      <Reason>1</Reason>
    </RmUnsupportedRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:28 PM
Event ID:      10010
Task Category: None
Level:         Warning
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Application 'C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe' (pid 7300) cannot be restarted - Application SID does not match Conductor SID..
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10010</EventID>
    <Version>0</Version>
    <Level>3</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:28.6084684Z" />
    <EventRecordID>119969</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="18124" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmUnsupportedRestartEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <Pid>7300</Pid>
      <FullPath>C:\Program Files (x86)\EDMarketConnector\EDMarketConnector.exe</FullPath>
      <DisplayName>EDMarketConnector.exe</DisplayName>
      <AppVersion>0</AppVersion>
      <AppType>0</AppType>
      <TSSessionId>1</TSSessionId>
      <Status>67108865</Status>
      <Reason>1</Reason>
    </RmUnsupportedRestartEvent>
  </UserData>
</Event>

Log Name:      Application
Source:        Microsoft-Windows-RestartManager
Date:          2/25/2022 1:08:13 PM
Event ID:      10000
Task Category: None
Level:         Information
Keywords:      
User:          DESKTOP-FIC715F\murli
Computer:      DESKTOP-FIC715F
Description:
Starting session 0 - ‎2022‎-‎02‎-‎25T18:08:13.162562600Z.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Microsoft-Windows-RestartManager" Guid="{0888e5ef-9b98-4695-979d-e92ce4247224}" />
    <EventID>10000</EventID>
    <Version>0</Version>
    <Level>4</Level>
    <Task>0</Task>
    <Opcode>0</Opcode>
    <Keywords>0x8000000000000000</Keywords>
    <TimeCreated SystemTime="2022-02-25T18:08:13.1629945Z" />
    <EventRecordID>119968</EventRecordID>
    <Correlation />
    <Execution ProcessID="15124" ThreadID="18124" />
    <Channel>Application</Channel>
    <Computer>DESKTOP-FIC715F</Computer>
    <Security UserID="S-1-5-21-1023994096-2352594244-3398408133-1001" />
  </System>
  <UserData>
    <RmSessionEvent xmlns="http://www.microsoft.com/2005/08/Windows/Reliability/RestartManager/">
      <RmSessionId>0</RmSessionId>
      <UTCStartTime>2022-02-25T18:08:13.1625626Z</UTCStartTime>
    </RmSessionEvent>
  </UserData>
</Event>```

**Expected behavior**
Ask for reboot confirmation.

**Additional context**
Application seems to be working fine since the reboot.
Athanasius commented 2 years ago

There's now a second report of this https://forums.frontier.co.uk/threads/elite-dangerous-market-connector-edmc.548869/post-9861368 .

As noted in my reply there, the real puzzle is why EDMarketConnector.exe isn't exiting when WinSparkle.DLL calls the provided callback function.

There might, or might not, be a tweak I can do to the installer to ensure it doesn't do this. I checked when this issues was opened and couldn't see anything in the current installer configuration that explicitly asks for such.

Athanasius commented 2 years ago

Looking at https://www.itninja.com/blog/view/reallysuppress-a-msi-reboot this may well be a consequence of the original developer's decision to have the EDMC installers present no UI/options for customisation. The default in the absence of such being to reboot 'if needed'.

I'll see how to specify 'ReallySuppress' for this, if possible.

yianniv commented 2 years ago

EDMarketConnector-debug.log.zip I uploaded the last logs until the auto restart of my PC, as requested. 7 of them, zipped.

Athanasius commented 2 years ago

EDMarketConnector-debug.log.zip I uploaded the last logs until the auto restart of my PC, as requested. 7 of them, zipped.

  1. None of those contain anything about the shutdown sequence...
  2. ... probably because the canonn plugin seems to be spamming the debug log with things like:
    2022-06-09 15:09:25.724 UTC - DEBUG - 21132:30156:30156 <plugins>.EDMC-Canonn-6.
    6.0.canonn.patrol.InfoLink.__configure_event:174: diff 0.131029
    2022-06-09 15:09:25.725 UTC - DEBUG - 21132:30156:30156 <plugins>.EDMC-Canonn-6.
    6.0.canonn.release.ReleaseLink.__configure_event:78: Release widget resize
    2022-06-09 15:09:25.733 UTC - DEBUG - 21132:30156:30156 <plugins>.EDMC-Canonn-6.
    6.0.canonn.release.ReleaseLink.__configure_event:78: Release widget resize
yianniv commented 2 years ago

Yes, I scrolled through them for a bit and noticed the same, but I thought you'd look for some specific text that I couldn't find at a glance. Sorry.

Athanasius commented 2 years ago

Nope, literally no line that doesn't contain EDMC-Canonn in those.

Athanasius commented 2 years ago

OK, tested with that installer tweak:

  1. Had 5.4.0 EDMarketConnector.exe running.
  2. Manually ran the 5.4.1-alpha0 installer I just made from develop, this means nothing asked the .exe to shutdown.
  3. The installation process had a stall in the middle, but then eventually completed with a popup:

image

yianniv commented 2 years ago

That looks great, but I'd like to suggest something else: Is it possible to notify in advance that if we're to proceed with installation, a restart will be required and let us choose to abort the installation before starting? I don't know if msiexec offers such option.

Athanasius commented 2 years ago

That looks great, but I'd like to suggest something else: Is it possible to notify in advance that if we're to proceed with installation, a restart will be required and let us choose to abort the installation before starting? I don't know if msiexec offers such option.

Not without performing major work on how the installer works, which is out of scope for the time being. That 'stall' in the middle is presumably it specifically trying to overwrite the .exe, failing, waiting a while, trying again etc, and then finally giving up. i.e. it doesn't even know there's going to be a problem until it hits that part of the installation process, by which time it may well have already replaced many other files.

yianniv commented 2 years ago

I'm not arguing, and I don't know what the process does. In my case I think it couldn't close the running program (I could still see it, dimmed, as stuck programs usually are). Your solution is great, and I'm happy for the time you took to solve it. The problem is marginal, anyway :)

Athanasius commented 2 years ago

This change is in the 5.4.1 installer.