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

Bug: Opening file picker as admin will cause crash (WinAppSdk issue) #11440

Closed
Spyromaniac31 opened this issue Feb 23, 2023 · 11 comments · Fixed by #15386
Closed

Bug: Opening file picker as admin will cause crash (WinAppSdk issue) #11440

Spyromaniac31 opened this issue Feb 23, 2023 · 11 comments · Fixed by #15386
Assignees
Labels
bug Something isn't working 👀 crash Bug reports involving a crash needs-winui Requires changes from WinUI

Comments

@Spyromaniac31
Copy link

Description

When Files is run as administrator, the app crashes when clicking on the Browse button to change a folder icon. This happens regardless of whether the folder needs admin privileges to be edited, and doesn't happen when Files isn't run as administrator.

Steps To Reproduce

  1. Run Files as administrator, either from the Start Menu or the Taskbar.
  2. Right-click on any folder
  3. Select the Properties icon
  4. Select Customize
  5. Select Browse
  6. The app crashes

Steps to fix

  • Fix crash that occurs when clicking browse. The button should open the same File Explorer window as it does when Files isn't run as administrator.

Files Version

Version: 2.4.40.0 OS Version: 10.0.25300.1000

Windows Version

Edition Windows 11 Home Insider Preview Version 22H2 Installed on ‎2/‎15/‎2023 OS build 25300.1000 Experience Windows Feature Experience Pack 1000.25300.1000.0

Log file

debug.log

@Spyromaniac31 Spyromaniac31 added the bug Something isn't working 👀 label Feb 23, 2023
@yaira2
Copy link
Member

yaira2 commented Feb 23, 2023

This is actually an issue in WinAppSdk where trying to open the file picker as admin will cause a crash. They have some workarounds we can try.

@yaira2 yaira2 changed the title Files crashes when attempting to change the folder icon as an administrator Bug: Opening fil picker as admin will cause crash (WinAppSdk issue) Feb 23, 2023
@yaira2 yaira2 added the good first issue Good issue for new contributors to get started with label Feb 23, 2023
@yaira2 yaira2 changed the title Bug: Opening fil picker as admin will cause crash (WinAppSdk issue) Bug: Opening file picker as admin will cause crash (WinAppSdk issue) Feb 23, 2023
@meilluer
Copy link

This is actually an issue in WinAppSdk where trying to open the file picker as admin will cause a crash. They have some workarounds we can try.

can you explain those workarounds?

@yaira2
Copy link
Member

yaira2 commented Feb 24, 2023

@jatinsihag234
Copy link

i wanna work on this issue

@Josh65-2201
Copy link
Member

Also Files should prompt to elevate permissions when pasting a file on a directory needing admin rights (Like C:\Program Files) like Win Explorer, otherwise nothing happens and feels like a bug to the user.

This is a known issue tracked at #10422. Please don't add irrelevant comments or report other bugs in other issues.

@carlosvsilva
Copy link

I didn't know that core functionality is irrelevant, all right then.

@yaira2
Copy link
Member

yaira2 commented Feb 26, 2023

Also Files should prompt to elevate permissions when pasting a file on a directory needing admin rights (Like C:\Program Files) like Win Explorer, otherwise nothing happens and feels like a bug to the user.

@carlosvsilva Fully agree, this is a separate issue. It's a little challenging with WinAppSdk but we should at least display a prompt so that the user knows why it's not working.

@jatinsihag234
Copy link

@yaira2 Thank you, Sir. I'm working on that . If you could give me some advice on where to begin, I'd appreciate that.

@yaira2 yaira2 added crash Bug reports involving a crash and removed good first issue Good issue for new contributors to get started with labels Nov 1, 2023
@0x5bfa 0x5bfa added the needs-winui Requires changes from WinUI label May 12, 2024
@0x5bfa
Copy link
Member

0x5bfa commented May 12, 2024

A potential fix is in the PR.

@yaira2
Copy link
Member

yaira2 commented May 17, 2024

This issue will be resolved in the next release.

@yaira2 yaira2 closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 👀 crash Bug reports involving a crash needs-winui Requires changes from WinUI
Projects
Status: Done
7 participants