Search code examples
javaandroidtestinggoogle-play-consoleresource-leak

MTaaS causing resource leak


After uploading a binary to Google Play, my app was shut down upon launch by Android on one of the test devices according to the Pre-Launch Report.

The issue seems to be a resource leak, cause by:

com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform

I managed to find out that MTaaS most likely stands for Mobile Testing as a Service.

Am I correct that the testing framework leaks resources causing the test to be aborted?

How can I stop MTaaS from leaking?

Full device log from Galaxy S9 in Strict Mode:

Note: This is from an NDK based app, with little Java code, and no dependency on FireBase.

E/StrictMode(14355): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
E/StrictMode(14355): java.lang.Throwable: Explicit termination method 'close' not called
E/StrictMode(14355):        at dalvik.system.CloseGuard.open(CloseGuard.java:223)
E/StrictMode(14355):        at android.os.ParcelFileDescriptor.<init>(ParcelFileDescriptor.java:192)
E/StrictMode(14355):        at android.os.ParcelFileDescriptor.<init>(ParcelFileDescriptor.java:181)
E/StrictMode(14355):        at android.os.ParcelFileDescriptor.createPipe(ParcelFileDescriptor.java:425)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.common.base.IOUtils.makeParcelAsync(IOUtils.java:1)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.platform.ScreenState.writeScreenElementsToParcel(ScreenState.java:141)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.platform.ScreenState.writeToParcel(ScreenState.java:60)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.platform.ParcelableScreenState.writeToParcel(ParcelableScreenState.java:6)
E/StrictMode(14355):        at android.os.Parcel.writeParcelable(Parcel.java:1746)
E/StrictMode(14355):        at android.os.Parcel.writeValue(Parcel.java:1652)
E/StrictMode(14355):        at android.os.Parcel.writeArrayMapInternal(Parcel.java:793)
E/StrictMode(14355):        at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1506)
E/StrictMode(14355):        at android.os.Bundle.writeToParcel(Bundle.java:1181)
E/StrictMode(14355):        at android.os.Parcel.writeBundle(Parcel.java:833)
E/StrictMode(14355):        at android.os.Message.writeToParcel(Message.java:594)
E/StrictMode(14355):        at android.os.IMessenger$Stub$Proxy.send(IMessenger.java:84)
E/StrictMode(14355):        at android.os.Messenger.send(Messenger.java:57)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform.sendMessage(RemotePlatform.java:39)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform.sendActionResultsMessage(RemotePlatform.java:64)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform.handlePerformActionMessage(RemotePlatform.java:24)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform.access$300(RemotePlatform.java:88)
E/StrictMode(14355):        at com.google.android.apps.mtaas.crawler.controller.remote.RemotePlatform$ControllerMessageHandler.handleMessage(RemotePlatform.java:8)
E/StrictMode(14355):        at android.os.Handler.dispatchMessage(Handler.java:105)
E/StrictMode(14355):        at android.os.Looper.loop(Looper.java:164)
E/StrictMode(14355):        at android.os.HandlerThread.run(HandlerThread.java:65)
W/System.err(14355): StrictMode VmPolicy violation with POLICY_DEATH; shutting down.

Solution

  • This looks like it might be a bug in the Google Play pre-launch report crawler. I can inform the appropriate team, but in general if this happens you can let them know via Play console support. You can contact them via the help menu in the Google Play console. This is behind the question mark "?" icon.