microg / GmsCore

Free implementation of Play Services
https://microg.org
Apache License 2.0
8.69k stars 1.73k forks source link

[Bug] GmsCore crashes upon starting #2494

Closed 813ethan closed 3 months ago

813ethan commented 3 months ago

Describe the bug GmsCore crashes upon starting

only happening on recent build of Evolution X in Redmi Note 12 Turbo/Poco F5, never happened before

original issue: https://github.com/ReVanced/GmsCore/issues/146

To Reproduce Steps to reproduce the behavior:

  1. Install Evolution X 17/08 build in Redmi Note 12 Turbo/Poco F5
  2. Launch gmscore

Expected behavior GmsCore settings would appear instead of the app crashing

Screenshots If applicable, add screenshots to help explain your problem.

System Android Version: 14 Custom ROM: Evolution X 9.3 Aug 17 build (Poco F5/Redmi Note 12 Turbo)

Additional context logs: changed the package name to com.google.android.gmsn such that it could run on device

time: 1723911410258
msg: java.lang.IllegalArgumentException: Cursor for query content://com.google.android.gmsn.microg.settings/exposureNotification [exposure_scanner_enabled] was null
stacktrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gmsn/org.microg.gms.ui.MainSettingsActivity}: android.view.InflateException: Binary XML file line #46 in com.google.android.gmsn:layout/settings_root_activity: Binary XML file line #46 in com.google.android.gmsn:layout/settings_root_activity: Error inflating class androidx.fragment.app.FragmentContainerView
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3993)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4173)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114)
    at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:231)
    at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:152)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
Caused by: android.view.InflateException: Binary XML file line #46 in com.google.android.gmsn:layout/settings_root_activity: Binary XML file line #46 in com.google.android.gmsn:layout/settings_root_activity: Error inflating class androidx.fragment.app.FragmentContainerView
Caused by: android.view.InflateException: Binary XML file line #46 in com.google.android.gmsn:layout/settings_root_activity: Error inflating class androidx.fragment.app.FragmentContainerView
Caused by: java.lang.IllegalArgumentException: Cursor for query content://com.google.android.gmsn.microg.settings/exposureNotification [exposure_scanner_enabled] was null
    at org.microg.gms.settings.SettingsContract$getSettings$1.invoke(SettingsContract.kt:212)
    at org.microg.gms.settings.SettingsContract.withoutCallingIdentity(SettingsContract.kt:202)
    at org.microg.gms.settings.SettingsContract.getSettings(SettingsContract.kt:209)
    at org.microg.gms.nearby.exposurenotification.ExposurePreferences.getEnabled(ExposurePreferences.kt:19)
    at org.microg.gms.nearby.exposurenotification.ui.ExposureNotificationsSettingsProvider.getEntriesStatic(ExposureNotificationsSettingsProvider.kt:27)
    at org.microg.gms.ui.SettingsFragment.onCreatePreferences(SettingsFragment.kt:63)
    at androidx.preference.PreferenceFragmentCompat.onCreate(PreferenceFragmentCompat.java:161)
    at androidx.fragment.app.Fragment.performCreate(Fragment.java:3094)
    at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:504)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:268)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1943)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1845)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1782)
    at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3042)
    at androidx.fragment.app.FragmentManager.dispatchCreate(FragmentManager.java:2941)
    at androidx.fragment.app.Fragment.onCreate(Fragment.java:1969)
    at androidx.navigation.fragment.NavHostFragment.onCreate(NavHostFragment.kt:163)
    at androidx.fragment.app.Fragment.performCreate(Fragment.java:3094)
    at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:504)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:268)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1943)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1845)
    at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1751)
    at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:323)
    at androidx.fragment.app.FragmentContainerView.<init>(FragmentContainerView.kt:163)
    at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:53)
    at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:136)
    at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:247)
    at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:226)
    at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:957)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:885)
    at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:849)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1011)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:972)
    at android.view.LayoutInflater.rInflate(LayoutInflater.java:1014)
    at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:972)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:570)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:462)
    at android.view.LayoutInflater.inflate(LayoutInflater.java:413)
    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:775)
    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
    at org.microg.gms.ui.MainSettingsActivity.onCreate(MainSettingsActivity.java:36)
    at android.app.Activity.performCreate(Activity.java:8960)
    at android.app.Activity.performCreate(Activity.java:8938)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1536)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3975)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4173)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:114)
    at android.app.servertransaction.TransactionExecutor.executeNonLifecycleItem(TransactionExecutor.java:231)
    at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:152)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
JustRandomboy commented 3 months ago

https://github.com/user-attachments/assets/e5881cef-0ee6-4ff5-b159-c75cd99c7e7d

joeyhuab commented 3 months ago

This has been resolved in a hotfix build. Kindly close the issue.