1895-1904/com.android.mms E/StrictMode﹕ is this my Bug? - android

Any help given at this stage will be appreciated, i have tried reading but now i am actually confused, The first time it was Calender i went and introduced an exception and that has gone away now i see it is mms How can i deal with this? any advice?
1895-1904/com.android.mms E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'release' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at android.drm.DrmManagerClient.<init>(DrmManagerClient.java:258)
at com.google.android.mms.pdu.PduPersister.<init>(PduPersister.java:288)
at com.google.android.mms.pdu.PduPersister.getPduPersister(PduPersister.java:299)
at com.android.mms.transaction.TransactionService.onNewIntent(TransactionService.java:231)
at com.android.mms.transaction.TransactionService$ServiceHandler.handleMessage(TransactionService.java:633)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
1989-2046/com.android.email E/EmailServiceProxy﹕ RuntimeException when trying to unbind from service
java.lang.IllegalArgumentException: Service not registered: com.android.emailcommon.service.ServiceProxy$ProxyConnection#1d27587c
at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1029)
at android.app.ContextImpl.unbindService(ContextImpl.java:1808)
at android.content.ContextWrapper.unbindService(ContextWrapper.java:551)
at com.android.emailcommon.service.ServiceProxy$ProxyConnection$1.doInBackground(ServiceProxy.java:124)
at com.android.emailcommon.service.ServiceProxy$ProxyConnection$1.doInBackground(ServiceProxy.java:111)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)

If you are building a custom ROM and are modifying the com.android.mms and com.android.email apps, then perhaps these are your issues.
Otherwise, they are issues for the developers of the com.android.mms and com.android.email apps.

Related

Should I pay google maps to make GPS coordinates requests in android app?

My goal is to get latitude & longitude every 5 seconds.
I have already archived that in my app by adding ACCESS_FINE_LOCATION permission in manifest and by creating a LocationManager instance and then implementing LocationListener to get the coordinates.
Now for no obvious reason I stopped getting results from onLocationChanged function and I get this CancellationException error:
E/RequestManagerImpl: Producing location failed
java.util.concurrent.ExecutionException: java.util.concurrent.CancellationException: Task was cancelled.
at dagger.producers.Produced$Failed.get(SourceFile:3)
at com.google.android.apps.gsa.staticplugins.cy.j.ac.a(SourceFile:98)
at com.google.android.apps.gsa.staticplugins.cy.j.am.aH(SourceFile:11)
at dagger.producers.internal.AbstractProducesMethodProducer.aD(SourceFile:11)
at com.google.common.util.concurrent.r.av(SourceFile:5)
at com.google.common.util.concurrent.q.run(SourceFile:17)
at com.google.common.util.concurrent.bx.run(SourceFile:3)
at com.google.android.apps.gsa.taskgraph.d.a.r.run(SourceFile:7)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source)
at com.google.android.apps.gsa.shared.util.concurrent.b.bk.run(SourceFile:3)
at com.google.android.apps.gsa.shared.util.concurrent.b.bk.run(SourceFile:3)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.google.android.apps.gsa.shared.util.concurrent.b.m.run(SourceFile:6)
Caused by: java.util.concurrent.CancellationException: Task was cancelled.
at com.google.common.util.concurrent.d.fi(SourceFile:78)
at com.google.common.util.concurrent.d.get(SourceFile:60)
at com.google.common.util.concurrent.cv.n(SourceFile:1)
at com.google.common.util.concurrent.bc.p(SourceFile:33)
at com.google.common.util.concurrent.a.run(SourceFile:14)
at com.google.common.util.concurrent.ar.execute(SourceFile:3)
at com.google.common.util.concurrent.d.a(SourceFile:216)
at com.google.common.util.concurrent.d.a(SourceFile:184)
at com.google.common.util.concurrent.d.M(SourceFile:130)
at com.google.common.util.concurrent.q.run(SourceFile:15)
at com.google.common.util.concurrent.ar.execute(SourceFile:3)
at com.google.common.util.concurrent.d.a(SourceFile:216)
at com.google.common.util.concurrent.d.a(SourceFile:184)
at com.google.common.util.concurrent.d.cancel(SourceFile:95)
at com.google.android.apps.gsa.taskgraph.d.a.w.run(SourceFile:3)
at com.google.android.apps.gsa.taskgraph.d.a.m.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.taskgraph.d.a.e.run(SourceFile:17)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:818) 
at com.google.android.apps.gsa.shared.util.concurrent.b.m.run(SourceFile:6) 
While searching for this in the internet I have found someone saying that it has something to do with the new Google Maps pricing changes that went into effect on July 16, 2018.
I'm not using any routes or map services. I just need to get latitude & longitude every 5 seconds. Should I create an API key and put it somewhere in my code to make my code work again?
Thanks in advance!

My app keeps stopping in Android Emulator with mpw error which I think is related to server connectivity

The logs, in this case, are very weird. I am not able to figure out the issues that are causing the connectivity errors with the servers. Please help me out with this mpw 29503 error:
09-06 17:08:37.756 2285-4073/com.google.android.gms.persistent E/NetRec: [239] abno.a: Could not retrieve server token for package com.google.android.apps.gcs
java.util.concurrent.ExecutionException: mpw: 29503:
at alfn.b(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at alfn.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):28)
at abno.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at abno.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):7)
at abnl.getHeaders(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
at com.android.volley.toolbox.HttpClientStack.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):15)
at nmb.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at bdb.executeRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):1)
at com.android.volley.toolbox.BasicNetwork.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):11)
at nmc.performRequest(:com.google.android.gms#12521024#12.5.21 (040700-189987672):8)
at com.android.volley.NetworkDispatcher.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):7)
at com.android.volley.NetworkDispatcher.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
Caused by: mpw: 29503:
at mvf.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):3)
at aejp.b(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at aema.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):4)
at nof.a(:com.google.android.gms#12521024#12.5.21 (040700-189987672):6)
at noj.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):44)
at axja.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):2)
at nsg.run(:com.google.android.gms#12521024#12.5.21 (040700-189987672):27)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at nya.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)
It's so wired, because of task invocation on ThreadExecutor. To get correct log of your issues, you should wrap action, which you submit in background with your tools (executor Service, Rx, or even AsyncTask) with try-cath block.

Android Emulator Black screen -

Application worked on this emulator, I have tried to implement Google Play Game services and it appears that this service can't connect. I have tried on multiple emulators. Now when I run the app all I get is the black screen.
Here is the Android Monitor:
09-18 13:11:28.507 1141-1141/? E/Drm: Failed to open plugin directory /vendor/lib/mediadrm
09-18 13:11:29.897 1963-8847/com.google.android.gms E/ChromeSync: [Sync,SyncAdapter] Failed to sync.
hlr: Error when calling the server (message: Application credential header not valid. Please fix the client to pass a valid application credential header.).
at hlt.b(:com.google.android.gms:11)
at hmd.c(:com.google.android.gms:1)
at hmh.b(:com.google.android.gms:61)
at hmf.a(:com.google.android.gms:12)
at jlo.onPerformSync(:com.google.android.gms:2)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259)
Caused by: aury: INVALID_ARGUMENT: Application credential header not valid. Please fix the client to pass a valid application credential header.
at auru.c(:com.google.android.gms:2)
at jgq.a(:com.google.android.gms:62)
at hlt.b(:com.google.android.gms:9)
at hmd.c(:com.google.android.gms:1) 
at hmh.b(:com.google.android.gms:61) 
at hmf.a(:com.google.android.gms:12) 
at jlo.onPerformSync(:com.google.android.gms:2) 
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:259) 
09-18 13:11:41.977 8863-8863/? E/memtrack: Couldn't load memtrack module (No such file or directory)
09-18 13:11:41.977 8863-8863/? E/android.os.Debug: failed to load memtrack module: -2
09-18 13:11:42.887 1963-1972/com.google.android.gms E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
java.lang.Throwable: Explicit termination method 'close' not called
at dalvik.system.CloseGuard.open(CloseGuard.java:184)
at android.os.ParcelFileDescriptor.<init>(ParcelFileDescriptor.java:179)
at android.os.ParcelFileDescriptor.<init>(ParcelFileDescriptor.java:168)
at android.os.ParcelFileDescriptor.createPipe(ParcelFileDescriptor.java:362)
at com.google.android.gms.ads.internal.request.n.a(:com.google.android.gms:1)
at com.google.android.gms.ads.internal.request.n.writeToParcel(:com.google.android.gms:5)
at jdq.a(:com.google.android.gms:16)
at com.google.android.gms.ads.internal.request.d.writeToParcel(:com.google.android.gms:28)
at brr.a(:com.google.android.gms:6)
at com.google.android.gms.ads.internal.request.k.a(:com.google.android.gms:0)
at com.google.android.gms.ads.internal.request.service.i.run(:com.google.android.gms:7)
at com.google.android.gms.ads.internal.util.v.call(:com.google.android.gms:1)
at com.google.android.gms.ads.internal.util.w.run(:com.google.android.gms:0)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
09-18 13:11:42.957 1816-2482/com.google.process.gapps E/NetworkScheduler.SR: Unrecognised action provided: android.intent.action.PACKAGE_REMOVED
09-18 13:11:43.397 8903-8903/? E/memtrack: Couldn't load memtrack module (No such file or directory)
Also I tried to install signed apk to Emulator with adb install but the same problem appears.

