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

release_vnext: UnauthorizedAccessException: Access is denied On Startup On Windows 11 #239

Open
jimddavis opened this issue Jun 11, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@jimddavis
Copy link

Description

Code version Rise-Media-Player-release_vnext.

Trying to get the release_vnext running on Windows 11. It builds, but when I start with debugging it throws an error on startup at the following line:

LIne 45 of Rise.App App.xaml.cs, public static SettingsViewModel SViewModel { get; } = new(); throws an UnauthorizedAccessException: Access is denied error when trying to create the appsettings.

My environment is:
Windows 11 10.0.22621
Visual Studio 2022 Version 17.6.2
.Net Framework Version 4.8.09032

Here is the error.
`System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Rise.App.App' threw an exception.
Source=Rise Media Player
StackTrace:
at Rise.App.App.get_SViewModel() in C:\Learn_WinUI\Rise-Media-Player-release_vnext\Rise Media Player Dev\App.xaml.cs:line 45

This exception was originally thrown at this call stack:
Rise.Common.Extensions.AsyncExtensions.Get(Windows.Foundation.IAsyncOperation) in AsyncExtensions.cs
Rise.App.App.OnStorageLibraryRequested(Windows.Storage.KnownLibraryId) in App.xaml.cs
Rise.App.App.App() in App.xaml.cs

Inner Exception 1:
UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))`

Steps To Reproduce

No response

Expected behavior

Startup without an exception

Rise Media Player Version

Rise-Media-Player-release_vnext

Windows Version

Windows 11 10.0.22621

Relevant Assets/Logs

RiseError

@jimddavis jimddavis added the bug Something isn't working label Jun 11, 2023
@itsWindows11
Copy link
Collaborator

Have you granted the app access to the music/video library? It seems like it's pointing to the wrong line here, but the exception seems to point to it trying to access the media library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants