App Lounge crashes when searching for "signal"

I’m using an emulator build (v1-r) of /e/OS (see here) and I am having an issue with the App Lounge that keeps on crashing when I search for the string signal. I am using App Lounge in anonymous mode.

It seems to work for other strings, but not all (it also crashes when searching for whats).

I’ve also tried building other r tags as suggested here, for example v1.13-t, but to no avail. Same issue occurs.

I’ve attached the adb logcat to it. This is the error that I see:

07-31 21:05:38.981  3812  3812 E AndroidRuntime: Process: foundation.e.apps, PID: 3812
07-31 21:05:38.981  3812  3812 E AndroidRuntime: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.data.exodus.repositories.AppPrivacyInfoRepositoryImpl.getAppPrivacyInfo(AppPrivacyInfoRepositoryImpl.kt:54)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.PrivacyInfoViewModel.fetchEmitAppPrivacyInfo(PrivacyInfoViewModel.kt:30)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.PrivacyInfoViewModel.access$fetchEmitAppPrivacyInfo(PrivacyInfoViewModel.kt:14)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.PrivacyInfoViewModel$getAppPrivacyInfoLiveData$1.invokeSuspend(PrivacyInfoViewModel.kt:22)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.PrivacyInfoViewModel$getAppPrivacyInfoLiveData$1.invoke(Unknown Source:8)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.PrivacyInfoViewModel$getAppPrivacyInfoLiveData$1.invoke(Unknown Source:4)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.BlockRunner$maybeRun$1.invokeSuspend(CoroutineLiveData.kt:177)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.BlockRunner.maybeRun(CoroutineLiveData.kt:175)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.CoroutineLiveData.onActive(CoroutineLiveData.kt:241)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LiveData.changeActiveCounter(LiveData.java:405)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LiveData$ObserverWrapper.activeStateChanged(LiveData.java:481)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged(LiveData.java:440)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.kt:314)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.kt:192)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.lifecycle.LiveData.observe(LiveData.java:205)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.applicationlist.ApplicationListRVAdapter.showPrivacyScoreAfterFetching(ApplicationListRVAdapter.kt:384)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.applicationlist.ApplicationListRVAdapter.showCalculatedPrivacyScoreData(ApplicationListRVAdapter.kt:362)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.applicationlist.ApplicationListRVAdapter.onBindViewHolder(ApplicationListRVAdapter.kt:144)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at foundation.e.apps.ui.applicationlist.ApplicationListRVAdapter.onBindViewHolder(ApplicationListRVAdapter.kt:57)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7337)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6194)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6460)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6300)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6296)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2330)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1631)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1591)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:668)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4309)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4012)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4578)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at androidx.constraintlayout.widget.ConstraintLayout.onLayout(ConstraintLayout.java:1873)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at com.android.internal.policy.DecorView.onLayout(DecorView.java:784)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.View.layout(View.java:22844)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewGroup.layout(ViewGroup.java:6389)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3475)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2943)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1948)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8177)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.Choreographer.doCallbacks(Choreographer.java:796)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.Choreographer.doFrame(Choreographer.java:731)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:223)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7664)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
07-31 21:05:38.981  3812  3812 E AndroidRuntime: 	Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@57c59a3, Dispatchers.Main.immediate]

How could I address this issue?

It seems like disabling showing the open source apps solves this issue:

  1. you could debug why the “String cannot be cast to Collection” ClassCastException occurs in that function. Maybe the tracker / exodus apppinfo for the opensource apps have an unexpected response. That info is dynamic imo
  2. use a different lfs repo commit hash in the build manifest to use one version prior of the AppLounge apk just to sanity test
1 Like

Re 1, I believe it would be beneficial to write the code defensively such that a single unexpected app info does not crash the entire app.

I could provoke app fatals in v1.13 (applounge 2.5.7) when searching while disabling/enabling app types (common, opensource, pwa). But the stacktraces didn’t have the ClassCastException as yours had, but a InvalidProtocolBufferException in the protobuf library.

Can you reproduce your error in v1.14 and its applounge 2.5.9 ?

I’ve just tested with AppLounge 2.6.0, but in v1.13 - anyway I think the e/OS/ version should not be relevant here as the app itself could/should prevent from crashing by just checking the output.

My search string was “signal” with all app sources enabled.

As a test, I just modified the AppLounge to try ... catch the getAppPrivacyInfo() method and that fixed my initial problem.

Then I got to the InvalidProtocolBufferException and hacked it to see if that temporarily fixes it:

fun getSearchResults(query: String, authData: AuthData, lifecycleOwner: LifecycleOwner) {
        viewModelScope.launch(Dispatchers.Main) {
            searchResultLiveData.removeObservers(lifecycleOwner)
            searchResultLiveData = fusedAPIRepository.getSearchResults(query, authData)
            searchResultLiveData.observe(lifecycleOwner) {
                searchResult.postValue(it)

                /*
                if (!it.isSuccess()) {
                    val exception =
                        if (authData.aasToken.isNotBlank() || authData.authToken.isNotBlank()) {
                            GPlayException(
                                it.isTimeout(),
                                it.message.ifBlank { "Data load error9" }
                            )
                        } else {
                            CleanApkException(
                                it.isTimeout(),
                                it.message.ifBlank { "Data load error10" }
                            )
                        }

                    exceptionsList.add(exception)
                    exceptionsLiveData.postValue(exceptionsList)
                }
                */
            }
        }
    }

I.E: I just commented out the handling of the failure. This “solves” the crash.

The problem is probably again with one app, but that should not crash the entire AppLounge imo.

Hope this helps! Let me know if I can do more!

This topic was automatically closed after 90 days. New replies are no longer allowed.