CommandersAct/AndroidV5

[ServerSide] `NullPointerException` in `TCPredefinedVariables.updateVariablesForNewSession()` since v5.5.4

MGaetan89 opened this issue · 5 comments

Details

In v5.5.3, the numberSessions was retrieved via getPropertyFromSharedPreferences(String), which returns a non-null String.
In v5.5.4, the numberSessions is retrieved via getData(String), which returns a null-able String. However, numberSessions is used directly, without checking if it is null first:

if (numberSessions.isEmpty()) {

Screenshot 2024-06-12 at 11 16 52

Log

Attempt to invoke virtual method 'boolean java.lang.String.isEmpty)' on a null object reference at com.tagcommander.lib.serverside.TCPredefinedVariables.updateVariablesForNewSession
(TCPredefinedVariables.java:644)

Additional context

We have applications in production reporting this crash. We're reverting back to ServerSide 5.5.3 until it is fixed.

Hello !
Thank you for sending us this issue. We'll modify this asap.

Hello !
The problem has been identified and corrected, it'll be available in the next release ASAP !
thanks

I see that ServerSide has received a new 5.5.5 release, with the following note:

Small fix for an internal value NPE.

Is it related to this ticket?

Hi @MGaetan89 ,
yes indeed, fix included is related to this ticket, please upgrade your library to latest 5.5.5 release.

Thanks for the fix!