Comments (19)
Same issue with .deb version
from desktop.
The app protocols need to be added to script/electron-builder-linux.yml
. In electron-packager
the protocols are only used for mapping to CFBundleURLSchemes
. Meanwhile the protocols in the electron-builder
config are used to add the MimeType
entry to the app's desktop file.
from desktop.
This is an old Electron issue electron/electron#6440 and it looks like it will be available in 1.8.2 electron/electron#10670 (we're on 1.7.9
, but 1.8.x
is a major Chromium update for us which we usually do with caution to ensure a smooth transition for users).
from desktop.
We're currently testing updating Electron to 1.8.2 in Desktop in this PR, so once that is merged I'll prepare a new build and confirm this is resolved.
from desktop.
Just tested this in Mint using bump-electron
and while it will open up my browser (this is an improvement), it won't attempt to start the auth process. If my browser is open, it starts the auth process but never completes.
from desktop.
@iAmWillShepherd to troubleshoot further, do you see this code being invoked at all when the app is running - probably needs logging as this is in the main process. Maybe a different set of args is being passed to the app and it's not handling them correctly?
from desktop.
function handleAppURL(url: string) {
log.info(`handeledAppUrl::url - ${url}`)
log.info('Processing protocol url')
const action = parseAppURL(url)
onDidLoad(window => {
// This manual focus call _shouldn't_ be necessary, but is for Chrome on
// macOS. See https://github.com/desktop/desktop/issues/973.
window.focus()
window.sendURLAction(action)
})
}
☝️ never get's called for me. I also pulled in the latest changes from master and tried again. No luck.
from desktop.
We've just released 1.1.1
which is based on Electron 1.8.3, so I'd like to figure out what additional work we need to do in the application to support the protocol handler that Electron should be registering correctly on Linux now...
from desktop.
This sounds similar to what I just experienced after using the GitHubDesktop-linux-amd64-1.1.1.deb
installer.
Summary
When authenticating with oauth & GitHub, Firefox isn't sure what to do with the x-github-client
protocol. GitHub Desktop seems to wait (the login spinner spins) for a response (which never gets sent out)
Steps to Reproduce
- Launch the app for the first time
- Press buttons until you can choose to sign in in a browser, and do so
- Go through the OAuth prompts
- Confirm password
- See the following message from firefox with
x-github-client://oauth?code=my_oauth_code
as the url
The address wasn’t understood
Firefox doesn’t know how to open this address, because one of the following protocols (x-github-client) isn’t associated with any program or is not allowed in this context.
You might need to install other software to open this address.
Expected Behavior: Github Desktop tells me that I've successfully logged in
Actual Behavior: Github Desktop stays in a state with a spinning Sign In
button.
Browser: Firefox 59.0.2 (64-bit)
OS: Ubuntu Desktop 17.10
GitHub Desktop: 1.1.1
It may be a an issue with the OS/Browser figuring out what to do with x-github-client
as the protocol.
Workaround
Just sign in using the email & password boxes in GitHub Desktop
from desktop.
How is Firefox supposed to know what to do with x-github-client://
? Possibly the launcher script in the AppImage would have to copy a little helper file somewhere to "teach" Firefox what to do with this URL?
from desktop.
Some extra context on this:
Electron is invoking xdg-settings
to associate the running app with a given protocol. The source for that is here.
I'm also pretty sure that Firefox uses XDG to resolve these protocol handlers: https://superuser.com/questions/162092/how-can-i-register-a-custom-protocol-with-xdg
However I can't seem to validate this worked for Desktop v1.1.1
on my Ubuntu VM - this command doesn't emit any output:
$ xdg-settings get default-url-scheme-handler x-github-client
I also get the exact same error from Firefox when trying to complete the auth flow.
from desktop.
Meanwhile the protocols in the
electron-builder
config are used to add theMimeType
entry to the app's desktop file.
Got an example of this that I can adapt? The AppImage options listed in the docs don't seem to mention it, and it sounds like an easy change to introduce and validate especially if it's just related to desktop
entries.
from desktop.
It's a top level key - the same values from here.
from desktop.
I've had some time to poke into this, and before I go and try to upstream this or put together a new build could someone sanity check that this change?
diff --git a/script/electron-builder-linux.yml b/script/electron-builder-linux.yml
index 604bea24e..a58e8e8f0 100644
--- a/script/electron-builder-linux.yml
+++ b/script/electron-builder-linux.yml
@@ -9,3 +9,7 @@ linux:
- rpm
- AppImage
maintainer: 'GitHub, Inc <[email protected]>'
+deb:
+ mimeTypes:
+ - x-github-client
+ - x-github-desktop-auth
Generating this desktop.desktop
file for the .deb
file:
[Desktop Entry]
Name=GitHubDesktop
Comment=Simple collaboration from your desktop
Exec="/opt/GitHubDesktop/desktop" %U
Terminal=false
Type=Application
Icon=desktop
StartupWMClass=GitHubDesktop
MimeType=x-github-client;x-github-desktop-auth;
Categories=GNOME;GTK;Development;
is what we're expecting to address the issue. @ascendancyy does this seem right?
from desktop.
@shiftkey looks good to me
from desktop.
Same issue with the .deb
installer on Debian on the Chromebook.
from desktop.
#110 will fix this for the Debian package, but I don't see this working for AppImage.
The installer seems to have the right .desktop
contents:
$ cat squashfs-root/github-desktop.desktop
[Desktop Entry]
Name=GitHub Desktop
Comment=Simple collaboration from your desktop
Exec=AppRun
Terminal=false
Type=Application
Icon=github-desktop
StartupWMClass=GitHub Desktop
X-AppImage-Version=1.5.1-linux1
MimeType=x-scheme-handler/x-github-client;x-scheme-handler/x-github-desktop-auth;
Categories=GNOME;GTK;Development;
X-AppImage-BuildId=1EfgDfqSKF6gMsmMocvRfpaCmF3
It's just that Firefox doesn't seem to care about it when you complete the browser login flow. For those who want this support I think you'll have to do something like this to connect the AppImage up to your browser: https://askubuntu.com/questions/819782/how-do-i-associate-a-file-type-with-an-appimage
from desktop.
You will probably need to run the optional appimaged daemon if you want desktop integration, such as associating MimeType=x-scheme-handler/x-github-client;x-scheme-handler/x-github-desktop-auth;
to your AppImage.
from desktop.
@probonopd today I learned! Thanks for that clue - if it comes up again down the track I'll see about getting some better guidance for it.
from desktop.
Related Issues (20)
- Failed to clone: error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8) HOT 5
- apt update Ign, Err within last hour HOT 1
- Suddenly Cannot Push Origin HOT 11
- Add certificate issue, upon installing ZScalar HOT 2
- Pycharm professional integration missing
- Error Object does not exist at path “/org/freedesktop/secrets/collection/login”
- GitHub Desktop does not respect KDE Plasma "Keyboard accelerators visibility" setting
- Ubuntu 24.04 Unsupported SSL backend 'gnutls' HOT 2
- Get an error when installing on CENTOS7 with error message: "Invalid version flag: or" (Re-post of Desktop issue 18551) HOT 6
- invalid SSL cert for `*.packages.shiftkey.dev` HOT 21
- can't clone my repos HOT 7
- Push - The remote disconnected HOT 9
- use GUI on multiple VNC sessions on linux server simultaneously HOT 3
- Can pull, can't push, although terminal push works HOT 10
- Error: The name is not activatable
- Certificate not trusted (APT) HOT 6
- Installation Command not working in Readme.md HOT 2
- Overflow in dialogue box
- Cannot Clone Private Repository Even Though I Have Adequate Access HOT 2
- Unable to push anything from local to repository HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from desktop.