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

    Problem with permisions debugging newapp

    Scheduled Pinned Locked Moved App Development
    20 Posts 4 Posters 2.0k 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.
      • J Offline
        Josué
        last edited by advocatux

        hi guys.
        In order to improve mi very poor programing skills (![I'm just a mere user) I'm programing an octave of piano for the phone inspired in an old app that was published in ubuntu store more than 3 years ago.
        https://uappexplorer.com/app/com.ubuntu.developer.zacharyigielman.piano.upiano

        I can run it with the sdk without anyproblems, works as spected.
        I compiled it to the pone as click (in 16.04) it opens correctly but it can't play any sounds. I can see in logviewer that it's reporting multiple errors of permisions but i don't why. There is someone who can help me?

        2_1534520775626_photo_2018-08-17_17-44-12.jpg

        1_1534520775626_photo_2018-08-17_17-44-07.jpg

        0_1534520775625_photo_2018-08-17_17-44-00.jpg

        advocatuxA 1 Reply Last reply Reply Quote 0
        • advocatuxA Offline
          advocatux @Josué
          last edited by advocatux

          @josué hi, I've forwarded your question to some people who can help you.

          BTW, as you're using logviewer, it can send the log to pastebin so other people can read it easily. You just need to post the generated link here.

          P.S. I also edited your broken image format, I hope you don't mind 🙂

          1 Reply Last reply Reply Quote 0
          • mouseM Offline
            mouse
            last edited by

            Hi. I don't want to be saying ridiculous stuff but according to what I was reading from https://mimecar.gitbooks.io/ubuntu-touch-programming-course/content/en/chapter-04-s01.html,
            there is a .apparmor file which handles application permissions

            advocatuxA 1 Reply Last reply Reply Quote 0
            • advocatuxA Offline
              advocatux @mouse
              last edited by

              @mouse yes, I think he probably needs to add audio in the apparmor's "policy_groups"

              1 Reply Last reply Reply Quote 0
              • J Offline
                Josué
                last edited by advocatux

                @mouse said in Problem with permisions debugging newapp:

                i. I don't want to be saying ridiculous stuff but according to what I was reading from https://mimecar.gitbooks.io/ubuntu-touch-programming-course/content/en/chapter-04-s01.html,

                Sure, i putted in apparmor audio permisions:

                alt text

                I can't put it in pastebin because it returns me an error hehe.

                advocatuxA 1 Reply Last reply Reply Quote 0
                • advocatuxA Offline
                  advocatux @Josué
                  last edited by

                  @josué when I said pastebin I meant Ubuntu Pastebin. You can use https://pastebin.ubuntu.com/ or https://paste.ubuntu.com/ to paste logs directly, but logviewer is pretty handy because it does it for you

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    Josué
                    last edited by

                    yep I mean that when I click in the first icon of the topbar and begin to load it to pastebin it fails.

                    advocatuxA 1 Reply Last reply Reply Quote 0
                    • advocatuxA Offline
                      advocatux @Josué
                      last edited by

                      @josué ah, sorry. Have you tried again?

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Josué
                        last edited by

                        same error hehe

                        advocatuxA 1 Reply Last reply Reply Quote 0
                        • advocatuxA Offline
                          advocatux @Josué
                          last edited by advocatux

                          @josué stupid question (probably) but have you checked you have a working internet connection in your device?

                          Edit: I've tested logviewer (both vivid & xenial versions) sending to pastebin right now, and it's working fine for me.

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Josué
                            last edited by advocatux

                            whatever, here is the log: https://paste.ubuntu.com/p/KWKhc86H8w/

                            advocatuxA 1 Reply Last reply Reply Quote 0
                            • advocatuxA Offline
                              advocatux @Josué
                              last edited by

                              @josué I fixed your 402 lines log 😉

                              1 Reply Last reply Reply Quote 0
                              • advocatuxA Offline
                                advocatux
                                last edited by

                                @Josué did you fix your issue? Have you checked that everything you need for your app is inside the click package? Have you checked the path to the sound files?

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  Josué
                                  last edited by

                                  nope, I tried with the tablet and the phone in 16.04 and with the tablet in 15.04. Same problem.
                                  I'll try to convert the files to ogg and check again 😕

                                  1 Reply Last reply Reply Quote 0
                                  • arubislanderA Offline
                                    arubislander
                                    last edited by arubislander

                                    Are you building your app with clickable? If so, after adding the required policy group, it isn't picked up without first doing clickable clean first.
                                    EDIT: Maybe the clickable clean is not necessary, even though it doesn't hurt. What does help though is to manually uninstall the old application from the device before building and deploying the new one.

                                    🇦🇼 🇳🇱 🇺🇸 🇪🇸
                                    Happily running Ubuntu Touch
                                    Google Pixel 3a (20.04 DEV)
                                    JingPad (24.04 preview)
                                    Meizu Pro 5 (16.04 DEV)

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      Josué
                                      last edited by advocatux

                                      Sorry i was busy last days.

                                      No, I made it with ubuntu-sdk.

                                      I tried something
                                      I converted the wav files to ogg files and i replaced the order SoundEfect to Audio.
                                      Now i can see something interesting in the log but I need help with it too, maybe both were related at all.
                                      As i Can in the click therre arent the sound files that i puted in the proyect

                                      0_1534845835496_e1e80fcf-b7fa-4052-8134-43699a5813bd-image.png

                                      I also don't know why it happens 😕

                                      advocatuxA arubislanderA 2 Replies Last reply Reply Quote 0
                                      • advocatuxA Offline
                                        advocatux @Josué
                                        last edited by

                                        @josué I fixed your image 🙂

                                        1 Reply Last reply Reply Quote 0
                                        • arubislanderA Offline
                                          arubislander @Josué
                                          last edited by arubislander

                                          @josué said in Problem with permisions debugging newapp:

                                          No, I made it with ubuntu-sdk.
                                          I tried something
                                          I converted the wav files to ogg files and i replaced the order SoundEfect to Audio.
                                          Now i can see something interesting in the log but I need help with it too, maybe both were related at all.
                                          As i Can in the click therre arent the sound files that i puted in the proyect

                                          Right... I had the same problem with my app. I would add some (image in my case) files, and they would not be added to the click package.

                                          This is due to the way the SDK sets up its projects. And to get the files included requires editing some CMakeLists.txt files. The SDK makes one for each folder in your project. And if you add a new folder you have to make a corresponding CMakeList.txt too. Buy I never really understood the syntax used in those files.
                                          Clickable, on the other hand, sets up the project with just one CMakeList.txt file, in the projects root folder. Every new folder you add under that is automatically included in the click.

                                          So what I ended up doing for my project was:

                                          • Rename my old project folder
                                          • Create a new clickable project with clickable init with the same meta data (project name, maintainer, etc) as the old project.
                                          • Copy over all the files from the old folder that I need in my project
                                          • Build

                                          The added benefit is that you can open the project created by clickable in the SDK too(or at least you should be able to)

                                          🇦🇼 🇳🇱 🇺🇸 🇪🇸
                                          Happily running Ubuntu Touch
                                          Google Pixel 3a (20.04 DEV)
                                          JingPad (24.04 preview)
                                          Meizu Pro 5 (16.04 DEV)

                                          1 Reply Last reply Reply Quote 2
                                          • J Offline
                                            Josué
                                            last edited by

                                            wow thanks for the info that will save me a lot of time investigating it. Now i'll try to use clickable in the next days...

                                            Thanks a lot.
                                            Advocatux, thanks for fixing my posts I didn't wanted to spam the thread just to say thanks xD

                                            advocatuxA 1 Reply Last reply Reply Quote 1
                                            • advocatuxA Offline
                                              advocatux @Josué
                                              last edited by

                                              @josué no problem & you're welcome 🙂

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