Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting exception thrown on Arch Linux e.g: Manjaro XFCE (Virtual Machine) #4

Closed
PaulDotSH opened this issue Sep 8, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@PaulDotSH
Copy link

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

@sfmohassel sfmohassel self-assigned this Sep 8, 2021
@sfmohassel sfmohassel added the enhancement New feature or request label Sep 8, 2021
@sfmohassel
Copy link
Owner

sfmohassel commented Sep 8, 2021

Hi,

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 sfmohassel pinned this issue Sep 8, 2021
@sfmohassel sfmohassel changed the title Getting exception thrown on linux build Getting exception thrown on Arch Linux build Sep 8, 2021
@sfmohassel sfmohassel changed the title Getting exception thrown on Arch Linux build Getting exception thrown on Arch Linux e.g: Manjaro Sep 8, 2021
@sfmohassel 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
@PaulDotSH
Copy link
Author

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

@PaulDotSH
Copy link
Author

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 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
@sfmohassel sfmohassel closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants