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

Configure link to define custom homeserver/identity server automatically from https://app.element.io/mobile_guide/ does not work (mobile.element.io) #5748

Closed
MadLittleMods opened this issue Apr 12, 2022 · 13 comments · Fixed by #6225
Assignees
Labels
A-Deep-link A-Onboarding O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-FTUE Issue is relevant to the first time use project or experience Z-WTF WTF moment: High Impact, Low Effort

Comments

@MadLittleMods
Copy link

Steps to reproduce

  1. Have Element Android installed and signed out
  2. Visit https://app.element.io/mobile_guide/
  3. Click the Configure button
  4. Notice how it just redirects to https://mobile.element.io/?hs_url=https%3A%2F%2Fmatrix-client.matrix.org%2F&is_url=https%3A%2F%2Fvector.im%2F instead of being handled by the Android app

With Element Android installed on the sign in screen.

Press configure Just redirects me to mobile.element.io and pressing "Try again" does nothing

Outcome

What did you expect?

The Android app opens with the custom homeserver and identity server filled in

What happened instead?

Just redirects to https://mobile.element.io/?hs_url=https%3A%2F%2Fmatrix-client.matrix.org%2F&is_url=https%3A%2F%2Fvector.im%2F which tells me to update my app (which is already the latest) and try again which also does nothing.

Your phone model

Pixel 4a

Operating system version

Android 12

Application version and app store

Element version 1.4.11

Homeserver

matrix.org

Will you send logs?

No

@ouchadam
Copy link
Contributor

we should be capturing this url 🤔 https://github.com/vector-im/element-android/blob/develop/vector/src/main/AndroidManifest.xml#L210

<intent-filter>
	<data android:scheme="https" />
	<data android:host="riot.im" />
	<data android:host="app.element.io" />
	<data android:host="mobile.element.io" />
	<data android:host="develop.element.io" />
	<data android:host="staging.element.io" />
</intent-filter>

@ouchadam ouchadam added S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow Z-WTF WTF moment: High Impact, Low Effort Z-FTUE Issue is relevant to the first time use project or experience labels Apr 13, 2022
@MadLittleMods MadLittleMods changed the title Configure link to define custom homeserver/identity server automatically from https://app.element.io/mobile_guide/ does not work (mobile.element.io) Configure link to define custom homeserver/identity server automatically from https://app.element.io/mobile_guide/ does not work (mobile.element.io) Apr 13, 2022
@daniellekirkwood
Copy link
Contributor

@ouchadam to check if this has been completed already

@ouchadam
Copy link
Contributor

I can confirm mobile.element.io deeplink were fixed with #6036

@MadLittleMods
Copy link
Author

@ouchadam This still does not work for me (same as issue description), Element Android 1.4.16

@MadLittleMods MadLittleMods reopened this May 31, 2022
@ouchadam
Copy link
Contributor

ouchadam commented Jun 1, 2022

this is strange 🤔 you're not getting an intent selection popup, perhaps in the past you've elected to always use chrome to handle links? you can clear the defaults by going to the chrome app android information > open by default > clear

REGISTER LOG IN WITH FTUE FLAGS DISABLED
mobile_guide_deeplink mobile_guide_sign_in deeplink_without_flags

@MadLittleMods
Copy link
Author

MadLittleMods commented Jun 1, 2022

@ouchadam I don't think the intent is registered at all for me. Element doesn't have any links in its open by default settings.

Chrome doesn't have any open by default settings.

Element Open by default settings Holding on the Configure link doesn't give me the open with options

@ouchadam
Copy link
Contributor

ouchadam commented Jun 1, 2022

ah it looks like we're hitting the web intent change in android 12 https://developer.android.com/about/versions/12/behavior-changes-all#web-intent-resolution

we'll need element.io to host a https://element.io/.well-known/assetlinks.json to confirm the Element app is approved to handle the url links

@davidrtlt
Copy link

Hello. As someone not familiar with open source, can you clue me in on the timeline where this deep-link functionality will work on Android?

Would love to deploy Element for our organization, and giving users a link that pre-fills the home server is going to be a must (the users are low-tech)

I don't mean this to sound demanding, just wondering if someone can decipher the activity here and let me know if an ETA to release is known.

Thank you

@MadLittleMods
Copy link
Author

MadLittleMods commented Sep 2, 2022

@davidrtlt The PR to fix this, #6225, is currently waiting on a change to element.io itself (it needs /.well-known/assetlinks.json to be present) which the Ops team needs to tackle, https://github.com/vector-im/sre-internal/issues/1382 (internal link). There is no ETA on when that change will happen.

@davidrtlt
Copy link

@MadLittleMods thanks for the insight. Do you know if there is a workaround, or another way, to getting the home server prefilled for new users?

@MadLittleMods
Copy link
Author

MadLittleMods commented Sep 2, 2022

@davidrtlt You can setup /.well-known/matrix/client on your own homeserver, https://spec.matrix.org/v1.1/client-server-api/#well-known-uri

Client Server discovery (/.well-known/matrix/client) -- assists programs that you use to connect to your server (e.g. Element), so that they can make it more convenient for you by automatically configuring the "Homeserver URL" and "Identity Server URL" addresses. Learn more in Introduction to Client Server Discovery

-- https://github.com/spantaleev/matrix-docker-ansible-deploy/blob/master/docs/configuring-well-known.md

It's the first time that I'm looking at it or knowing about it so I don't have more details than those docs. For example, I don't know if Element Android supports it.

@davidrtlt
Copy link

@MadLittleMods I really appreciate you pointing me in this direction. I will try this out. Have a wonderful weekend.

MadLittleMods added a commit to matrix-org/matrix.org that referenced this issue Sep 7, 2022
…nks.json`) (#1431)

Add Android asset links to support app intents (opening `app.element.io` will open the Android app when installed): `/.well-known/assetlinks.json`

Fix https://github.com/matrix-org/matrix-ansible-private/issues/5223
which unblocks element-hq/element-android#6225
to solve element-hq/element-android#5748
@albanbruder
Copy link

Can you give an ETA for when this will be fixed?

Currently only element.io is serving the assetlinks.json file. However, for deep linking to work correctly, at least the following domains must also serve the file:

  • mobile.element.io
  • app.element.io
  • matrix.to

Other URLs that are registered but not verified by the Element Android app:

  • staging.element.io
  • develop.element.io
  • riot.im

This is a showstopper for our userbase, as autoconfiguration via link/qr code is a huge relief for less tech-savvy users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Deep-link A-Onboarding O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Something isn't working: bugs, crashes, hangs and other reported problems Z-FTUE Issue is relevant to the first time use project or experience Z-WTF WTF moment: High Impact, Low Effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants