badaix / snapdroid

Snapcast client for Android
GNU General Public License v3.0
127 stars 25 forks source link

No audio on Pixel 3 #16

Closed pcwii closed 4 years ago

pcwii commented 4 years ago

Have an issue where I can hear no audio on my pixel 3. I have the ability to control all my other clients but the pixel 3 does not show up as one of the devices but the Snapclient is showing running.... when I hit the play button.

kdistin commented 4 years ago

It's the same on my S10

mmallozzi commented 4 years ago

I might be running into something similar, though it's hard for me to tell since I'm trying to use the Android app as my first client so I can't yet confirm that other clients work. On my Pixel 2 running Android 10, when I start the app I see the following in logcat:

2020-01-01 13:01:00.569 2152-2178/? E/Setup: Failed to copy asset file: bin/arm64-v8a/snapclient
    java.io.FileNotFoundException: bin/arm64-v8a/snapclient
        at android.content.res.AssetManager.nativeOpenAsset(Native Method)
        at android.content.res.AssetManager.open(AssetManager.java:824)
        at android.content.res.AssetManager.open(AssetManager.java:801)
        at de.badaix.snapcast.utils.Setup.copyAsset(Setup.java:77)
        at de.badaix.snapcast.utils.Setup.copyBinAsset(Setup.java:62)
        at de.badaix.snapcast.MainActivity$2.run(MainActivity.java:150)
        at java.lang.Thread.run(Thread.java:919)
2020-01-01 13:01:00.578 2152-2178/? E/Setup: Failed to copy asset file: bin//snapclient
    java.io.FileNotFoundException: bin//snapclient
        at android.content.res.AssetManager.nativeOpenAsset(Native Method)
        at android.content.res.AssetManager.open(AssetManager.java:824)
        at android.content.res.AssetManager.open(AssetManager.java:801)
        at de.badaix.snapcast.utils.Setup.copyAsset(Setup.java:77)
        at de.badaix.snapcast.utils.Setup.copyBinAsset(Setup.java:64)
        at de.badaix.snapcast.MainActivity$2.run(MainActivity.java:150)
        at java.lang.Thread.run(Thread.java:919)

When I hit the Play button, I get:

2020-01-01 13:05:01.894 2152-2152/? W/System.err: java.io.IOException: Cannot run program "/data/user/0/de.badaix.snapcast/files/snapclient": error=13, Permission denied
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
2020-01-01 13:05:01.889 7292-7292/? W/badaix.snapcast: type=1400 audit(0.0:381946): avc: granted { execute } for name="snapclient" dev="dm-2" ino=860362 scontext=u:r:untrusted_app:s0:c35,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c35,c257,c512,c768 tclass=file
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at de.badaix.snapcast.SnapclientService.start(SnapclientService.java:223)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at de.badaix.snapcast.SnapclientService.onStartCommand(SnapclientService.java:139)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4087)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.app.ActivityThread.access$1800(ActivityThread.java:219)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:107)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.os.Looper.loop(Looper.java:214)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7356)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
2020-01-01 13:05:01.894 2152-2152/? W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2020-01-01 13:05:01.895 2152-2152/? W/System.err: Caused by: java.io.IOException: error=13, Permission denied
2020-01-01 13:05:01.895 2152-2152/? W/System.err:     at java.lang.UNIXProcess.forkAndExec(Native Method)
2020-01-01 13:05:01.895 2152-2152/? W/System.err:     at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
2020-01-01 13:05:01.895 2152-2152/? W/System.err:     at java.lang.ProcessImpl.start(ProcessImpl.java:141)
2020-01-01 13:05:01.895 2152-2152/? W/System.err:     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
2020-01-01 13:05:01.895 2152-2152/? W/System.err:   ... 11 more
2020-01-01 13:05:01.889 7292-7292/? W/badaix.snapcast: type=1400 audit(0.0:381947): avc: denied { execute_no_trans } for path="/data/data/de.badaix.snapcast/files/snapclient" dev="dm-2" ino=860362 scontext=u:r:untrusted_app:s0:c35,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c35,c257,c512,c768 tclass=file permissive=0
mmallozzi commented 4 years ago

I set up some other clients which worked, so it appears that my Pixel 2 (and its logcat messages above) are a valid repro of this issue. Let me know if there's anything else I can do to help debug.

derWeihnachtsmann commented 4 years ago

rename the .zip to .apk, it should work. Snapcast-debug.zip

I encountered issues in the App now, the MAC-Adress is missing and the hostname of the phone is just "localhost", but music plays fine. I will try to fix that soon

derWeihnachtsmann commented 4 years ago

MAC Adress Problem is known: https://github.com/badaix/snapcast/issues/480

And it would be nice if this can be merged: https://github.com/badaix/snapcast/pull/516 to pass the hostname to the binary when snapclient starts @badaix :)

badaix commented 4 years ago

The Mac problem is solved. Maybe I didn't push it yet. I will check tonight.

derWeihnachtsmann commented 4 years ago

I tested just now on another android 7 device and the MAC here is also zero. So the only "problem" what we got now is passing the hostname to the Binary.

badaix commented 4 years ago

Starting with Android 6, the MAC address will be 0, so the Snapdroid creates a Pseudo-Unique ID as described on Stackoverflow and passes this ID to the snapclient binary as hostId

badaix commented 4 years ago

I've merged @derWeihnachtsmann changes #17 Can you please test the build 0.17.1.1, before I will officially release it? Snapcast_0.17.1.1.apk.zip

pcwii commented 4 years ago

I can confirm that the 0.17.1.1.apk works on my pixel3. Thanks for the efforts. I do have some latency between some of my clients but I have not had an opportunity to adjust the latency values to see if it is better. Thank you

On Tue, Jan 14, 2020 at 1:12 PM Johannes Pohl notifications@github.com wrote:

I've merged @derWeihnachtsmann https://github.com/derWeihnachtsmann changes #17 https://github.com/badaix/snapdroid/pull/17 Can you please test the build 0.17.1.1, before I will officially release it? Snapcast_0.17.1.1.apk.zip https://github.com/badaix/snapdroid/files/4060657/Snapcast_0.17.1.1.apk.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/badaix/snapdroid/issues/16?email_source=notifications&email_token=AHKVSJVZEGXR43BMUBK3YT3Q5X6ANA5CNFSM4JYVLZYKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI5SXZQ#issuecomment-574303206, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHKVSJTZU3P4KEQFGIAML5DQ5X6ANANCNFSM4JYVLZYA .

derWeihnachtsmann commented 4 years ago

Can we close dis?

badaix commented 4 years ago

No, not yet. The current version is not conforming the Play Store requirements. Before the binary was just some "blob", now it has the semantics of a library for certain architectures in 32 and 64 bit variants. The playstore now complains that a 64 bit binary is missing, even after I've exchanged the 32 bit arm version in arm64-v8a with a 64 bit build. I guess that the play store wants to have a x64 version along with the x86 version.

badaix commented 4 years ago

It's fixed now with 0.19, also available on Google Play