Support Topics Documentation Slack YouTube Blog

Push notifications stopped working (iOS and Android)

I have both apps (iOS and Android) with a pretty old backendless library, but notifications used to work perfectly until last time. I have not changed anything in the apps, nor in the console, but now the apps do not receive any push notifications.

I tried to replace iOS p12 certificate and update it’s password, just in case, but nothing works. For Android I have not changed absolutely nothing because server key does not expire and it is correct.

I tried even to send notifications from the console. When I create a new push notification for a specific channel it shows me the right number of devices registered (these are mine) and sends notification without any error, but notification never come.

It there any issue on your side, because nothing really changed on mine? Thanks in advance!

Hi @vasilii-aleksandrov !

Sorry for inconvenience.
Could you please provide your App ID and versions for Backendless IOS SDK and Backendless Android SDK which are used in your apps?

Regards, Andriy

@Andriy_Konoz , of course!

App ID: F331EAFB-E22B-DEDF-FF92-B759EB67D300
About SDK versions I can not tell you for sure now, but it was definitely year 2017 when we last updated it. Notifications worked last year - 100%.

upd: I’ve found jar file of Android SDK. Where should I look for it’s version?

@Andriy_Konoz hello!

Any updates on this situation? Should I do anything to make push notifications work again?

Hi @vasilii-aleksandrov !

Sorry for delay. We have checked okd versions of SDK but was unable to reproduce this error. According to our logs Backendless receives your push notifications from your code and sends them without any errors.
I would recommend you to check your configs for push notifications and also try to update your code to use a never versions of Backendless SDK

Regards, Andriy

@Andriy_Konoz , thanks for your response!

I guess I’ve found an issue - Android devices do not register in system anymore.

     Backendless.Messaging.registerDevice(SENDER_ID, channels, nextYear, new AsyncCallback<Void>() {
                @Override
                public void handleResponse(Void response) {
//here I get null in response
                    Log.i("PUSH REGISTRATION", " response "+response);
                }
                @Override
                public void handleFault(BackendlessFault fault) {
                    Log.i("PUSH REGISTRATION", " fault "+fault);
                }
            });

I just get null in the response, not the error, but the device (Anroid API 28) does not appear in the console (DeviceRegistration). However I see that older version (API 24, for example) do register. What could it be?

On other hand I have no problems with iOS registrations - they still register properly, however they do not receive any notifications. I tried with different certificates, both for Sandbox and Production, for both versions (from App Store and Debug), but the results is the same - there is no iOS device receiving push notifications.

That is strange.
I will as our QA to check this scenario. I will write you back as soon as I receive feedback from them.
Sorry for inconvenience.

Regards, Andriy

@vasilii-aleksandrov

I have created internal ticket BKNDLSS-24589 for problem with registration of Android devices in your app. For problem with push notifications in IOS internal ticket BKNDLSS-24590 was created. We will try to fix this problems as soon as possible. You will be notified when fix will be available on production.

One more question about push notifications in Android. Have you tried to send notification from device with Android API 24?

Regards, Andriy

@Andriy_Konoz

So, were you able to reproduce these issues with Android and iOS?

About API 24. No, I don’t have it. I’ve tried to send notifications from iOS 12, iOS 14, Android 28 and then from console. The same devices I used to receive notifications.

@vasilii-aleksandrov

To clarify this situation. Error during device registration was reproduced when our QA tried to register Android device in your app. In test apps registration and push notifications for Android work without any problems. As for problem with IOS, I have created internal ticket for our IOS developer so he will look to int and will try to find out scenario when this error occurs.

Could you try to setup a new app with keys for push notifications from original one and try to send notifications from it?

Regards, Andriy

@Andriy_Konoz

  1. Do you want me to create a new backendless project and set the same server key/sender id that I have now? Then run a the same Android app with new bundle id and test it?

  2. Why do you want me to test sending notifications? The only problem I am facing now is not receiving them (because of not registering Android devices and because of some issue with iOS/console), not sure there is any issue with sending notifications from the app.

@vasilii-aleksandrov

Do you want me to create a new backendless project and set the same server key/sender id that I have now? Then run a the same Android app with new bundle id and test it?

Yes, I want you to check if Andorid and IOS devices or higher will be able to receive push notifications which was sent using the same keys.

Why do you want me to test sending notifications? The only problem I am facing now is not receiving them (because of not registering Android devices and because of some issue with iOS/console)

I want you to send push norification on your device and verify that it was delivered using new app with the same keys. By this we will narrow down possible reasons of this behavior. I am not shure that notifications will reach Android devices with API below 28 since there also problems with IOS.

I will appresiace your help. By doing this actions you will help us to find reasons of such behavior.

Regards, Andriy

@Andriy_Konoz

Just created a new app for Android. Uploaded the same server key, the same sender id and ran the same app with new appId and secretKey. No, device does not appear in DeviceRegistration.

I init the app and call messaging registration in 5 seconds.

  Backendless.initApp( this,"66B190D9-0A9B-63D8-FF35-CBD9D1F24A00", AndroidSecretKey);

        Handler handler = new Handler();
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                List<String> channels = Arrays.asList("wedding900");
                Calendar cal = Calendar.getInstance();
                cal.add(Calendar.YEAR, 4);
                Date nextYear = cal.getTime();
                String SENDER_ID = "ХХХ";
                Backendless.Messaging.registerDevice(SENDER_ID, channels, nextYear, new AsyncCallback<Void>() {
                    @Override
                    public void handleResponse(Void response) {
                        Log.i("PUSH REGISTRATION", " response "+response);
                    }
                    @Override
                    public void handleFault(BackendlessFault fault) {
                        Log.i("PUSH REGISTRATION", " fault "+fault);
                    }
                });
            }
        }, 5000);

The response is null. Not sure if there is any need to test sending notifications to channel, because it has no devices registered.

Hi, @vasilii-aleksandrov

There is an internal ticket BKNDLSS-24589 for your case. We are investigating the issue and write back to you once we have the results.

Regards,
Marina

Hi @vasilii-aleksandrov !
Thank you for your tests. Could you please enable detailed logging in your app on Android device and share them with us?
We just checked your new app and our QA was able to register new Android device in it.
We also have checked IOS push notifications and they are working fine in apps for tests.

Regards, Andriy

@Andriy_Konoz

  1. What exact logs you need?
  2. Can you send me your test apps? If I update my backendless jar should it start working again or I have to do any additional setup like Firebase registration ?

@vasilii-aleksandrov

  1. What exact logs you need?

I am interested in logs which includes error message during device registration.

Can you send me your test apps?

A can send you one of Android apps in which we checked device registration PNExample.zip (26.4 MB) It already configured for your new app.

If I update my backendless jar should it start working again or I have to do any additional setup like Firebase registration ?

I think that the only changes that you should make during upgrade - is to adapt your code for new signatures of SDK methods.

Regards, Andriy

@Andriy_Konoz hello!

I decided just to update all the libs/pods (adapt code, register in Firebase) and now everything seems to work fine.

Hi @vasilii-aleksandrov !

I am glad to hear that you have managed to resolve your problem.
Sorry for inconvenience. I hope you will enjoy a further work with Backendless.

Regards, Andriy