Non-Secure server address (http, not https) continues to be unreachable on iOS
TheIdiom opened this issue · 12 comments
Summary
I previously submitted bug #7800 regarding this issue and that was fixed in mobile version 2.12.2, this problem continues to happen in all current versions of Mattermost on iOS.
Environment Information
- Device Name: N/A
- OS Version: iOS 17.3.1
- Mattermost App Version: 2.13.0
- Mattermost Server Version: 9.5.1
Steps to reproduce
Try to reach any Mattermost server using a "http" (non secure) address on any version of Mattermost Mobile for iOS before 2.12.0 (when it broke).
Expected behavior
Should be able to communicate with the Mattermost server as we always could before.
Observed behavior (that appears unintentional)
Can not reach Mattermost server with the following results:
- Connect button changes to "Connecting..." then just stops. (when trying to add the server)
- The debug logs on the phone show these lines:
2024/02/21 11:06:16:380 DEBUG Server ping threw an exception Received invalid response from the server.; Request retry failed with retry error: An SSL error has occurred and a secure connection to the server cannot be made., original error: Request retry failed with retry error: An SSL error has occurred and a secure connection to the server cannot be made., original error: URLSessionTask failed with error: An SSL error has occurred and a secure connection to the server cannot be made.
Possible fixes
The other change made to Info.plist
was the removal of these lines:
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
So maybe that needs to be rolled back as well, but I don't know enough about iOS app development.
Otherwise it almost seems like something within the Mattermost Mobile iOS code is ignoring the "http" and replacing it with "https" but I don't know how to capture outgoing URLs on iOS to confirm that. Either way some change in v2.12.0 broke http server connections and our team is still unable to fully utilize Mattermost for work so any help would be appreciated.
The latest v2.13.0 is still not connecting to the http connection.
@enahum You worked on the initial fix. Do you happen to know if a follow-up fix is needed?
@amyblais this should be good, perhaps there is a conflict between the flags of arbitrary loads and local network, not sure why, but I think this was tested by QA wasn't it?
The latest v2.13.0 is still not connecting to the http connection.
Correct
Apologies for the delay on this. I tested and was unable to reproduce the issue. I am able to access an http://
server using iOS:
OS Version: iOS 17.3.1
Mattermost App Version: 2.13.0, 2.14.0
Mattermost Server Version: 9.5.1
It's a local server, and I had to grant permission on iOS before it would connect locally. Not sure if that affects repro-ing your issue?
Apologies for the delay on this. I tested and was unable to reproduce the issue. I am able to access an
http://
server using iOS:OS Version: iOS 17.3.1
Mattermost App Version: 2.13.0, 2.14.0
Mattermost Server Version: 9.5.1
It's a local server, and I had to grant permission on iOS before it would connect locally. Not sure if that affects repro-ing your issue?
My issue is with a remote server which still doesn't work. I can share the URL with you in a non-public way if you want to verify or if that would help with troubleshooting.
My issue is with a remote server which still doesn't work. I can share the URL with you in a non-public way if you want to verify or if that would help with troubleshooting.
@lindalumitchell Let me know if this could be possible to QA test, or if it would be easier for dev to take a look.
@lindalumitchell Let me know if this could be possible to QA test, or if it would be easier for dev to take a look.
Thanks; I could certainly test and see if it repros for me, though after that it would be more meaningful for dev to take a look. I'm happy to test first if that's helpful.
If it helps with testing you can try going to our site:
[ snip ]
That address will work fine in Safari on iOS but will not connect using the Mattermost iOS app.
@TheIdiom thank you; I can indeed reproduce using that URL. I can reach the login page on Android app and on Safari on iPhone, but not on the iOS app. I'll add this comment to the Jira ticket as well.
Quick update: I tested the PR for this issue and it looks good on iOS with your URL. So a fix is coming!