SafeExamBrowser / seb-win-refactoring

Safe Exam Browser for Windows.
https://www.safeexambrowser.org/news_en.html
Mozilla Public License 2.0
179 stars 119 forks source link

SEB Reset Utility - System.NullReferenceException #712

Closed NekoJonez closed 9 months ago

NekoJonez commented 10 months ago
12:42:11.407 [01] - ERROR: [EaseOfAccessConfiguration] Failed to delete registry item 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EmbeddedLogon\BrandingNeutral'!

   Exception Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
   Exception Type: System.NullReferenceException

   bij SafeExamBrowser.Lockdown.FeatureConfigurations.RegistryConfigurations.RegistryConfiguration.TryDelete(RegistryDataItem item) in C:\Users\appveyor\projects\seb-win-refactoring-ist041kp6jai2xxx\SafeExamBrowser.Lockdown\FeatureConfigurations\RegistryConfigurations\RegistryConfiguration.cs:regel 192

12:42:11.408 [01] - ERROR: [EaseOfAccessConfiguration] Failed to delete registry item 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Utilman.exe\Debugger'!

   Exception Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
   Exception Type: System.NullReferenceException

   bij SafeExamBrowser.Lockdown.FeatureConfigurations.RegistryConfigurations.RegistryConfiguration.TryDelete(RegistryDataItem item) in C:\Users\appveyor\projects\seb-win-refactoring-ist041kp6jai2xxx\SafeExamBrowser.Lockdown\FeatureConfigurations\RegistryConfigurations\RegistryConfiguration.cs:regel 192

After that the reset utility stops doing work.

dbuechel commented 10 months ago

Can you please post the entire log file again, I'd need that to be able to reconstruct the flow of events (of course it can be sanitized, i.e. feel free or rather take care to eliminate any personal information like user name or SIDs beforehand).

NekoJonez commented 10 months ago

I'll do that on monday, when I'm back at work.

NekoJonez commented 10 months ago
Use the up/down arrow keys to scroll. Press enter to return to the main menu.

# Application started at 2023-11-20 14:18:30.509

