You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, on freshly installed Manjaro XFCE VM I get the following exception
Unhandled exception. System.TypeInitializationException: The type initializer for 'TEST.Program' threw an exception.
---> System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable'1 source, Func'2 predicate)
at libc.hwid.HwId.Dmidecode(String query, String find)
at libc.hwid.HwId.GetInfo(Hardware hw)
at libc.hwid.HwId.Generate()
How is the code used
I have the class User with the field public static string UUID
In that class there is a constructor that has the following code
public User() { UUID = libc.hwid.HwId.Generate(); }
The exception is thrown when I create a new user object with
static User user = new User();
This works fine on windows
The text was updated successfully, but these errors were encountered:
Thanks for the info. Actually I've not tested my code in any Arch Linux for example Manjaro.
It would be nice if you could contribute and find a solution for this feature on Manjaro, otherwise feel free and tell me so that I start installing a Manjaro on my VirtualBox and test this code there.
Actually another thing that worries me is the Virtual Machine. I will definitely run the code on a virtual machine to see if by any chance there are some missing info.
sfmohassel
changed the title
Getting exception thrown on linux build
Getting exception thrown on Arch Linux build
Sep 8, 2021
sfmohassel
changed the title
Getting exception thrown on Arch Linux build
Getting exception thrown on Arch Linux e.g: Manjaro
Sep 8, 2021
sfmohassel
changed the title
Getting exception thrown on Arch Linux e.g: Manjaro
Getting exception thrown on Arch Linux e.g: Manjaro XFCE VM
Sep 8, 2021
I will try to install rider on the VM and find a fix, however I'm new at coding so if I'm not able to find a solution I'll add another comment.
Also it might take few hours since I only have 1mbps internet and I'm also downloading a VHD image to test the library on MacOS too
Found the issue, when Dmidecode("dmidecode -t 4", "ID"); is called, it can't find the ID string in the process output.
Running the command in a my VirtualBox VM Outputs this
# dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 2.5 present.
Probably the issue happens only in VMs, I cannot test it since I do not have a linux machine
I'm not sure how you would like to fix this or if you want to, since it's a VM there should be multiple approaches
sfmohassel
changed the title
Getting exception thrown on Arch Linux e.g: Manjaro XFCE VM
Getting exception thrown on Arch Linux e.g: Manjaro XFCE (Virtual Machine)
Sep 26, 2021
Hi, on freshly installed Manjaro XFCE VM I get the following exception
Unhandled exception. System.TypeInitializationException: The type initializer for 'TEST.Program' threw an exception.
---> System.InvalidOperationException: Sequence contains no matching element
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable'1 source, Func'2 predicate)
at libc.hwid.HwId.Dmidecode(String query, String find)
at libc.hwid.HwId.GetInfo(Hardware hw)
at libc.hwid.HwId.Generate()
How is the code used
I have the class User with the field public static string UUID
In that class there is a constructor that has the following code
public User() { UUID = libc.hwid.HwId.Generate(); }
The exception is thrown when I create a new user object with
static User user = new User();
This works fine on windows
The text was updated successfully, but these errors were encountered: