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

[Bug]: Deeplinks do not work on linux or mac #2929

Open
6 tasks done
DanielHeath opened this issue Dec 13, 2023 · 16 comments
Open
6 tasks done

[Bug]: Deeplinks do not work on linux or mac #2929

DanielHeath opened this issue Dec 13, 2023 · 16 comments

Comments

@DanielHeath
Copy link

Checks before filing an issue

Mattermost Desktop Version

5.5.1

Operating System

Ubuntu Linux 22.04 LTS x64

Mattermost Server Version

9.1.2

Steps to reproduce

Open a chat between two users, eg

https://radiopaedia.org/chat/dev/messages/@frank

When prompted, ask to "open in the app" (this links to mattermost://radiopaedia.org/chat/dev/messages/@frank )

Expected behavior

App gains focus and navigates to that chat

Observed behavior

App gains focus and refreshes the display, but keeps focus on the channel you were already in.

Log Output

Help -> Show logs does not open a dialog in the current snap store release.

Additional Information

This issue is also reported by our users on OSX. I also can't get this to work by killing the desktop app and then launching it via mattermost:// url (it launches, but not to the right room).

I've tried setting breakpoints in triageArgs, but they aren't hit if you load the app while it's already running

@devinbinnie
Copy link
Member

@DanielHeath This is working for me on macOS. For Linux users, depending on how the app was installed you might have to run ./scripts/create_desktop_file.sh, which is available in the root of this repo.

If it still doesn't work, I'd recommend trying the latest nightly (available here) and seeing if that helps.

@DanielHeath
Copy link
Author

I assume you meant to refer to src/assets/linux/create_desktop_file.sh.

I've installed it via Snap, as recommended by your website.

I've run /snap/mattermost-desktop/742/opt/Mattermost/create_desktop_file.sh - still no improvement.

Will try the debugger again, since attempting to follow the link does cause it to reload the app, which indicates it's doing something.

@DanielHeath
Copy link
Author

Ooh, one more interesting tidbit: If I open the desktop app to another team, opening the link will change teams, but not open the linked direct message.

@DanielHeath
Copy link
Author

Aha!

If the server URL lacks a trailing slash (eg "https://radiopaedia.org/chat" - note no trailing slash).

src/main/views/viewManager.ts:204 adds a second slash, resulting in a path like //chat/main/messages/@frank.

If I remove the extra slash via the debugger, the deeplinking works.

Solution: pathName should only have the slash added if urlWithSchema.replace(formattedServerURL, '') does not start with a slash.

@DanielHeath
Copy link
Author

This can be reproduced reliably at our test environment - try opening

mattermost://env-develop.radiopaedia-dev.org/chat/asdf/messages/@rp-user-019689 (username a, password a) in the latest version.

@devinbinnie
Copy link
Member

@DanielHeath I think I might have already fixed that actually. Have you tried the latest nightly build? There was some issues with subpath based servers.

@DanielHeath
Copy link
Author

Where are nightly builds found? Do you mean the release candidate on the releases page of this repo?

@devinbinnie
Copy link
Member

Where are nightly builds found? Do you mean the release candidate on the releases page of this repo?

That would also work, but I also provided a link to the nightly builds in my first reply :)

@DanielHeath
Copy link
Author

Ahh thanks. I've run the latest nightly, but I can still reproduce the bug using the link I posted earlier.

@devinbinnie
Copy link
Member

@DanielHeath Is it still reproducing on both macOS and Linux for the nightly version?

@DanielHeath
Copy link
Author

I've tested it (first with normal releases, then with the nightly build on the 21st dec).

I don't see any new commits since the 21st other than updating translations. However, since you've asked anyways, I just downloaded the latest build from today, and nothing has changed.

The URL and credentials I've provided should let you reproduce this for yourself (and with your devtools enabled, rather than trying to capture telemetry via me typing it out). Would that be a better way to diagnose further?

@devinbinnie
Copy link
Member

This can be reproduced reliably at our test environment - try opening
mattermost://env-develop.radiopaedia-dev.org/chat/asdf/messages/@rp-user-019689 (username a, password a) in the latest version.

@DanielHeath Just tested using the above site and credentials on macOS and I am able to successfully open the deep link, the app navigates to the correct channel as well.

Seems as though the server and the deep links are working correctly. I'm using the December 15th nightly build, if that makes a difference.

@DanielHeath
Copy link
Author

Interesting. I'm still getting it on linux, but I'll ask the user who first reported it (on macos) to try the nightly build (unless you have a release planned soon).

@devinbinnie
Copy link
Member

We did a release on the 15th of December, next one will be sometime in March most likely.
Linux is sometimes finicky depending on the distribution and how it is installed.

@DanielHeath
Copy link
Author

Thanks. I've confirmed it's working on macos.

@DanielHeath
Copy link
Author

I've installed via snap install mattermost-desktop on ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants