iOS issue, cannot load images and receive notifications

Hi devs,

Device: iPhone 7 emulator
Mattermost-mobile version: 1.3.2
mattermost-server version: 5.7.0

I’ve deployed custom versions of mattermost-server (which is working totally fine so far), mattermost-mobile and mattermost-push-proxy.
The android version (Variant=release) is working absolutely fine (loading images, uploading images, receiving notifications as far as I have tested it but the problem is that the iOS app doesn’t seem to load the images in channel discussions. There are warnings showing that the image files could not be opened. When I navigate to Image path in the warning, there exist image files but they are not completely downloaded (have size around 196 bytes).
iOS apps are not receiving the notifications as well. Push proxy shows that the iOS push proxy has been initialized. For android devices server logs show that the notifications has been sent but for iOS device there is not log as well.

When I log in using iOS device, server logs contain something like

Sep 21 11:18:08 ip-172-31-13-5 mattermost[6841]: Sep 21 12:10:57 ip-172-31-13-5 mattermost[17038]: {"level":"info","ts":1569067857.2514904,"caller":"web/handlers.go:104","msg":"Invalid session","error":"GetSession: Invalid session token=pd3r4jsc77rb3esqk66c37jzrc, err=<no value>, "}

Then for every failed image load attempt there is an error on the server like:

Sep 21 12:11:03 ip-172-31-13-5 mattermost[17038]: {"level":"debug","ts":1569067863.8508961,"caller":"web/context.go:76","msg":"Invalid or expired session, please login again.","path":"/api/v4/users/6bocgombh7yaipghu8nmbu3xar/image","request_id":"uz5yix33cbg6bp75fs6weo959e

I am running the mattermost on iOS simulator XCode.
iPhone 7

XCode logs is constantly showing these errors:

Mattermost[38711:1437732] [] nw_socket_handle_socket_event [C842.2:1] Socket SO_ERROR [61: Connection refused]
2019-09-21 17:13:04.361929+0500 Mattermost[38711:1439481] [] nw_connection_get_connected_socket [C842] Client called nw_connection_get_connected_socket on unconnected nw_connection
2019-09-21 17:13:04.858602+0500 Mattermost[38711:1439481] [] nw_socket_handle_socket_event [C843.1:1] Socket SO_ERROR [61: Connection refused]
2019-09-21 17:13:04.861387+0500

Any Idea what might be the issue ?

Hi @danialmalik, based on your description, it looks like you might be on server and mobile versions that we don’t officially support anymore. See the changelog for more details on the requirements: Would you be open to upgrading?

Hi @amy.blais

Thanks for the reply.
I’ve upgraded the services now:
webapp: 5.15.0
server: 5.15.0
mobile: 1.23.0

This resolved the Image loading issue but I still can’t get notifications on iPhone. Android notifications work perfectly. I get the logs and receive the notification. But in case of iPhone their isn’t any trace of push notification whenever I do something to trigger push notification. I don’t see any thing related to notification in logs, neither success nor error message. simply nothing. Could you please tell my what I’m supposed to do?

One more thing that I noticed in mattermost-mobile codebase is telemetry. I see that there is code for sending deviceId and info to the server in but there is no logic implemented in telemetry.ios.js. Is this feature present in enterprise edition? or is this how its supposed to be and still work correctly?

@danialmalik Would you be open to sharing more details about your push notification settings in your system console?

I believe so, this page has more details on what telemetry data we collect: