-
-
Notifications
You must be signed in to change notification settings - Fork 345
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
Workaround to launch URLs #2958
Conversation
Apparently, opening directories doesn't work any more, too (at least on my system):
We also use Looks like Mono did a big oopsie with |
Huh, there's mono/mono#17204 which is open and somewhat recent, but it has no discussion or investigation (and it's mislabeled a "proposal" instead of a bug)... 🤦♂️ |
384c2dd
to
351a7ae
Compare
Applied the new workaround to more places in latest changes. Yes, it seems that |
Without enclosing brackets it works. |
351a7ae
to
46aebd8
Compare
I wonder if we need the workaround on Windows at all. Maybe the function should just call a normal |
46aebd8
to
d1fea51
Compare
Current master still works fine on Windows. And if I interpret the issue correctly, it only affects .NET Core on Windows. So the GUI is not a problem, only if we somehow move the console UI to .NET Core in the future we might hit it again. |
OK, we'll use the old way for Windows. Until they decide to break that, too, I guess. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Whatever Mono does or does not now, we should be safe.
Problem
The homepage and repository links in GUI used to work fine, but recently they stopped working for me. Some investigation revealed that this exception was being thrown:
Cause
Somehow
Process.Start
went from launching a URL in the default browser to failing because there isn't a local file named after the URL. The closest thing to an explanation that I was able to find was dotnet/corefx#10361, but I have not been able to confirm it 100%. I tried uninstalling anything that sounded like it was related to corefx, since at some point I had it working fine on Mono, but the problem persists.Maybe Mono now includes the broken components from corefx? Maybe Mono was updated to be broken in the same way? Maybe corefx is still installed under a package name that I don't recognize? Maybe it's some other totally unrelated problem? Frankly I have no idea, but I'm hoping that someone will explain it in a comment on that issue.
Changes
Now all of our URL launches are done via
Utilities.ProcessStartURL
, a new function that implements the suggested workaround of launchingcmd
,open
, orxdg-open
depending on the platform. This makes it work for me.While investigating this, I noticed that
Util.CheckURLValid
rejects HTTPS URLs, which doesn't make sense given thatUtil.TryOpenWebPage
explicitly generates them. Now it's fixed, andUtil.TryOpenWebPage
tries HTTPS before HTTP since the general trend on the web is to go all-HTTPS.