14:18:30.537 [01] - INFO: There is currently no other instance running.
14:18:30.539 [01] - INFO: User '***' is running the application with administrator privileges.
14:18:30.540 [01] - INFO: SEB is currently not running.
14:18:38.049 [01] - INFO: [UserInfo] Found SID 'S-1-12-***' via 'NtAccount' for user name '***'!
14:18:38.088 [01] - INFO: Attempting to reset all configuration values for user '***' with SID 'S-1-12-***'...
14:18:38.103 [01] - DEBUG: [ChangePasswordConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableChangePassword' as it does not exist.
14:18:38.104 [01] - INFO: [ChangePasswordConfiguration] Successfully deleted feature configuration.
14:18:38.105 [01] - DEBUG: [ChromeNotificationConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Policies\Google\Chrome\DefaultNotificationsSetting' as it does not exist.
14:18:38.105 [01] - INFO: [ChromeNotificationConfiguration] Successfully deleted feature configuration.
14:18:38.121 [01] - ERROR: [EaseOfAccessConfiguration] Failed to delete registry item 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EmbeddedLogon\BrandingNeutral'!

   Exception Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
   Exception Type: System.NullReferenceException

   bij SafeExamBrowser.Lockdown.FeatureConfigurations.RegistryConfigurations.RegistryConfiguration.TryDelete(RegistryDataItem item) in C:\Users\appveyor\projects\seb-win-refactoring-ist041kp6jai2xxx\SafeExamBrowser.Lockdown\FeatureConfigurations\RegistryConfigurations\RegistryConfiguration.cs:regel 192

14:18:38.121 [01] - ERROR: [EaseOfAccessConfiguration] Failed to delete registry item 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Utilman.exe\Debugger'!

   Exception Message: De objectverwijzing is niet op een exemplaar van een object ingesteld.
   Exception Type: System.NullReferenceException

   bij SafeExamBrowser.Lockdown.FeatureConfigurations.RegistryConfigurations.RegistryConfiguration.TryDelete(RegistryDataItem item) in C:\Users\appveyor\projects\seb-win-refactoring-ist041kp6jai2xxx\SafeExamBrowser.Lockdown\FeatureConfigurations\RegistryConfigurations\RegistryConfiguration.cs:regel 192

14:18:38.122 [01] - WARNING: [EaseOfAccessConfiguration] Failed to delete feature configuration!
14:18:38.123 [01] - DEBUG: [FindPrinterConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoAddPrinter' as it does not exist.
14:18:38.124 [01] - INFO: [FindPrinterConfiguration] Successfully deleted feature configuration.
14:18:38.125 [01] - DEBUG: [LockWorkstationConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableLockWorkstation' as it does not exist.
14:18:38.125 [01] - INFO: [LockWorkstationConfiguration] Successfully deleted feature configuration.
14:18:38.127 [01] - DEBUG: [MachinePowerOptionsConfiguration] No need to delete registry item 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose' as it does not exist.
14:18:38.127 [01] - INFO: [MachinePowerOptionsConfiguration] Successfully deleted feature configuration.
14:18:38.128 [01] - DEBUG: [NetworkOptionsConfiguration] No need to delete registry item 'HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System\DontDisplayNetworkSelectionUI' as it does not exist.
14:18:38.129 [01] - INFO: [NetworkOptionsConfiguration] Successfully deleted feature configuration.
14:18:38.132 [01] - DEBUG: [RemoteConnectionConfiguration] Successfully set registry item 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\fDenyTSConnections' => '1'.
14:18:38.132 [01] - INFO: [RemoteConnectionConfiguration] Successfully disabled feature.
14:18:38.133 [01] - DEBUG: [SignoutConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoLogoff' as it does not exist.
14:18:38.135 [01] - INFO: [SignoutConfiguration] Successfully deleted feature configuration.
14:18:38.136 [01] - DEBUG: [SwitchUserConfiguration] No need to delete registry item 'HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\HideFastUserSwitching' as it does not exist.
14:18:38.137 [01] - INFO: [SwitchUserConfiguration] Successfully deleted feature configuration.
14:18:38.138 [01] - DEBUG: [TaskManagerConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableTaskMgr' as it does not exist.
14:18:38.138 [01] - INFO: [TaskManagerConfiguration] Successfully deleted feature configuration.
14:18:38.139 [01] - DEBUG: [UserPowerOptionsConfiguration] No need to delete registry item 'HKEY_USERS\S-1-12-***\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoClose' as it does not exist.
14:18:38.139 [01] - INFO: [UserPowerOptionsConfiguration] Successfully deleted feature configuration.
14:18:38.140 [01] - DEBUG: [VmwareOverlayConfiguration] Successfully set registry item 'HKEY_USERS\S-1-12-***\Software\VMware, Inc.\VMware VDM\Client\EnableShade' => '1'.
14:18:38.142 [01] - DEBUG: [VmwareOverlayConfiguration] Successfully set registry item 'HKEY_USERS\S-1-12-***\Software\Policies\VMware, Inc.\VMware VDM\Client\EnableShade' => 'True'.
14:18:38.142 [01] - INFO: [VmwareOverlayConfiguration] Successfully enabled feature.
14:18:38.150 [01] - DEBUG: [WindowsUpdateConfiguration] Attempt 1/5 to set service 'wuauserv' => 'running'...
14:18:38.152 [01] - DEBUG: [WindowsUpdateConfiguration] Successfully set service 'wuauserv' => 'running'.
14:18:38.152 [01] - INFO: [WindowsUpdateConfiguration] Successfully enabled feature.
14:18:38.155 [01] - INFO: [SystemConfigurationUpdate] Starting system configuration update...
14:18:38.186 [01] - INFO: [SystemConfigurationUpdate] Waiting for update to complete...
14:18:48.872 [01] - INFO: [SystemConfigurationUpdate] Update has completed: Computer Policy update has completed successfully. User Policy update has completed successfully.
14:18:48.894 [01] - WARNING: Failed to reset 1 items!
dbuechel commented 10 months ago

@NekoJonez Is this happening on Windows 10 or Windows 11?

NekoJonez commented 10 months ago

Win 11 Education. (Which is as good as the Pro version)

dbuechel commented 10 months ago

According to the log, the reset utility simply isn't able to delete a particular registry key (it most likely does not exist, thus also cannot be deleted) but then appears to terminate the procedure as expected. Or what exactly is the problem you're encountering?

dbuechel commented 10 months ago

You could check that by entering the following path in the registry editor of Windows: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Embedded\EmbeddedLogon\BrandingNeutral

NekoJonez commented 10 months ago

I'm sorry for the late reply but:

image

I don't even have that key.

Does it matter that my device is joined via Endpoint?

NekoJonez commented 10 months ago

I was mostly testing the Reset Utility to write a small manual for my coworkers for that issue with power options.

dbuechel commented 10 months ago

I don't even have that key.

Exactly, that is what I suspected. The Reset Utility should nonetheless terminate its work, thus the question whether the utility crashes or what the exact behavior is in your case?

dbuechel commented 10 months ago

Does it matter that my device is joined via Endpoint?

I'm afraid I do not know that product, could you please specify to what you're referring exactly?

NekoJonez commented 10 months ago

It goes by many names. But its Microsoft Intune, Microsoft Endpoint. Some even call it Azure joined. Some even Entra joined.

Its basically your good old Active Directory but cloud based. Thats the gist of it. If you want, I can send you some info

NekoJonez commented 10 months ago

I don't even have that key.

Exactly, that is what I suspected. The Reset Utility should nonetheless terminate its work, thus the question whether the utility crashes or what the exact behavior is in your case?

I just wanted to test the tool, since in the other ticket about the power options... you mentioned that it could resolve itself via that. So, I don't know if it crashed or continued. Are there tasks after that?

dbuechel commented 9 months ago

But its Microsoft Intune, Microsoft Endpoint.

Ah I see, thanks for the clarification. I'd say that this shouldn't be a problem, but to be honest, I do not have any experience with using Microsoft Intune in conjunction with SEB.

dbuechel commented 9 months ago

So, I don't know if it crashed or continued. Are there tasks after that?

No, according to the log, the utility completed the given task and simply wasn't able to restore resp. delete a registry item (which, again, is obviously not an issue, since the key simply didn't exist in the first place).

When you're able to continue using the Reset Utility afterwards (i.e. navigating backwards to the menu and/or starting another action, e.g. checking the version information or simply exiting the utility), then everything is perfectly fine and I'd say we can close the issue. On the other hand, if the utility freezes or crashes (i.e. terminates unexpectedly), then I'd need to further investigate the issue.

NekoJonez commented 9 months ago

I don't know if it was succesful, since it was the final step... Maybe we should show a message when it's at the end of all the tests and such so we know for sure it's finished and hasn't crashed or exited the loop too early?

Edit: and with show I mean in the reset utility itself. Show the user. So, we don't need to "guess" with the logs.

dbuechel commented 9 months ago

I haven't used the reset utility myself in quite a while, but from what I can see in the code, the procedure status should be quite clear and there even is a message saying Press any key to return to the main menu. at the very end in all cases, so I would judge it as clear enough.

dbuechel commented 9 months ago

But please do feel free to post a screen shot or the exact wording of the current status information and what you'd like to change or improve upon. Otherwise, I'd say we can close the issue as resolved.

NekoJonez commented 9 months ago

Currently, I'm unable to recreate the issue. So, I can't check if it has fully run or not... So, I think this was something strange with my install. I'll close this issue and reopen it if needed.