-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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]: Exec in desktop entry for generix linux seems to be buggy #28446
Comments
This seems to affect the ArchLinux mattermost-desktop 5.6.0 package as well. If I looked in my Firefox console I see:
|
We are having the same issues with the current Mattermost Desktop App in v5.6.0 with the same console message "Prevented navigation to 'mattermost://...' due to an unknown protocol". It is failing in Firefox and working in Chromium on Debian. |
So it looks like the Arch Linux build for some reason is being built in development mode, despite the fact that they are setting NODE_ENV=production. The I tried to reproduce their build process but I wasn't able to reproduce the issue, looks like it builds in prod mode for me. Sounds like this is what's causing this issue for most people, if you're seeing |
@devinbinnie |
@Lotbert I'm running |
Ok. I think somehow the const protocol = isDev ? 'mattermost-dev' : mainProtocol; evaluates to true. But why? Digging a bit deeper i had a look into const isDev = isEnvSet ? getFromEnv : !electron.app.isPackaged; Since i didn't find a file containing I just wanted to leave this here... |
@devinbinnie isn't the ci pipeline executing Maybe i am getting it wrong... |
Yes the pipeline is, which basically executes the same thing: To the above point it's possible there's a bug in that package. Grabbing the .tar.gz file from the GitHub release, it's running in Production Mode as well. The only place I can see this reproduced is from the Arch package from |
The reason for this I think is the behavior of Likely when you build it yourself you end up running it against your normal electron package with matching binary name. I'm not sure what's the best way to go about fixing this, but the easiest seems to be to just set ELECTRON_FORCE_IS_PACKAGED env in the build script. |
IMHO using |
This works @lzszt and me just did that in a PR for the respective nixpkg and it fixed the bug. |
Any news here @devinbinnie . In the meantime the nixos cummunity fixed the This is 2. in my original post above. |
Been on vacation for the past few weeks, I will say this isn't likely to be worked on anytime soon, so I'm open to have someone else look at it and I can try and guide where I can. |
I'd be happy to fix this in a PR coming soon. Currently i am working around it with a custom desktop entry, that applies the fixes to the desktop entry from my original posting above. |
Going to transfer this to the main repo for Hacktoberfest - in hopes that it gets more attention :) |
Checks before filing an issue
Mattermost Desktop Version
5.6.0
Operating System
NixOS 23.05
Mattermost Server Version
No response
Steps to reproduce
Expected behavior
The Browser asks to be allowed to open
Mattermost
. We get redirected to the Mattermost Desktop App with a logged-in user.Observed behavior
The Browser asks us to allow it to open
xdg-open
(instead ofMattermost
). After we allow it, the default Browser is opened with the following url in the address bar:mattermost-dev://mattermost.example.de/login/desktop?client_token=dev-<client_token>&isDesktopDev=true&server_token=<server_token>
Log Output
Additional Information
Two things are still wrong in the current master while writing this. I'll explain what, using two patches that fixed my local installation.
0
to get rid of the-dev
(I also explain a workaround using another MimeType in the code explained below)Also beware of the last three lines in the code above.
The text was updated successfully, but these errors were encountered: