element-hq / element-android

A Matrix collaboration client for Android.
https://element.io/
GNU Affero General Public License v3.0
3.38k stars 728 forks source link

Link to define custom homeserver/identity server automatically from https://app.element.io/mobile_guide/ does not work on Android 14 #8904

Open arinc9 opened 1 month ago

arinc9 commented 1 month ago

It's https://github.com/element-hq/element-android/issues/5748 but on Android 14 this time. Apparently, this was fixed for Android 12 with https://github.com/element-hq/element-android/pull/6225.

Your phone model

Nothing Phone (1)

Operating system version

Android 14

Application version and app store

Latest Element app from Google Play

Homeserver

matrix.lpc.events

Will you send logs?

If requested, yes.

Are you willing to provide a PR?

No

bro2020 commented 1 month ago

Pixel 7 Pro has the same problem App version 1.6.18 and 1.6.20

sbeach92 commented 1 month ago

Same problems with sony xperia 5 II, android version 12, element version 1.6.20 sony X-preformance, android version 8, element version 1.6.20

So I guess something broked #6225 fix

Fix was undone with #8850: https://github.com/element-hq/element-android/blob/6a8e97820435752cd9b144aedec3137fc71fc80a/vector/src/main/AndroidManifest.xml#L198C1-L205C59

bro2020 commented 1 month ago

https://github.com/element-hq/element-android/pull/8913 This does not fix the problem.

Screenshots ![Screenshot_20241002-082912](https://github.com/user-attachments/assets/f7fc924e-937b-4a1e-bd2f-ecc69168b03f) ![Screenshot_20241002-082847](https://github.com/user-attachments/assets/2154410a-23a1-4fed-bf02-833b66dc2e87)

In order for this to work, you need to go into the settings and manually enable the processing of this url. This defeats the purpose of this function

sbeach92 commented 1 month ago

Probably there should be json file: https://mobile.element.io/.well-known/assetlinks.json Like in other links there is: https://app.element.io/.well-known/assetlinks.json

I assume that old fix *element.io was sort of workaround that missing json from mobile.element.io was not needed.

bro2020 commented 1 month ago

Probably there should be json file

Or the solution lies in a completely different plane... If you manually substitute app.element.io instead of mobile.element.io, everything works as expected. https://app.element.io/?hs_url=https%3A%2F%2Fmatrix-client.matrix.org%2F&is_url=https%3A%2F%2Fvector.im%2F Working URL. Most likely the problem needs to be solved in the element-web project in this line: mobile.element.io

bro2020 commented 1 month ago

manually substitute app.element.io instead of mobile.element.io

In order not to wait until the problem is solved, you can manually change the js file on the running element server. In the docker image, the file is located at the path: /app/bundles/42808ff9cf8775a74f27/mobileguide.js For version: v1.11.79. For other versions, there will be a different path. In it, find and replace mobile.element.io on app.element.io Now your personal web server element will correctly process the url: https://example.com/mobile_guide/ by redirecting the Configure click to the application