Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

DllNotFoundExceptions and SecurityException when using with Mono #278

Description

@knocte

When testing my app in Ubuntu 18.04, I've seen these stacktraces when SharpRaven apparently tried to send reports to Sentry:

[ERROR] System.DllNotFoundException: api-ms-win-core-sysinfo-l1-1-0.dll
  at (wrapper managed-to-native) Interop+mincore:GetSystemInfo (Interop/mincore/SYSTEM_INFO&)
  at System.Runtime.InteropServices.RuntimeInformation.get_ProcessArchitecture () [0x0001c] in <dd91439f3167478ebd2cbf9c036a1395>:0 
  at SharpRaven.Data.Context.Device.GetArchitecture () [0x00000] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 
  at SharpRaven.Data.Context.Device.Create () [0x0001b] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 
[ERROR] System.DllNotFoundException: ntdll.dll
  at (wrapper managed-to-native) Interop+NtDll:RtlGetVersion (Interop/NtDll/RTL_OSVERSIONINFOEX&)
  at Interop+NtDll.RtlGetVersion () [0x0001a] in <dd91439f3167478ebd2cbf9c036a1395>:0 
  at System.Runtime.InteropServices.RuntimeInformation.get_OSDescription () [0x00007] in <dd91439f3167478ebd2cbf9c036a1395>:0 
  at SharpRaven.Data.Context.OperatingSystem.Create () [0x00000] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 
[ERROR] System.Security.SecurityException: No access to the given key ---> System.UnauthorizedAccessException: Access to the path "/etc/mono/registry" is denied.
  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x00070] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.DirectoryInfo.Create () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo:Create ()
  at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0003f] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.IO.Directory.CreateDirectory (System.String path) [0x000a4] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, System.Boolean is_volatile) [0x0004a] in <8f2c484307284b51944a1a13a14c0266>:0 
   --- End of inner exception stack trace ---
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir, System.Boolean is_volatile) [0x00062] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.KeyHandler..ctor (Microsoft.Win32.RegistryKey rkey, System.String basedir) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.KeyHandler.Lookup (Microsoft.Win32.RegistryKey rkey, System.Boolean createNonExisting) [0x000ce] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.UnixRegistryApi.OpenSubKey (Microsoft.Win32.RegistryKey rkey, System.String keyname, System.Boolean writable) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name, System.Boolean writable) [0x0001e] in <8f2c484307284b51944a1a13a14c0266>:0 
  at Microsoft.Win32.RegistryKey.OpenSubKey (System.String name) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at (wrapper remoting-invoke-with-check) Microsoft.Win32.RegistryKey:OpenSubKey (string)
  at SharpRaven.Utilities.RuntimeInfoHelper.Get45PlusLatestInstallationFromRegistry () [0x0000f] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 
  at SharpRaven.Utilities.RuntimeInfoHelper.GetRuntime () [0x00019] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 
  at SharpRaven.Data.Context.Runtime.Create () [0x00000] in <9d0d9023551f4804a7104ebbc1f9bfae>:0 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions