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

Web Search crash with Firefox #19260

Closed
1 task done
xiwang66 opened this issue Jul 8, 2022 · 12 comments
Closed
1 task done

Web Search crash with Firefox #19260

xiwang66 opened this issue Jul 8, 2022 · 12 comments
Assignees
Labels
Issue-Bug Something isn't working Priority-2 Bug that is medium priority Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@xiwang66
Copy link

xiwang66 commented Jul 8, 2022

Microsoft PowerToys version

0.60.0

Running as admin

  • Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

  • Set the default browser as Firefox
  • run powertoys run, type in some keyword
  • hit web search

✔️ Expected Behavior

Firefox open and search the keyword

❌ Actual Behavior

An error message shows up that "Failed to open Firefox"

This function works well with Chrome or Edge

Other Software

No response

@xiwang66 xiwang66 added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 8, 2022
@Aaron-Junker
Copy link
Collaborator

/bugreport

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jul 8, 2022
@ghost
Copy link

ghost commented Jul 8, 2022

Hi there!

We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks!
Report Bug

@xiwang66
Copy link
Author

xiwang66 commented Jul 9, 2022

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 9, 2022
@xiwang66
Copy link
Author

xiwang66 commented Jul 9, 2022

another minor related issue. If I change the default browser in the windows setting, say from Chrome to Firefox. The web search plugin doesn't recognize this change right away. It will still use Chrome as default. I need to close and reopen PowerToys to make the change take effect.

@jaimecbernardo
Copy link
Collaborator

This is ... interesting?


[2022-07-09 08:49:01.8710] [ERROR] [C:\a\_work\1\s\src\modules\launcher\Wox.Infrastructure\Helper.cs::189]
-------------------------- Begin exception --------------------------
Message: Unable to open C:\Program: An error occurred trying to start process 'C:\Program' with working directory 'C:\Program Files\PowerToys'. The system cannot find the file specified.

Exception full name  : System.ComponentModel.Win32Exception
Exception message    : An error occurred trying to start process 'C:\Program' with working directory 'C:\Program Files\PowerToys'. The system cannot find the file specified.
Exception stack trace:
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at Wox.Infrastructure.Helper.OpenInShell(String path, String arguments, String workingDir, ShellRunAsType runAs, Boolean runWithHiddenWindow)
Exception source     : System.Diagnostics.Process
Exception target site: Boolean StartWithShellExecuteEx(System.Diagnostics.ProcessStartInfo)
Exception HResult    : -2147467259
-------------------------- End exception --------------------------


[2022-07-09 08:49:01.8710] [ERROR] [C:\a\_work\1\s\src\modules\launcher\Plugins\Community.PowerToys.Run.Plugin.WebSearch\Main.cs::177]
Failed to open Firefox.

@jaimecbernardo
Copy link
Collaborator

Hi @xiwang66

Could you please check your registry for what's in "ProgId" in "Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice"?

In my case it's ChromeHTML, for example.
image

Then, can you please check "Computer\HKEY_CLASSES_ROOT{progId}\shell\open\command" and send what's there ,as well?
image

Something seems to not be playing well with our code to recognize the default browser and how to call it.

Please send us these values for when you have Firefox, Chrome, and Edge.

/needinfo

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels Jul 14, 2022
@xiwang66
Copy link
Author

xiwang66 commented Jul 14, 2022

chrome
chrome_command
edge
firefox
FireFox_EXE
Snipaste_2022-07-14_14-18-34

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 14, 2022
@xiwang66
Copy link
Author

xiwang66 commented Jul 14, 2022

@jaimecbernardo pic attached. Something is wrong with the ProgId it seems...

Firefox has one version in the Windows store, the other exe installer. The pic for Windows store version "Computer\HKEY_CLASSES_ROOT{progId}\shell\open\command" is attached. With this setting, powertoys crash .....

Then I uninstall it and install the exe version for testing. This time everything works fine. So it is only the Windows store Firefox has this issue.

@jaimecbernardo
Copy link
Collaborator

I don't think it's ProgId. I think it's the command (Default). Notice how Chrome has " and Firefox doesn't?
Can you please send that value for the others as well? Like, full values, it's getting cut on your screenshot.

@jaimecbernardo
Copy link
Collaborator

/needinfo

@ghost ghost added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels Jul 14, 2022
@xiwang66
Copy link
Author

@jaimecbernardo
Hello. It is attached.

C:\Program Files\WindowsApps\Mozilla.Firefox_102.0.1.0_x64__n80bbvh6b1yt2\VFS\ProgramFiles\Firefox Package Root\firefox.exe -osint -url "%1"

Snipaste_2022-07-14_15-03-25

"C:\Program Files\Google\Chrome\Application\chrome.exe" --single-argument %1

Snipaste_2022-07-14_15-04-59

@ghost ghost added Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jul 14, 2022
@jaimecbernardo jaimecbernardo added Priority-2 Bug that is medium priority and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Needs-Team-Response An issue author responded so the team needs to follow up labels Jul 26, 2022
@sosssego sosssego self-assigned this Sep 6, 2022
@sosssego
Copy link
Contributor

sosssego commented Sep 6, 2022

The lack of quotes in the command around the firefox executable path makes the problem show up.

@jaimecbernardo jaimecbernardo added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label Sep 21, 2022
@crutkas crutkas closed this as completed Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Priority-2 Bug that is medium priority 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

6 participants
@crutkas @sosssego @xiwang66 @jaimecbernardo @Aaron-Junker and others