SafeExamBrowser / seb-win-refactoring

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

Fatal Error: "Sequence contains no elements" (SEB Fails to Start in Offline Mode) #966

Open SalamShahid opened 1 month ago

SalamShahid commented 1 month ago

Describe the Bug Tried to run SEB in offline mode, but it ends with an error message (see attached screenshot). No log files are generated. Everything works perfectly when running SEB in online mode on the same machine without changing any configurations.

Steps to Reproduce Steps to reproduce the behavior:

  1. Install SEB on an offline machine using the msi setup file.
  2. Setup the configuration file with Start URL and other necessary settings using SEB configuration tool.
  3. Try to open SEB in offline mode.
  4. It will show the attached error message.
  5. No log files are generated.
  6. Connect the machine to the internet.
  7. Try to open SEB and it works perfectly.
  8. The cycle repeats if you start from step 3.

Expected Behavior SEB should work in offline mode without any issues.

Screenshots SEB-Error

Version Information

dbuechel commented 1 month ago

Thanks for the report. Yes, this is as a matter of fact a current restriction, as until now there were no known use cases for the usage of SEB without a network connection. As the MAC address is also being used for other functionality, we'll first need to investigate potential side effects of allowing to use SEB without a network connection resp. a not defined MAC address.

dbuechel commented 1 month ago

Most systems should have a network card with a valid MAC address, regardless of whether they're connected to a network or not. But as commented in #962, the WMI query used most likely does not work (at all or always) for systems which (momentarily) do not have a network connection:

https://github.com/SafeExamBrowser/seb-win-refactoring/blob/7029b12d8148d27e2c1b4139d3b108fb453f2706/SafeExamBrowser.SystemComponents/SystemInfo.cs#L242

So we'll definitely try to improve this for the next release version, but it may not be as easy as would be expected due to a system being able to have various network adapters, of which we'd have to (reliably!) find the actual, physical one even when there (temporarily) is no network connection...

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 28 days with no activity. It will soon be closed automatically if there are no updates.

mccollege-au commented 1 week ago

We are seeing the same behaviour happen, we use SEB for offline exams with a fleet of laptops. It's a stripped-down Word install, no web access at all.

This is on Windows 10 machines. Plugging a USB network adapter before starting SEB is a workaround but is not practical if SEB has exited and the laptop is out in the field.

dbuechel commented 6 days ago

Thanks for the input, we'll try to have a look and, if possible, resolve the issue for an upcoming version.