ANRs worsen since last update

0 favourites
  • 11 posts
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • Hello guys!

    For those with android live games on PS...

    I had a game on the store that was updated sept last year, last month I finally pushed an update, but I noticed the ANRs went up. They are since then above the bad behaviour treshold :(

    Unfortunately this dragged my ranking down dramatically after a month and I'm desperatedly looking for a solution. I haven't added any external plugin.

    As you see the top Native method - android.os.MessageQueue.nativePollOnce are impacting a lot of users.

    I've seen other topics open talking about the "Splash Screen" topic. But I'm not sure what was the solution they found if any :(

    Thank you for your time!

  • Hi.

    I share your pain!!!

    The r302 version pleased me and gave me very few ANR errors.

    After upgrading to r308 and above, my ANR error rate has increased tremendously.

    I dropped a lot in the rankings and my earnings decreased a lot.

    github.com/apache/cordova-android/issues/1510

    github.com/Scirra/Construct-bugs/issues/6166

    We never found a solution to the problem and it's a pain.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi.

    I share your pain!!!

    The r302 version pleased me and gave me very few ANR errors.

    After upgrading to r308 and above, my ANR error rate has increased tremendously.

    I dropped a lot in the rankings and my earnings decreased a lot.

    https://github.com/apache/cordova-android/issues/1510

    https://github.com/Scirra/Construct-bugs/issues/6166

    We never found a solution to the problem and it's a pain.

    Thank you for sharing! Yeah my revenue went down by more than 50% and keep falling... I can't believe any work around was proposed by any of the parts. This basically makes android games useless since you won't be able to rank and get any download.

    I tried to revert to 302 but I couldn't open my project there, so I did the "commenting" thing on android studio -_-

    I also purchased Chadori's plugin to get the admob thing from there, I have some errors clearly referring to admob, but not sure if it's on construct side (maybe the sdk they are using) or on google side, which after we saw it's totally plausible.

  • If you build yourself (with Android Studio, instead of some build service) you can change a few things for Admob which can get the ANRs down. (Load it on another thread). Also you can tweak the splashscreen settings.

    Also worth for you to test is to build a new build today, which will use the updated Android cordova version. It has updated versions of various libraries, the splashascreen for example.

    I don't know if it makes any differences for you though.

  • If you build yourself (with Android Studio, instead of some build service) you can change a few things for Admob which can get the ANRs down. (Load it on another thread). Also you can tweak the splashscreen settings.

    Also worth for you to test is to build a new build today, which will use the updated Android cordova version. It has updated versions of various libraries, the splashascreen for example.

    I don't know if it makes any differences for you though.

    Thank you very much for your comment! Is there a post where I can find the possible tweaks for Admob? :O

    Regarding the update I wasn't sure if they actually tackled the issue :/ I'm scared so far since I'm in a critical situation rn and I'm basically hotfixing. Lemme know if you try it!!

  • Thank you very much for your comment! Is there a post where I can find the possible tweaks for Admob? :O

    developers.google.com/admob/android/optimize-initialization

  • In my case, fredriksthlm's fix suggestion unfortunately didn't help. I deduced that the problem started occuring in r303 when Construct changed the way that the splash screen works.

    What partially fixed the issue for me was building the game as Android Studio project then open it in Android Studio, go to "Edit - Find - Find in files" and find this line of code

    cordovaInterface.pluginManager.postMessage("setupSplashScreen", splashScreen);

    and delete it.

    This means there might be a few seconds of black or white screen instead of the splash screen which is not ideal, but at least the ANR rate for my game went from 4% to 0.28%

    Here's what Ashley said on the matter of trying to fix the issue by changing the implementation of the splash screen on Construct's part:

    ... I also don't want to have to reimplement a splash screen, which will be difficult to get exactly right, just to work around a bug in Google's code. Google should fix the root cause issue. I also have no idea how it could take several seconds to even display the built-in progress bar, that seems weird.

    In short I don't think there's any action worth taking on Construct's side ...

    The issue first occured after Construct updated the Cordova version it uses and therefore updated the splash screen implementation which appears to cause the high ANR rate. But I didn't find any information that would suggest that this exact issue affects anyone else using Cordova outside of Construct 3

  • In my case, fredriksthlm's fix suggestion unfortunately didn't help. I deduced that the problem started occuring in r303 when Construct changed the way that the splash screen works.

    What partially fixed the issue for me was building the game as Android Studio project then open it in Android Studio, go to "Edit - Find - Find in files" and find this line of code

    cordovaInterface.pluginManager.postMessage("setupSplashScreen", splashScreen);

    and delete it.

    This means there might be a few seconds of black or white screen instead of the splash screen which is not ideal, but at least the ANR rate for my game went from 4% to 0.28%

    Here's what Ashley said on the matter of trying to fix the issue by changing the implementation of the splash screen on Construct's part:

    > ... I also don't want to have to reimplement a splash screen, which will be difficult to get exactly right, just to work around a bug in Google's code. Google should fix the root cause issue. I also have no idea how it could take several seconds to even display the built-in progress bar, that seems weird.

    >

    > In short I don't think there's any action worth taking on Construct's side ...

    The issue first occured after Construct updated the Cordova version it uses and therefore updated the splash screen implementation which appears to cause the high ANR rate. But I didn't find any information that would suggest that this exact issue affects anyone else using Cordova outside of Construct 3

    Thank you for your input! Yeah actually I have a live version with this line commented rn and for now the "android.os.MessageQueue.nativePollOnce" dissappeared...

    I have another issue with loading ads causing lag that I also need to tackle.

  • > Thank you very much for your comment! Is there a post where I can find the possible tweaks for Admob? :O

    >

    https://developers.google.com/admob/android/optimize-initialization

    Thank you taking a look at it right now! I need to actually ADD those lines right?

  • IIRC the conclusion last time around was: these are incorrect readings. The app is responding, but Google's services are incorrectly measuring it as not responding. I think it stems from the new splash screen implementation (used by either Cordova or Android, not something specific to Construct) which incorrectly counts the splash screen as the app not responding. Google need to fix the problem in order to make sure the app is counted as responding when the splash is showing and then produce the correct measurements. So for the time being the fact you see a high ANR does not actually mean lots of uses are seeing your app hang.

    FWIW I still think this is weird because even if the splash screen counts as ANR, then the splash screen ought to disappear as soon as Construct shows its loader - which should only take a second or two and not trigger ANR, unless perhaps the device is extremely slow. I'd also advise to make sure the loader style is not "none", because if it is then the splash screen is shown for the full duration the app is loading - if it is any other setting, then the splash screen is hidden as soon as the core Construct engine has loaded and it is able to show its own loader.

  • Hey Ashley thank you for replying!

    So, I suspect the ANR one may not be the logo one, nor the "loading" one, but the extra screen that comes after.

    Some weeks ago I posted this, so as you see after the loading bar (which takes like half a second) it gets stucks randomly.

    construct.net/en/forum/construct-3/general-discussion-7/loading-screen-randomly-177393

    Not sure why this happens :/

    In my case I have the preload audios disabled and the loader bar.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)