wearmouse icon indicating copy to clipboard operation
wearmouse copied to clipboard

Crash on Pixel Watch 2 after selecting "Available Devices"

Open mangoobyt opened this issue 2 years ago • 16 comments

Clicking on

mangoobyt avatar Oct 18 '23 05:10 mangoobyt

I have the same issue.

To give some additional context: I could connect WearMouse with an already connected device (my phone) only once, but that was a one-off. Now, even though my phone is "connected" in the watch settings, it is displayed as "disconnected" in wearmouse. Switching connection on-off, it is displayed as "connecting..." in the app, but without actually connecting. It goes to "disconnected" after a few seconds. Re-installing the app didn't help either.

flostroehl avatar Oct 31 '23 08:10 flostroehl

@ginkage For context, this issue seems to be happening on wearAuthn too Theory 1: it primarily happens on devices running windows (11). It seems like something in windows 11 is blocking the bluetooth connection (the pixelwatch 2 shows that it is not connected, but windows says its connected to the watch) This makes it that the connection never exists. Testing the same situation on debian shows no problem whatsoever.

Theory 2: google broke the bluetooth api with the pixel watch 2 and devices dont always register a connection

Some related but vague reports: https://github.com/fmeum/WearAuthn/issues/22 https://github.com/fmeum/WearAuthn/issues/15

Logs: wearable-bugreport-aurora-TWD9.231205.001-2024-01-07-02-54-44.zip

wearable-bugreport-aurora-TWD9.231205.001-2024-01-07-03-03-39.zip

Cyanogenbot avatar Jan 07 '24 01:01 Cyanogenbot

There are two separate issues. Clicking on "Available Devices" is one, for which I've captured the stack trace:

Exception java.lang.SecurityException:
  at android.os.Parcel.createExceptionOrNull (Parcel.java:3011)
  at android.os.Parcel.createException (Parcel.java:2995)
  at android.os.Parcel.readException (Parcel.java:2978)
  at android.os.Parcel.readException (Parcel.java:2920)
  at android.app.IActivityTaskManager$Stub$Proxy.startActivity (IActivityTaskManager.java:2064)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1946)
  at android.app.Activity.startActivityForResult (Activity.java:6302)
  at android.app.Activity.startActivityFromFragment (Activity.java:6280)
  at android.app.Activity$HostCallbacks.onStartActivityFromFragment (Activity.java:8948)
  at android.app.Fragment.startActivityForResult (Fragment.java:1121)
  at android.app.Fragment.startActivityForResult (Fragment.java:1110)
  at com.ginkage.wearmouse.ui.devices.AvailableDevicesFragment.checkBluetoothState (AvailableDevicesFragment.java)
  at com.ginkage.wearmouse.ui.devices.AvailableDevicesFragment.onStart (AvailableDevicesFragment.java)
...
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.wm.ActivityTaskSupervisor.checkStartAnyActivityPermission (ActivityTaskSupervisor.java:1108)
  at com.android.server.wm.ActivityStarter.executeRequest (ActivityStarter.java:1013)
  at com.android.server.wm.ActivityStarter.execute (ActivityStarter.java:702)

I think I can fix that one.

For Windows 11, please file a separate one.

ginkage avatar Jan 07 '24 16:01 ginkage

This log should contain connecting to a windows 11 device and pressing selecting these in the watchmouse app: After pressing connect to device nothing works wearable-bugreport-aurora-TWD9.231205.001-2024-01-07-20-00-58.zip

@fmeum Im tagging you too as I noticed that wearauthn is having the same issue where the connection to a windows 11 device doesnt seem to work. Here is a log: https://diededrive.designedbydie.de/index.php/s/8EFJQZExzB4yMkL (File was too big for github)

Cyanogenbot avatar Jan 07 '24 20:01 Cyanogenbot

Welp, that bugreport only shows that I did things correctly, according to the documentation, yet the app is still crashing due to not having some permission (supposed to be BLUETOOTH_ADVERTISE, and the app asks for it on startup). Probably a bug with the device itself.

ginkage avatar Jan 07 '24 22:01 ginkage

Welp, that bugreport only shows that I did things correctly, according to the documentation, yet the app is still crashing due to not having some permission (supposed to be BLUETOOTH_ADVERTISE, and the app asks for it on startup). Probably a bug with the device itself.

Could very well be a problem with wearOS 4.0, had a buddy on a galaxy watch on wearOS 4 try it out, which he had the same issue. Time to contact google haha

Cyanogenbot avatar Jan 07 '24 22:01 Cyanogenbot

The thing is, I have a Galaxy Watch with wearOS 4, and I don't have that issue... Did you accept all the permissions at the app start? You can also try removing the app and installing it again, so that it definitely asks you for the missing permissions.

ginkage avatar Jan 07 '24 22:01 ginkage

yeah i accepted the permissions... Are you running win 11 too?

Cyanogenbot avatar Jan 07 '24 22:01 Cyanogenbot

Reinstalling didnt do the job either :?, I think its a pixelwatch 2 issue then, the setting pane doesnt ever show it as being connected either. I dont think it can finish the connection.. screenshot-2024-01-07-23-58-13

Cyanogenbot avatar Jan 07 '24 23:01 Cyanogenbot

@ginkage for context, when connecting the pixelwatch to an ipad, your app works perfectly other than the available devices button, so It must be on googles side

Cyanogenbot avatar Jan 13 '24 00:01 Cyanogenbot

Thank you for the information. As soon as I get a chance to get my hands on a Pixel Watch with Wear OS 4 (that might take a few days or a few weeks), I'll try to reproduce it and hopefully find a way around it. I don't think it's a matter of what you're connecting to, be it an iPad or Windows 11: since it does connect fine with a device it's already paired to, the problem is clearly in the way the app is requesting the Bluetooth stack to enable its visibility to other devices when you tap the "Available Devices" button. In theory (that is, according to the official documentation), it should be enough to have the BLUETOOTH_ADVERTISE run-time permission granted and accepted by the user to request the Bluetooth visibility from the OS. But, as the crash happens within the checkStartAnyActivityPermission method, I think the issue is that the Pixel Watch 2 System UI does not have android:exported="true" set on the activity that is resolved for that Intent, which would indeed be a bug on Google side (extra note: this does not happen on Samsung with Wear OS 4). Again, I am following the documentation to the letter for this functionality, so there's little I can do but to escalate this matter back up to Google.

ginkage avatar Jan 13 '24 01:01 ginkage

In that case, there definitely seem to be multiple bugs on googles pixel watch stack, namely the connection to devices and the permissions as you said. lets hope that those will be fixed. The problem I was referring to is that the pixel watch can’t even pair properly to windows devices haha, already files a bug report through Google support on that but I doubt it will be read. Thank you for the effort on the other issues though, let’s hope we can get these devices supported :)

Cyanogenbot avatar Jan 13 '24 01:01 Cyanogenbot

Same on my Pixel Watch 1. It crashed if I searched for available devices.

Dtrieb avatar Mar 06 '24 15:03 Dtrieb

Happening on OnePlus Watch 2 as well.

If I accept the permission request and enable precise location, it just crashes/closes. If I limit it to approximate location instead, screen goes black instead of simply crashing back to the previous screen.

Happy to provide more info or perform tests, if it's any help.

rodolforfq avatar May 08 '24 20:05 rodolforfq

I have a Oneplus Watch 2 as well! It is also happening for me and WowMouse is also not working either. This is an important app that'll help me with making my daily life better. Really is unfortunate.

Willing to help in any way, please ask away here.

TheBarii avatar Jul 14 '24 10:07 TheBarii

I also cannot connect to any devices at all. Clicking "connect" simply does absolutely nothing. Available devices causes a crash.

TheBarii avatar Jul 14 '24 10:07 TheBarii