haroldadmin / WhatTheStack

See a pretty error screen when your Android app crashes
Apache License 2.0
245 stars 22 forks source link

Crash when using newer systemuicontroller dependency #33

Open fvito opened 1 year ago

fvito commented 1 year ago

Hello

If target app is using newer version of systemuicontroller from accompanist (anything newer than 0.24.0), then Whats The Stack screen crashes with the following stack trace

Process: com.haroldadmin.crashyapp:what_the_stack_process, PID: 9954
java.lang.NoSuchMethodError: No static method rememberSystemUiController(Landroidx/compose/runtime/Composer;I)Lcom/google/accompanist/systemuicontroller/SystemUiController; in class Lcom/google/accompanist/systemuicontroller/SystemUiControllerKt; or its super classes (declaration of 'com.google.accompanist.systemuicontroller.SystemUiControllerKt' appears in /data/app/~~_4awURteYBFPZaFNkqrgiA==/com.haroldadmin.crashyapp-qVRDMtt8OFur9dGDn3-XHQ==/base.apk)
       at com.haroldadmin.whatthestack.WhatTheStackActivity$onCreate$1.invoke(WhatTheStackActivity.kt:28)
       at com.haroldadmin.whatthestack.WhatTheStackActivity$onCreate$1.invoke(WhatTheStackActivity.kt:27)

It looks like in version 0.25.0 the rememberSystemUiController function signature changed as seen here. It now takes an additional param of a Window, which I think breaks binary compatibility (even though a default is used in the accompanist library)

I think a simple version bump of the dependencies of this library should be enough to fix this issue. I can open a PR if necessary

haroldadmin commented 1 year ago

Happy to accept a PR for it! Thank you for investigating the issue.

fvito commented 1 year ago

Thank you, I've opened a PR