Push notifications - Alert images

Post Reply
Posts: 90
Joined: Thu Jul 11, 2019 9:52 pm

Push notifications - Alert images

Post by varghesesa »


Alert images are the thumbnails that appear alongside the Push notification on your phone.

push_alert image.png
push_alert image.png (70.69 KiB) Viewed 27246 times

By default an alert image is included with a Push notification.

action map_alert image.png
action map_alert image.png (43.21 KiB) Viewed 27246 times

Alert images work by the mobile app first receiving a Push notification from the BI server (via Apple/Android push servers). The mobile app then makes a request for the corresponding alert image associated with the Push notification. If the alert image is not included with the Push notification, this communication between the app and the BI server has been broken.

This article explains how to self-correct your settings if the Alert image stops working. See Push notifications article, if you are not receiving Push notifications.


There are two ways to crack this nut. You can either (1) double-check your settings or (2) identify the issue in the logs and work backwards. Both approaches are provided.


All the suggestions below are based on past tickets.

IP Address

The most common issue is the IP Address on the BI server changed. Logout of the mobile app.
Go to your server settings and hit the Lookup key (iOS) / Get IPS key (Android) to update the LAN / WAN addresses. Confirm LAN/WAN addresses are correct. Wait for the next Push notification to confirm issue is resolved.

Android + SSL

Android / Google came out with tighter certificate restrictions recently. You need to make some changes to your Stunnel config file. The Android Gotcha article documents how other customers resolved issue.


The network setup is critical to getting the apps working on the WAN. When the alert image is not present, use the mobile browser on the phone to connect to the web interface. If the phone cannot connect to UI3, you know the network is not setup correctly.
Double check your network setup.

If the UI3 interface is working, the IP address is wrong or the incorrect protocol (http/https) is selected.
Revisit the Server settings on your mobile app.


When you don't get the image, are you able to login with the app?
If you cannot login, and you ruled out network issues (above), double check the permissions associated with the user/mobile device trying to connect.


The debug logs will tell you the issue. When the next notification arrives on your phone without an alert image, go to the app (do not select notification) -> ? tab -> Debug log.
Scroll to the bottom of the log and look for downloadTaskWithURL commands associated with your recent alerts. I numbered the lines key for attaining alert images.

Code: Select all

2021-09-08 7:55:10: handleRemoteNotification: 'ADF7' (MOTION_A) triggered on 'Mabury Square' at 7:54:39 AM, long-chime-sound.wav 264
2021-09-08 7:55:10: Server now Mabury Square --> 4 server=Mabury Square, cam=ADF7, wanip=(null)
3    2021-09-08 7:57:40: downloadTaskWithURL fails The request timed out.
2021-09-08 7:57:40: Requesting image from http://xxxx.ngrok.io/thumbs/alert.4118562208.jpg?session=2e4742d111f37fc81f1b3e2a25ee13d6
5    2021-09-08 7:57:40: downloadTaskWithURL http://xxxx.ngrok.io/thumbs/alert.4118562208.jpg?session=2e4742d111f37fc81f1b3e2a25ee13d6 fails The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.
2021-09-08 7:58:39: didDetermineState: 1
2021-09-08 7:58:39: http://xxxx.ngrok.io --> {
    cmd = geofence;
    inside = 1;
    session = 00a939f740fe6f735b582ded29ce028d;
2021-09-08 7:58:39: http://xxxx.ngrok.io/json <-- {"result":"success","session":"00a939f740fe6f735b582ded29ce028d"}
downloadTaskWithURL calls: Calls to get alert image using LAN address (line 3) and WAN address (line 5). There are 2 requests per notification because the app automatically checks the LAN and WAN addresses.

Line 3: 2021-09-08 7:57:40: downloadTaskWithURL fails The request timed out.

You can first confirm whether the URL makes sense. Is the IP addresses accurate? Are the ports accurate?
In my scenario for this example, I was NOT on the LAN thus the LAN call times out.

Line 5: 2021-09-08 7:57:40: downloadTaskWithURL http://xxxx.ngrok.io/thumbs/alert.41185 ... 2a25ee13d6 fails The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

From Line 5, it should be obvious based on the URL, I implemented NGROK. It now becomes easy to check whether the URL is correct. If not, perhaps logging out and hitting the lookup key will update the address (see IP address section above). If that does not work, you will have to revisit your web server settings.

I purposely created a scenario where I setup the BI server to communicate via https and the app is setup for http. Thus the error message.

The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

The fix is to logout of the mobile app, edit the Server settings, and switch the WAN protocol from http to https.

If I were using port forwarding, the URL would have a WAN IP address similar in structure to Line 3. You can then confirm whether the WAN address is correct. If not, revisit your network setup, in particular the web server settings. Global settings -> Web server tab. If the WAN address is correct, you may need to revisit your router and the port forwarding setup.

In this example, both requests failed and the notification was sent without an image. The LAN address failed because the phone was on the WAN.
The WAN address failed because the BI server was setup for https but the mobile app was using http communication.

Post Reply