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

Launcher does not open files #3209

Closed
AlessandroGiannetti opened this issue May 19, 2020 · 38 comments
Closed

Launcher does not open files #3209

AlessandroGiannetti opened this issue May 19, 2020 · 38 comments
Assignees
Labels
Hot Fix Items we will product an out-of-band release for Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@AlessandroGiannetti
Copy link

AlessandroGiannetti commented May 19, 2020

Environment

Windows build number: Microsoft Windows [Versione 10.0.19041.264]
PowerToys version: 0.18.0
PowerToy module for which you are reporting the bug (if applicable): launcher

Steps to reproduce

search a file, press enter

Expected behavior

I'm expecting that the file will be opened

Actual behavior

nothing

Screenshots

82429389-16646a80-9a8c-11ea-8502-4e6d072208c0
82429392-17959780-9a8c-11ea-942a-22c4fe1f3c8a

@Cito
Copy link

Cito commented May 19, 2020

Same for me.

@jyuwono
Copy link
Contributor

jyuwono commented May 19, 2020

@AlessandroGiannetti where is the file located (OneDrive? local?)? Is it on a different user (see the discussion on #3207)?

@jyuwono jyuwono added the Product-PowerToys Run Improved app launch PT Run (Win+R) Window label May 19, 2020
@AlessandroGiannetti
Copy link
Author

AlessandroGiannetti commented May 19, 2020

In both local or ondrive files, Even the folders. I can just open programs. I have only one user in my system.

@crutkas
Copy link
Member

crutkas commented May 19, 2020

we need more info that this. file path, type of file, ....

@crutkas
Copy link
Member

crutkas commented May 19, 2020

screenshots

@crutkas crutkas added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 19, 2020
@AlessandroGiannetti
Copy link
Author

AlessandroGiannetti commented May 19, 2020

I try to open a folder on the desktop with path: C:/users/Alegi/desktop/presentazione
Also, all files inside that are png.
While inside the on-drive folder I tried to open an excel file xlsx.
Power toys are running in Administrator mode.

if instead, I click the button to open the folder that contains the file, the screenshot "this pc" will open. I enclose the screenshot
Screenshot (4)

@AlessandroGiannetti
Copy link
Author

Screenshot (1)
Screenshot (3)

@Cito
Copy link

Cito commented May 20, 2020

After testing a bit more I think I know what the problem is. It happens when the file is in a "localized folder". For instance, the "Documents" folder is called "Dokumente" in German localized Windows. Unfortunately, the most important folders like "Users" or "Documents" are localized. When you find a file inside such a folder, it cannot be opened - when you click on the file, nothing happens. When you click on "open containing folder", the "this computer" view is shown instead. When you click on "copy path", the translated path is copied. I think the problem is that the translated path does not exist as a real path - the localized folder is a symbolic link and the actual folder is hidden away as a system file. When I tried it on a localized folder that has the same name as the original, it worked. In German Windows you can see the difference when you find something in the "Videos" vs the "Music" folder, since "Music" is translated "to "Musik" in German, but Videos uses the same name.

@Cito
Copy link

Cito commented May 20, 2020

In the snapshot provided by @AlessandroGiannetti you see that the file is in the "Utenti" folder which is the Italian localized name of the "Users" folder.

@crutkas
Copy link
Member

crutkas commented May 20, 2020

@Cito, i think you may be on to something here. #3299 seems to be the same. Now to see why the heck this is happening. time to boot up some VMs

@jyuwono jyuwono added Hot Fix Items we will product an out-of-band release for and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 20, 2020
@tiagolpadua
Copy link

same for me, open folder location dont work too.

@crutkas
Copy link
Member

crutkas commented May 20, 2020

@tiagolpadua can you send a screenshot or just the path to a folder / file that won't work? we have a hunch, namely what @Cito called out regarding localized paths (which shouldn't be causing this but somehow it is)

@ChanglaiSun
Copy link

Same for me

@crutkas
Copy link
Member

crutkas commented May 21, 2020

@a774500050 can you share a screenshot or a file path of something that doesn’t work. Trying to confirm our theory.

@DonGuych
Copy link

DonGuych commented May 21, 2020

Yeah, the bug is on localized Windows only, when i search for files in "C:\User*" it translates to "C:\Utilisateurs*" (Utilisateurs is User in French)

And filepath is still "C:\User\x" so when we select file through power launcher, it doesn't find the file, so he would not open it

And, as ppl noticed before, powerlauncher translates also Video/Picture/Desktop folders in filepath shown in powerlauncher

image

@crutkas
Copy link
Member

crutkas commented May 21, 2020

can someone use the "copy file path" and see if that actually resolves. the fact neither the icon nor path resolves is leading me down some interesting paths.

We know it is limited to the search plugin based on screenshots

@Cito
Copy link

Cito commented May 21, 2020

@crutkas The file path resolves, but it is uses the localized folder name. When I copy the file path of a PDF that the Launcher does not open and then paste it into the address bar of the Windows explorer, then the PDF file opens. The Windows explorer has no problem using the translated names, and the file is also opened when I use the integrated search bar of Windows.

@Cito
Copy link

Cito commented May 21, 2020

@crutkas I can also confirm your observation regarding the icons. When I find a file in a localized folder, a generic icon is shown in the Launcher. In an unlocalized folder, I see the proper icon.

@ricardosantos9521
Copy link
Contributor

ricardosantos9521 commented May 21, 2020

I may have a possible solution for this problem but i don't know if is the best solution.
When Microsoft.Plugin.Indexer is querying it is selecting the System.ItemPathDisplay that returns the localized path of the file/folder. For some reason Proccess.Start does not like localized paths i supposed that is the same reason why powershell does not let me launch localized paths.

After changing System.ItemPathDisplay to System.ItemUrl and remove the scheme from the url it appears to be working for launching file/path and for the icon.

Previous:
image

After:
image

@crutkas
Copy link
Member

crutkas commented May 21, 2020

@ricardosantos9521 heck yeah!!!

@crutkas
Copy link
Member

crutkas commented May 21, 2020

@ricardosantos9521 so what is your actual c:\User\ location. It is actually user or is it localized on the disk

@ricardosantos9521
Copy link
Contributor

ricardosantos9521 commented May 21, 2020

@crutkas C:\Users\ricar is my user folder. System.ItemPathDisplay makes it C:\Utilizadores\ricar because "Utilizadores" is Users in portuguese. If i paste C:\Utilizadores\ricar in the file explorer it translates the path to the real path C:\Users\ricar.

@crutkas crutkas added this to the v1.0 Release milestone May 21, 2020
@crutkas crutkas added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label May 21, 2020
@crutkas
Copy link
Member

crutkas commented May 21, 2020

@ricardosantos9521 great find / fix!

@crutkas crutkas reopened this May 21, 2020
@crutkas
Copy link
Member

crutkas commented May 21, 2020

ahem, lets not close this out until 0.18.1 is out :)

@FrancescoCardone
Copy link

I may have a possible solution for this problem but i don't know if is the best solution.
When Microsoft.Plugin.Indexer is querying it is selecting the System.ItemPathDisplay that returns the localized path of the file/folder. For some reason Proccess.Start does not like localized paths i supposed that is the same reason why powershell does not let me launch localized paths.

After changing System.ItemPathDisplay to System.ItemUrl and remove the scheme from the url it appears to be working for launching file/path and for the icon.

Previous:
image

After:
image

How we can change it?

@ricardosantos9521
Copy link
Contributor

@FrancescoCardone my solution is already on master.

@FrancescoCardone
Copy link

So its fixed now?

@ChanglaiSun
Copy link

So its fixed now?

Yes, but You need to wait for release v0.18.1 or manually build master version.

@crutkas
Copy link
Member

crutkas commented May 22, 2020

We are doing one final build of 0.18.1 and it will be out later today. This will be one of the fixes in it.

@crutkas
Copy link
Member

crutkas commented May 22, 2020

We just released 0.18.1 which will have this fix included in it.

@crutkas crutkas closed this as completed May 22, 2020
@Cito
Copy link

Cito commented May 22, 2020

Works for me now - thank you!

@crutkas
Copy link
Member

crutkas commented May 22, 2020

🤘🤘

@tiagolpadua
Copy link

tiagolpadua commented May 22, 2020

@tiagolpadua can you send a screenshot or just the path to a folder / file that won't work? we have a hunch, namely what @Cito called out regarding localized paths (which shouldn't be causing this but somehow it is)

Sure!

ptbug

On click, power toys close and nothing happen

@ricardosantos9521
Copy link
Contributor

@tiagolpadua please update powertoys to v0.18.1. It should be working now.

@crutkas
Copy link
Member

crutkas commented May 22, 2020

@tiagolpadua based on the screenshot, the fix should have corrected it inside 0.18.1

@miguelnarayan
Copy link

not fixed, still have this problem as of today

@crutkas
Copy link
Member

crutkas commented Mar 26, 2021

@miguelnarayan Please open a new issue with logs. The root cause of this old targeted issue was solved long ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests