Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App isn't opening and crashes #21

Closed
NikunjKhangwal opened this issue Dec 17, 2023 · 8 comments
Closed

App isn't opening and crashes #21

NikunjKhangwal opened this issue Dec 17, 2023 · 8 comments

Comments

@NikunjKhangwal
Copy link

The app isn't opening all of a sudden. It was working fine a few days ago. Is just started to happen randomly.
Here's the crash log:

FATAL EXCEPTION: main
Process: io.github.teccheck.fastlyrics, PID: 27610
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.teccheck.fastlyrics/io.github.teccheck.fastlyrics.MainActivity}: android.view.InflateException: Binary XML file line #15 in io.github.teccheck.fastlyrics:layout/activity_main: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3780)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3947)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:106)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8280)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
Caused by: android.view.InflateException: Binary XML file line #15 in io.github.teccheck.fastlyrics:layout/activity_main: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
Caused by: java.lang.NullPointerException: title must not be null
at io.github.teccheck.fastlyrics.api.MediaSession.getSongMeta(MediaSession.kt:62)
at io.github.teccheck.fastlyrics.api.MediaSession.getSongInformation(MediaSession.kt:23)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsViewModel.loadLyricsForCurrentSong(FastLyricsViewModel.kt:44)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsFragment.loadLyricsForCurrentSong(FastLyricsFragment.kt:87)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsFragment.onCreateView(FastLyricsFragment.kt:69)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3104)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:524)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1433)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2977)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2888)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3129)
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:394)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:136)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:248)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:227)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1111)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1024)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:988)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1167)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1128)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1311)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1163)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1128)
at android.view.LayoutInflater.inflate(LayoutInflater.java:709)
at android.view.LayoutInflater.inflate(LayoutInflater.java:547)
at io.github.teccheck.fastlyrics.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:53)
at io.github.teccheck.fastlyrics.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:47)
at io.github.teccheck.fastlyrics.MainActivity.onCreate(MainActivity.kt:36)
at android.app.Activity.performCreate(Activity.java:8163)
at android.app.Activity.performCreate(Activity.java:8130)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3753)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3947)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:106)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2325)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8280)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)

@TecCheck
Copy link
Owner

TecCheck commented Dec 17, 2023

Thanks for the bug report. I think I have fixed this bug, but the fix is not released yet

EDIT: The app crashes because it can't find a title for the song that's "playing". This is because sometimes Android reports weird information. The app should open if you have a song playing

@NikunjKhangwal
Copy link
Author

Yup. Just checked and that was exactly the cause. Thanks for the clarification. I think i'll leave the issue open until the next release.

@NikunjKhangwal
Copy link
Author

Hello! The app isn't opening on fresh install of version 0.5.0 however it's working fine when i install 0.5.0 from github release directly over 0.4.0 from f-droid. Also the synced lyrics aren't working.

Crash log

FATAL EXCEPTION: main
Process: io.github.teccheck.fastlyrics, PID: 21440
java.lang.RuntimeException: Unable to create application io.github.teccheck.fastlyrics.FastLyricsApp: java.lang.SecurityException: Missing permission to control media.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7100)
at android.app.ActivityThread.access$1700(ActivityThread.java:275)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2168)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8280)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073)
Caused by: java.lang.SecurityException: Missing permission to control media.
at android.os.Parcel.createExceptionOrNull(Parcel.java:2425)
at android.os.Parcel.createException(Parcel.java:2409)
at android.os.Parcel.readException(Parcel.java:2392)
at android.os.Parcel.readException(Parcel.java:2334)
at android.media.session.ISessionManager$Stub$Proxy.addSessionsListener(ISessionManager.java:986)
at android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener(MediaSessionManager.java:381)
at android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener(MediaSessionManager.java:329)
at android.media.session.MediaSessionManager.addOnActiveSessionsChangedListener(MediaSessionManager.java:310)
at io.github.teccheck.fastlyrics.api.MediaSession.init(MediaSession.kt:33)
at io.github.teccheck.fastlyrics.FastLyricsApp.onCreate(FastLyricsApp.kt:12)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1211)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7094)
... 9 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.media.MediaSessionService.enforceMediaPermissions(MediaSessionService.java:615)
at com.android.server.media.MediaSessionService.access$4100(MediaSessionService.java:106)
at com.android.server.media.MediaSessionService$SessionManagerImpl.verifySessionsRequest(MediaSessionService.java:2113)
at com.android.server.media.MediaSessionService$SessionManagerImpl.addSessionsListener(MediaSessionService.java:1321)
at android.media.session.ISessionManager$Stub.onTransact(ISessionManager.java:475)

@TecCheck
Copy link
Owner

Made a new patch release. Does it work now?

@NikunjKhangwal
Copy link
Author

The crash is gone now, thanks for the quick fix. Synced lyrics still doesn't seem to be working unless I'm doing something wrong. Another issue I'm facing is the app sometimes gets stuck on the first song it fetched. When i switch songs and try to refresh it shows the new song for a second but goes back to previous song lyrics instantly.

@TecCheck
Copy link
Owner

Ok thanks. The bug(s) you described, are tracked in #23

@NikunjKhangwal
Copy link
Author

Btw do you have plans of porting other features from QuickLyric? Like Floating window and keeping screen on?

@TecCheck
Copy link
Owner

TecCheck commented Feb 2, 2024

Not yet, but keeping screen on seems like a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants