Autocomplete TextView Illegal State Exception on typing Roads - android

Basically the app I work on is for people in Saudi Arabia. It can search location in any language.
I'm trying location خاورمیانه, Road No 1018, Hidd, Bahrain text in autocompletetextview but I get the IllegalStateExceptionbut exception below.
Here is the error log exception:
06-27 10:49:45.232 10440-10440/jaja.blackbean E/AndroidRuntime: FATAL EXCEPTION: main
Process: jaja.blackbean, PID: 10440
java.lang.IllegalStateException
at com.google.android.gms.common.internal.zzac.zzar(Unknown Source)
at com.google.android.gms.common.data.zzc.zzcA(Unknown Source)
at com.google.android.gms.common.data.zzc.<init>(Unknown Source)
at com.google.android.gms.location.places.internal.zzab.<init>(Unknown Source)
at com.google.android.gms.location.places.internal.zzy.<init>(Unknown Source)
at com.google.android.gms.location.places.PlaceBuffer.get(Unknown Source)
at jaja.blackbean.activity.FruitJuiceFragment$6.onResult(FruitJuiceFragment.java:463)
at jaja.blackbean.activity.FruitJuiceFragment$6.onResult(FruitJuiceFragment.java:452)
at com.google.android.gms.internal.zzzx$zza.zzb(Unknown Source)
at com.google.android.gms.internal.zzzx$zza.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

It's hard to tell for sure without more info on exactly what your app is doing, but this error could be caused by calling PlaceBuffer.get() with an out-of-range index (either < 0 or >= size).

Related

Fatal Exception: java.lang.IndexOutOfBoundsException

I used Faric to count my app crashes. In recent versions, I have a strange bug. Is this caused by the addition of a third-party webview? Has anyone encountered this situation, please help me, here is Some logs:
Fatal Exception: java.lang.IndexOutOfBoundsException: getChars (87 ... 99) ends beyond length 90
at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1018)
at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:915)
at android.text.TextUtils.getChars(TextUtils.java:86)
at android.text.SpannableStringBuilder.(SpannableStringBuilder.java:64)
at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:907)
at org.chromium.content.browser.input.ReplicaInputConnection.setComposingRegion(Unknown Source)
at com.android.internal.view.IInputConnectionWrapper.executeMessage(IInputConnectionWrapper.java:349)
at com.android.internal.view.IInputConnectionWrapper$MyHandler.handleMessage(IInputConnectionWrapper.java:78)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5276)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:911)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:706)

Firebase real-time database error in Android Studio

This error happens when I click the category from which I expect to see all the categories from firebase where I put all the category names and pictures. I am a beginner of Android studio and not many solved issues can be found in the search on Google.
04-07 18:35:13.271 25281-25281/com.example.a2015015407.edenparkproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.a2015015407.edenparkproject, PID: 25281
com.google.firebase.database.DatabaseException: Invalid Firebase Database url specified
at com.google.android.gms.internal.zzepd.zzqj(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.a2015015407.edenparkproject.CategoryFragment.onCreate(CategoryFragment.java:41)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2328)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1379)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1188)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:1071)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:115)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2379)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:702)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: java.net.URISyntaxException: Invalid scheme specified: Category
at com.google.android.gms.internal.zzepd.zzqj(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source)
at com.example.a2015015407.edenparkproject.CategoryFragment.onCreate(CategoryFragment.java:41)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2328)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1379)
at android.support.v4.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1188)
at android.support.v4.app.FragmentTransition.calculateFragments(FragmentTransition.java:1071)
at android.support.v4.app.FragmentTransition.startTransitions(FragmentTransition.java:115)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2379)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2337)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2244)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:702)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
From the error message, it looks like you're initializing Firebase with an invalid URL:
Invalid Firebase Database url specified
My guess is that you're calling getReferenceFromUrl("some/path"). To get a reference, instead call FirebaseDatabase.getInstance().getReference("some/path") as shown in the getting started page of the documentation.
Update: it looks like you need:
FirebaseDatabase.getInstance().getReference("Category")

Google Cast crash on stop casting

My custom sender application is crashing whenever I'm clicking 'STOP CASTING' on the cast-options menu in the app. The error I'm getting is:
java.lang.NullPointerException: Attempt to write to field 'java.lang.ref.WeakReference android.support.v4.media.session.MediaSessionCompat$Callback.mSessionImpl' on a null object reference
at android.support.v4.media.session.MediaSessionCompat$MediaSessionImplApi21.setCallback(MediaSessionCompat.java:2305)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:267)
at android.support.v4.media.session.MediaSessionCompat.setCallback(MediaSessionCompat.java:255)
at com.google.android.gms.internal.zznv.zzen(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zzei(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.zza(Unknown Source)
at com.google.android.gms.cast.framework.CastSession$zzb.zzei(Unknown Source)
at com.google.android.gms.cast.framework.zzf$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at zv.a(:com.google.android.gms.DynamiteModulesC:199)
at zl.a(:com.google.android.gms.DynamiteModulesC:128)
at aaa.onTransact(:com.google.android.gms.DynamiteModulesC:122)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.cast.framework.zzh$zza$zza.zzb(Unknown Source)
at com.google.android.gms.cast.framework.CastSession.end(Unknown Source)
at com.google.android.gms.cast.framework.Session$zza.end(Unknown Source)
at com.google.android.gms.cast.framework.zzq$zza.onTransact(Unknown Source)
at android.os.Binder.transact(Binder.java:387)
at abc.a(:com.google.android.gms.DynamiteModulesC:216)
at abk.a(:com.google.android.gms.DynamiteModulesC:303)
at acg.a(:com.google.android.gms.DynamiteModulesC:70)
at acg.e(:com.google.android.gms.DynamiteModulesC:38)
at acd.onTransact(:com.google.android.gms.DynamiteModulesC:126)
at android.os.Binder.transact(Binder.java:387)
at com.google.android.gms.internal.zznn$zza$zza.zzg(Unknown Source)
at com.google.android.gms.internal.zznq.onRouteUnselected(Unknown Source)
at android.support.v7.media.MediaRouter$Callback.onRouteUnselected(MediaRouter.java:1787)
at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.invokeCallback(MediaRouter.java:2999)
at android.support.v7.media.MediaRouter$GlobalMediaRouter$CallbackHandler.handleMessage(MediaRouter.java:2946)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
and I can't seem to find anyone with this error. I've followed https://github.com/googlecast/CastHelloText-android/ to the point. I will post the full activity here if it's wanted.
I've found answer on google issue tracking system on https://issuetracker.google.com/issues/37129745
In short, update v7 supprt library to 25.1.1

multiple JSON fields named exception in “RELEASE” build mode only

This is weird but serialization is done perfectly fine in DEBUG build mode as well as in all of the API responses except one. But in release mode, it's throwing illegal argument exception.
Here is the complete log for this exception:
FATAL EXCEPTION: main Process: com.example.sampleapp, PID: 30480 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sampleapp/com.example.sampleapp.activity.ManageStoreActivity}: java.lang.IllegalArgumentException: Unable to create converter for class com.example.sampleapp.model.seller.SellerStoreFormData
for method ApiInterface.getSellerInfoData
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.IllegalArgumentException: Unable to create converter for class com.example.sampleapp.model.seller.SellerStoreFormData
for method ApiInterface.getSellerInfoData
at retrofit2.ServiceMethod$Builder.methodError(Unknown Source)
at retrofit2.ServiceMethod$Builder.createResponseConverter(Unknown Source)
at retrofit2.ServiceMethod$Builder.build(Unknown Source)
at retrofit2.Retrofit.loadServiceMethod(Unknown Source)
at retrofit2.Retrofit$1.invoke(Unknown Source)
at java.lang.reflect.Proxy.invoke(Proxy.java:393)
at $Proxy0.getSellerInfoData(Unknown Source)
at com.example.sampleapp.connection.a.i(Unknown Source)
at com.example.sampleapp.activity.ManageStoreActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
at android.app.Activity.performStart(Activity.java:6253)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
... 9 more
Caused by: java.lang.IllegalArgumentException: class com.example.sampleapp.model.seller.SellerStoreFormData declares multiple JSON fields named f
at com.google.a.b.a.i.a(Unknown Source)
at com.google.a.b.a.i.a(Unknown Source)
at com.google.a.e.a(Unknown Source)
at retrofit2.converter.gson.GsonConverterFactory.responseBodyConverter(Unknown Source)
at retrofit2.Retrofit.nextResponseBodyConverter(Unknown Source)
at retrofit2.Retrofit.responseBodyConverter(Unknown Source)
... 20 more
What I have tried so far ?
I have tried and looked for multiple JSON fields in same and parent
class but didn't find any.
Checked that the #SerializedName is different for each field.
I also have proguard enabled in release mode.
It was working fine earlier (without enabling proguard) and I was not getting any compile time error.
If debug mode is working and release is the problem most chances is that's a proguard issue.
Try excluding SellerStoreFormData from obfuscation.
Also, check if you have proguard Gson configuration in place and if not add it.

ProGuard causing Jackson error, "Conflicting property name definitions"

I am using the Nest Android SDK and am getting close to releasing my application. I have found that it is not possible to use Proguard with the Nest SDK as it stands today. Once a user is authenticated, the data that comes back causes the crash below.
How can I get passed this, and still keep ProGuard enabled? I created an issue on the github page but I assume it will not be a high priority by Nest.
09-06 23:49:32.807 15229-15229/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: <my_package>, PID: 15229
java.lang.IllegalStateException: Conflicting property name definitions: 'locale' (for [field com.nestlabs.sdk.Device#b]) vs 'name' (for [method com.nestlabs.sdk.Device#b(0 params)])
at com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.findRenamed(Unknown Source)
at com.fasterxml.jackson.databind.introspect.POJOPropertyBuilder.findNewName(Unknown Source)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._renameProperties(Unknown Source)
at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(Unknown Source)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(Unknown Source)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(Unknown Source)
at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forDeserialization(Unknown Source)
at com.fasterxml.jackson.databind.DeserializationConfig.introspect(Unknown Source)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(Unknown Source)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(Unknown Source)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(Unknown Source)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(Unknown Source)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(Unknown Source)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(Unknown Source)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(Unknown Source)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(Unknown Source)
at com.firebase.client.d.a(Unknown Source)
at com.nestlabs.sdk.aa.a(Unknown Source)
at com.firebase.client.c.ba.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Categories

Resources