LawnchairLauncher / lawnchair

No clever tagline needed.
https://lawnchair.app
Other
10.01k stars 1.28k forks source link

[BUG] Latest nightly crashes on boot #5337

Closed Wierius799 closed 6 days ago

Wierius799 commented 1 week ago

Describe the bug

Latest nightly crashing on launch, here's the log.

text.txt

Steps to reproduce

Steps to reproduce the behavior:

Try to launch the app Fail :(

Expected behavior

Launch as usual.

Screenshots

Image

Device information

Additional context

No response

Wierius799 commented 1 week ago

Edit: Also tested with Android 16 beta 3, same results

Wierius799 commented 1 week ago

Latest nightly is also crashing: Lawnchair.Debug.15-dev.Nightly-CI_2087-68722c2.apk

Lost-Saint commented 1 week ago

Same here

elisenlebkuch commented 1 week ago

Me too

lowrider05 commented 1 week ago

Crashes on Redmagic 10 pro too.

pbanj commented 1 week ago

https://paste.evolution-x.org/2oi0vQ Crashing on A14 https://paste.evolution-x.org/GSWhuq Here is the log when trying to view recents.

pedrom34 commented 1 week ago

Latest non-crashing version for me is this one https://www.apkmirror.com/apk/lawnchair/lawnchair-nightly/lawnchair-nightly-15-dev-2078-release/lawnchair-nightly-15-dev-2078-android-apk-download/

Impasse52 commented 1 week ago

Same here, had to delete storage then restore from backup to get it running.

Zoran181 commented 1 week ago

It works for me on Galaxy A12 with Android 12 and OneUI 4.1.

Wierius799 commented 1 week ago

2089 still crashing on me (haven't had time to test from clean yet)

Zoran181 commented 1 week ago

2089 still crashing on me (haven't had time to test from clean yet)

I am still on 2087.

Simthem commented 1 week ago

Yes, crashes seems again to be caused by this file : lawnchair/src/app/lawnchair/ui/preferences/data/liveinfo/model/LiveInformation.kt With "features" variables ..

wlrmarl commented 1 week ago

The LiveInformation class expects a non-null features field during deserialization, but the incoming data lacks this field. This crashes the app when parsing older data formats or incomplete responses.

Kotlinx Serialization requires fields marked as non-optional (no default value) to be present in the input data. The features and announcements fields were missing defaults, causing deserialization failures.

To Fix the Issue we need to assign a default field to features, from the code I saw at this file:-

lawnchair/src/app/lawnchair/ui/preferences/data/liveinfo/model/LiveInformation.kt.

The companion object has the empty field but by default kotlin doesnt use companion object it uses contructor one so the fix is to assign default values i think announcement should also have default value too.

So fix is (Also simplyfing how companion object is generated)

@Serializable
data class LiveInformation(
    private val version: Int = 2,
    val announcements: List<Announcement> = emptyList(),                // Default empty list
    val features: Map<String, String?> = emptyMap(),                    // Default empty map
) {
    companion object {
        val default = LiveInformation()                                                // Simplified
    }
}

This is the Fix.

Thanks

wlrmarl commented 1 week ago

Download fixed debug apk from CI/CD Pipeline githubs action workflow here:- https://github.com/LawnchairLauncher/lawnchair/actions/runs/13920148445

Wierius799 commented 1 week ago

Ty! Tested the debug apk and it's working perfectly now, let's hope this gets implemented soon :D

Wierius799 commented 6 days ago

Just to keep records, 2095 crashes on launch too. 🫡

Pauloesfola commented 6 days ago

The build 2095 keep crashing on Pixel 7a when update from build 2078.

One clean install resolves the problem.