Android app crashing after loading project on a different computer

I've been storing my project in DropBox to share across computers so I can work from my laptop upstairs. Everything worked fine on my PC, then I went and loaded the project on my laptop and it just crashed when I tried to run it so I gave up and came back to my PC, but now it isn't working there either. It was working fine, I didn't change anything about the code at all. but now I get the error below.
No matter how many gradle syncs and updates and everything that I try I can't figure out how to fix. In addition to fixing this, how am I supposed to work on the same project on multiple PC's without breaking everything?
I ran a Gradle Clean and Sync but it didn't seem to work that time either. Also I didn't even realize I was using AsyncTask, so I'll look at that.
Since I'm not sure exactly what the stack trace is, here's my whole LogCat :)
03-10 14:25:41.849 4830-4830/com.mydomain.myapp W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
03-10 14:25:41.960 4830-4830/com.mydomain.myapp I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
03-10 14:25:41.961 4830-4830/com.mydomain.myapp I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
03-10 14:25:41.966 4830-4870/com.mydomain.myapp V/FA: Using measurement service
03-10 14:25:41.966 4830-4870/com.mydomain.myapp V/FA: Connecting to remote service
03-10 14:25:41.967 4830-4870/com.mydomain.myapp V/FA: Activity resumed, time: 4313744
03-10 14:25:41.977 4830-5248/com.mydomain.myapp E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.mydomain.myapp, PID: 4830
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{36fd80a 4830:com.mydomain.myapp/u0a17} (pid=4830, uid=10017) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
at android.os.Parcel.readException(Parcel.java:1599)
at android.os.Parcel.readException(Parcel.java:1552)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:3550)
at android.app.ActivityThread.acquireProvider(ActivityThread.java:4778)
at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2018)
at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1468)
at android.content.ContentResolver.query(ContentResolver.java:475)
at android.content.CursorLoader.loadInBackground(CursorLoader.java:64)
at android.content.CursorLoader.loadInBackground(CursorLoader.java:56)
at android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
at android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:66)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
at java.lang.Thread.run(Thread.java:818) 
03-10 14:25:41.980 4830-5250/com.mydomain.myapp D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 03-10 14:25:41.982 4830: 4830 D/ ]
HostConnection::get() New Host Connection established 0x7effab5dc260, tid 4830
03-10 14:25:42.283 4830-4830/com.mydomain.myapp D/MainActivity: onAuthStateChanged:signed_out
03-10 14:25:42.314 4830-5250/com.mydomain.myapp I/OpenGLRenderer: Initialized EGL, version 1.4
03-10 14:25:42.314 4830-5250/com.mydomain.myapp W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
03-10 14:25:42.434 4830-4870/com.mydomain.myapp V/FA: Screen exposed for less than 1000 ms. Event not sent. time: 469
03-10 14:25:42.435 4830-4870/com.mydomain.myapp V/FA: Using measurement service
03-10 14:25:42.435 4830-4870/com.mydomain.myapp V/FA: Connection attempt already in progress
03-10 14:25:42.436 4830-4870/com.mydomain.myapp V/FA: Activity paused, time: 4314214
03-10 14:25:42.457 4830-4870/com.mydomain.myapp D/FA: Connected to remote service
03-10 14:25:42.457 4830-4870/com.mydomain.myapp V/FA: Processing queued up service tasks: 2
03-10 14:25:42.526 4830-4830/com.mydomain.myapp W/art: Before Android 4.1, method int android.support.v7.widget.ListViewCompat.lookForSelectablePosition(int, boolean) would have incorrectly overridden the package-private method in android.widget.ListView
03-10 14:25:42.640 4830-5250/com.mydomain.myapp E/Surface: getSlotFromBufferLocked: unknown buffer: 0x7effa40972a0
First thing, on the original computer on which this project last worked, try a gradle 'clean' and then a build. If that doesn't work, it probably means that you changed the code since it last worked. Try to figure out what you changed, and undo that.
Second, AsyncTask is the source of a lot of headaches (and crashes), because it holds a reference to the Activity from which it was started, but is not part of the Activity's lifecycle, so can operate on the Activity after the Activity has been destroyed. My suggestion - don't use AsyncTask - regardless of what you are using it for, there is almost always a better way. Post your stacktrace here, and we might be able to help you figure out what the problem is.
As far as sharing code, use a version control system. GitHub is good, and it's free. Proper use of it would also let you easily roll your code back to the point where it last worked.
=====
Ok, so looking at the stacktrace that you posted from your logcat, we see:
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{36fd80a 4830:com.mydomain.myapp/u0a17} (pid=4830, uid=10017) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
So, it looks like you are attempting to access the ContactsProvider, but haven't put the READ_CONTACTS permission in your manifest.

