Can someone help me understand errors in Google Play "ANR and Crashes"

Hi all,

I am just after a bit of understanding.  I can see on the Google Play Console that I am getting quite a few Crashes for “java.lang.NullPointerException”.

I have added an “unhandledError” listener to my code and am manually logging the error to flurry (until a better solution is available).

[lua]

local function myUnhandledErrorListener( event )

    local iHandledTheError = true

    if iHandledTheError then

        print( “Handling the unhandled error”, event.errorMessage )

        local analytics = require (“scripts.helper.analytics”)

        analytics.logError( event)

    else

        print( “Not handling the unhandled error”, event.errorMessage )

    end

    

    return iHandledTheError

end

Runtime:addEventListener(“unhandledError”, myUnhandledErrorListener)

[/lua]

This works perfectly when I build on my device, and it logs perfectly with flurry.  However I am not getting any notifications on flurry about these errors that I am seeing on the Google Play Console.  Why would these errors not be caught by the “unhandledError” event listener?  I am worried that the errors are impacting on my retention etc.

Cheers,

Craig

This is not a lua error so the exception catch would not catch this. I would suggest you look at the plugins you are using and what parameters you are sending in. Sometimes the actual trace gives you hits on what exactly is going on.

This is not a lua error so the exception catch would not catch this. I would suggest you look at the plugins you are using and what parameters you are sending in. Sometimes the actual trace gives you hits on what exactly is going on.