Open iz4tow opened 2 years ago
I tried also on iphone 14 with 1.9.8, same issue. Instead on iphone 7 is working
Any update? Thx
Is this issue still visible?
Yes
I think the issue is related to iOS 16, because on a non updated iphone was working. After system upgrade to 16.x....same issue
Any update?
Any news? The issue is very annoying for private servers
Looks like https://github.com/vector-im/element-ios/issues/6315 issue.
@iz4tow @ksofix @aeroxs17 Could you confirm, do you all have the Refresh Tokens feature enabled on your homeservers?
How can I check? Thanks
@pixlwave I have the Refresh Tokens feature disabled on my homeserver. All configuration options related to Refresh Tokens are commented out. But i have enabled Message retention policies and some rooms are completely empty.
Here is my homeserver yaml config file:
@pixlwave
It was unchanged from default state - referenced options were commented out
Changing
session_lifetime; refreshable_access_token_lifetime; nonrefreshable_access_token_lifetime; refresh_token_lifetime
to 30 years and then re-authenticating in the app doesnt fix the problem
But it looks like the root of the problem is indeed linked to access tokens - users who didnt reauthenticated since ~october doesnt have this issue, and were working fine for about 3 years now. Any fresh login from now on causes this bug to happen.
Here is my config file:
``` pid_file: "/var/run/matrix-synapse.pid" require_auth_for_profile_requests: true limit_profile_requests_to_users_who_share_rooms: true include_profile_data_on_invite: false default_room_version: "6" listeners: - port: 8008 tls: false type: http x_forwarded: true bind_addresses: ['127.0.0.1'] resources: - names: [client] compress: false redaction_retention_period: null retention: enabled: true default_policy: min_lifetime: 1h max_lifetime: 1d allowed_lifetime_min: 1h allowed_lifetime_max: 12h purge_jobs: - longest_max_lifetime: 12h interval: 30m - shortest_max_lifetime: 13h interval: 30m event_cache_size: 1024K database: name: psycopg2 args: user: * password: * database: * host: 127.0.0.1 cp_min: 5 cp_max: 10 log_config: "/etc/matrix-synapse/log.yaml" media_store_path: "/var/lib/matrix-synapse/media" max_upload_size: 2048M url_preview_enabled: false turn_uris: ["turn:*:5349?transport=udp"] turn_shared_secret: * turn_user_lifetime: 1h turn_allow_guests: true enable_registration: false registration_requires_token: true registration_shared_secret: * signing_key_path: "/etc/matrix-synapse/homeserver.signing.key" trusted_key_servers: - server_name: "*" push: include_content: false encryption_enabled_by_default_for_room_type: all ```
Yes I confirm. Users that does not re-login after the second half of September still works. I have no refresh token configuration in homeserver.yaml
Here my homeserver.yaml:
`server_name: chat.server.local pid_file: "/var/run/matrix-synapse.pid" allow_public_rooms_without_auth: false allow_public_rooms_over_federation: false federation_ip_range_blacklist:
`
But I think maybe is .well-known the problem... Here the well-known/client.
{ "im.vector.riot.jitsi": { "preferredDomain": "vtc.server.local" } }
How can I correct?
Thx
Thanks for the info. I asked because in the logs from @aeroxs17 I see issues saying that the token has an expiry date in the past and wondered if that was a common problem. I have tested running Element iOS against synapse using the demo script that spins up a self-signed instance. I saw the issue once (a syncing banner at the top with an activity indicator), but when I went to debug it I couldn't reproduce it after that.
We're going to need reliable steps to reproduce the issue to be able to look into it properly.
I've tagged the issue as uncommon, as this isn't a regular setup for using Synapse in production.
@pixlwave In my case it is enough to force close an app (as described in this article https://support.apple.com/en-us/HT201330) at any point More rarely this issue can occur after not using the app for quite a while (12 hours - a day)
I sent another log file with link of this issue in description. Is there any way to view those logs locally / by myself?
Experementing with refresh_tokens and manually setting them to None in registration.py (disabling them if i understood correctly) doesnt affect this issue
I've set synapse to run on debug level logging I can see in firewall logs that my device sending requests to synapse server, but synapse logs doesnt show any entries at all. Nginx debug logs shows that my device closes connection while ssl handshaking - recent ios verison of element either forgets exceptions made for self-signed certificate or treats them as another certifcate That certificate is issued for 10 years
Any update on this? Is this issue indeed linked to self-signed certificate or is it not related?
I checked my app running against the mentioned demo with a self-signed certificate and it still happily connects 24 hours later.
forgets exceptions made for self-signed certificate
This definitely appears to be the case - I was wondering if it was the refresh of a token that caused it to happen, but without a way to reproduce this issue on our side it is hard to understand what is causing it.
The only other notable diffrence is that my certificate was issued for 10 years (2020.11.9-2030.11.7). Maybe this triggers security violation?
Same situation. Certificate for 10 years
I have same situation. My certificate starts in 2022 and expires in 2032. Are we affected by these changes: Apple to Enforce 1-Year Limit on SSL/TLS Certificate Lifetimes ?
Any updates on this issue? are such certs not supported anymore
Honestly I think it's element-ios bug, because it works for some time then it stops.
I tried to use another server with NGINX as proxy with a self signed cert valid for 365 days. But SAME ISSUE...it works at first, then after some hours or closing and reopening Element on iOS stuck on syncing. On Android and PC works fine
@pixlwave hi there. If this issue can't be fixed could you please mark it as such? we'll just install valid wildcard certificate in our homeserver if fixing this problem in app will take considerable time
Maybe you can try to reproduce the issue using matrix behind a VPN server. Maybe is VPN on iOS that is the issue. You may try with Wireguard and OpenVPN
@iz4tow have you somehow managed to fix it? I seem to encounter the same issue, and I am really going crazy.
No. I tried everything. I'm still waiting for a solution from developers
I’ve managed to solve it. By buying domain and using letsencrypt to issue valid certs via cloudflare dns verification It now costs me around 100 dollars a year but at least it works
seems like „uncommon“ tag means that devs won’t do anything bout it
@aerolene Yeah I already have that unfortunately, and it still seems to be an issue :/
I imported my (own) certificate authority onto my iPhone and now I can connect. No need for let's encrypt just make sure you have a trusted connection (which is a good idea in the first place). An error message about an untrusted certificate would be welcome.
Apple link for trusting a CA : https://support.apple.com/en-us/HT204477
I tried. But it didn't solve the problem.
Both of my IOS members suddenly have this issue as of this weekend.
I have an infinite sync issue on Element iOS with my private server
Problem description:
I have an iPhone 12 with iOS 17.2.1.
I have a private server with 360-day self-signed SSL.
I downloaded the .crt certificate and installed it directly on my iPhone.
I installed Element iOS version 1.11.8.
I connected to my personal server and confirmed that the fingerprint is the same as the certificate installed on my iPhone.
When I connect to my private server, everything works fine at first.
However, when I close and reopen Element, the app gets stuck in an infinite sync and does not allow me to send or receive messages.
Attempted solution:
I added the homeserver.yaml file with the following configurations:
refresh_token_lifetime: 24h nonrefreshable_access_token_lifetime: 24h refreshable_access_token_lifetime: 10m session_lifetime: 24h
Result:
The solution did not work.
Help request:
What other solution can I try to fix the infinite sync issue on Element iOS?
Additional information:
I found a similar issue on this forum: https://fontsinuse.com/typefaces/32251/element
Gratitude:
Thank you very much for your help.
This issue still happens on IOS 17, on my Android device it works ok. I tried with both Wireguard and without VPN. Initially after login it works fine with everything but after some time, it disconnects and stuck in syncing
mode, both on local network and outside (internet)
I encountered the infinite synch issue on an iPhone connected to a server hosted by an educational institution. Deleting the Cache (User Settings/Delete Cache) solved the problem in my case.
Steps to reproduce
Reboot phone does not solve the problem. I have to logout and login again
Outcome
What did you expect?
I'm expecting the app will work after closing and reipening
What happened instead?
The app is not working
Your phone model
IPhone 13
Operating system version
IOS 16
Application version
1.9.7
Homeserver
Private
Will you send logs?
No