Use OkHttp to upload file but occur java.lang.IllegalStateException : closed at okio.RealBufferedSink.write(RealBufferedSink.java:44)

The issue is what the title said. It only occur sometimes and some phone. Hear is the log that I caught.
java.lang.IllegalStateException
closed
okio.RealBufferedSink.write(RealBufferedSink.java:44)
okio.ForwardingSink.write(ForwardingSink.java:35)
com.******.******.network.UploadRequestBody$1.write(UploadRequestBody.java:75)
okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:176)
okio.RealBufferedSink.writeAll(RealBufferedSink.java:104)
com.squareup.okhttp.RequestBody$3.writeTo(RequestBody.java:118)
com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeOrCountBytes(MultipartBuilder.java:277)
com.squareup.okhttp.MultipartBuilder$MultipartRequestBody.writeTo(MultipartBuilder.java:297)
com.******.******.network.UploadRequestBody.writeTo(UploadRequestBody.java:59)
com.squareup.okhttp.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:718)
com.squareup.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:576)
com.squareup.okhttp.Call.getResponse(Call.java:287)
com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
com.squareup.okhttp.Call.access$100(Call.java:35)
com.squareup.okhttp.Call$AsyncCall.execute(Call.java:171)
com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
java.lang.Thread.run(Thread.java:848)
Would you mind helping me and telling how to avoid it?
I find this at github issue
You can only call response.body().string() once.

Categories

Resources