UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Music app

    Scheduled Pinned Locked Moved Solved Support
    12 Posts 3 Posters 650 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
      Reply
      • Reply as topic
      Log in to reply
      This topic has been deleted. Only users with topic management privileges can see it.
      • mihaelM Offline
        mihael
        last edited by

        I have this error in the Music app: it plays a track only if it is added to a playlist, but if I list all the tracks and I click on one of them the app exists...

        Does anybody know what's wrong? And many thanks in advance!

        5T, OTA 4 (stable), focal

        1 Reply Last reply Reply Quote 0
        • W Online
          wally
          last edited by

          Hi. I have a Oneplus 5T on the last xenial update and a Oneplus 5 on focal, OTA 4. I just tested with both, and I can't reproduce this error. It plays from playlists, or if I just click on a track listed under Tracks, Albums, etc.
          I don't have the expertise to have useful ideas how to help. But I thought this could be useful information.
          Hope you're able to figure out the issue. Good luck!

          1 Reply Last reply Reply Quote 0
          • mihaelM Offline
            mihael
            last edited by

            Thanks for your reply. Yes, I know it is not a common issue as I never did a clean install with wipe option but instead I upgraded from Xenial and I kept all my apps / settings / etc so I might have some skeletons left 🙂

            As a last resort I will do a clean install with wipe as I also have other things not working... But I thought just to try to see if I can fix it first.

            K 1 Reply Last reply Reply Quote 0
            • K Offline
              kugiigi @mihael
              last edited by

              @mihael Have you checked the log with Log Viewer?

              mihaelM 1 Reply Last reply Reply Quote 0
              • mihaelM Offline
                mihael @kugiigi
                last edited by

                @kugiigi Yes, I can't find anything helpful...

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  kugiigi @mihael
                  last edited by

                  @mihael Weird. It should at least log something when it failed to play 🤔

                  mihaelM 1 Reply Last reply Reply Quote 0
                  • mihaelM Offline
                    mihael @kugiigi
                    last edited by mihael

                    @kugiigi Ok, this is what the log says when the app crashes:

                    [2/14/24 11:02 PM] ** Application is now active
                    [2/14/24 11:02 PM] TrackListReset signal received
                    [2/14/24 11:02 PM] Tracklist was cleared, resetting m_currentIndex to 0
                    [2/14/24 11:02 PM] qml: *** Saving play queue in onItemRemoved
                    [2/14/24 11:02 PM] terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
                    [2/14/24 11:02 PM]   what():  filesystem error: directory iterator cannot open directory: Permission denied [/home/phablet/Videos/]
                    

                    and from journalctl:

                    Feb 14 23:02:20 ubuntu-phablet aa-exec[45318]: qml: *** Saving play queue in onItemRemoved
                    Feb 14 23:02:20 ubuntu-phablet audit[45318]: AVC apparmor="DENIED" operation="open" profile="music.ubports_music_3.0.3" name="/home/phablet/Videos/" pid=45318 comm="qmlscene" requested_mask="r" denied_mask="r" fsuid=32011 ouid=32011
                    Feb 14 23:02:20 ubuntu-phablet kernel: [20240214_21:02:20.529144]@2 audit: type=1400 audit(1707944540.525:794): apparmor="DENIED" operation="open" profile="music.ubports_music_3.0.3" name="/home/phablet/Videos/" pid=45318 comm="qmlscene" requested_mask="r" denied_mask="r" fsuid=32011 ouid=32011
                    Feb 14 23:02:20 ubuntu-phablet aa-exec[45318]: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
                    Feb 14 23:02:20 ubuntu-phablet aa-exec[45318]:   what():  filesystem error: directory iterator cannot open directory: Permission denied [/home/phablet/Videos/]
                    
                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      kugiigi @mihael
                      last edited by

                      @mihael Weird, why does it complain about the Videos directory. Does it happen to any music or only specific ones? Like they will only play if you play them from a playlist?

                      mihaelM 1 Reply Last reply Reply Quote 0
                      • mihaelM Offline
                        mihael @kugiigi
                        last edited by

                        @kugiigi Yes, it's weird and yes, it happens to any track unless it is added to a playlist.

                        Another detail (I don't know if it's important or if it only happens to me): when I go to File Manager and open an .mp3 file with Music App, it plays it but also it doubles the entry for that track in the tracks list. After that initial playing of the track, it's the same behaviour: the app exits when I choose to play any of the two instances of the track.

                        K 1 Reply Last reply Reply Quote 1
                        • K Offline
                          kugiigi @mihael
                          last edited by

                          @mihael It could be a problem with mediascanner too 🤔 I think the duplication is expected though since if you open a file from file manager, you're importing it so it's copied to the import directory. If you know how, you can inspect the mediascanner database at ~/.cache/mediascanner-2.0. Maybe you can see irregularities there.

                          mihaelM 1 Reply Last reply Reply Quote 0
                          • mihaelM Offline
                            mihael @kugiigi
                            last edited by

                            @kugiigi I deleted (with a backup first) ~/.cache/mediascanner-2.0/mediastore.db and then, after restart, I had a smaller .db to look into and there I saw two files in the ~/Videos folder and one of them was a .aac file - an audio file. As soon as I moved it in the ~/Music folder the Music app started working again (playing tracks not added to a playlist).

                            Thank you again for all the support and pointing me in the right direction.

                            This was an interesting one!

                            K 1 Reply Last reply Reply Quote 1
                            • mihaelM mihael has marked this topic as solved on
                            • K Offline
                              kugiigi @mihael
                              last edited by

                              @mihael Wow, then I guess this should be logged as an issue in Gitlab. Music files shouldn't be scanned from Videos directory since the Music app doesn't have access to it

                              1 Reply Last reply Reply Quote 1
                              • First post
                                Last post