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

QBluetoothDeviceDiscoveryAgent::MissingPermissionsError when running on arm macos #9

Open
KorvinSzanto opened this issue Aug 6, 2023 · 4 comments
Assignees
Labels

Comments

@KorvinSzanto
Copy link
Contributor

I get the following after building with cmake 3.26.3:

./build/src/cli/dokit status
dokit.cli.command: Looking for first available Pokit device...
qt.bluetooth.darwin: A proper Info.plist with NSBluetoothAlwaysUsageDescription entry is required, cannot start device discovery
pokit.ble.discovery: Pokit device scan error: QBluetoothDeviceDiscoveryAgent::MissingPermissionsError
dokit.cli.command: Bluetooth controller error: QBluetoothDeviceDiscoveryAgent::MissingPermissionsError
@pcolby pcolby self-assigned this Aug 6, 2023
@pcolby pcolby added the macOS label Aug 6, 2023
@pcolby
Copy link
Owner

pcolby commented Aug 6, 2023

Thanks @KorvinSzanto, I'll take a look 😊

pcolby added a commit that referenced this issue Aug 6, 2023
Not expecting it to work, just hoping permission issues kick in
before no-BLE-device failures, so we can replicate issue #9
(`QBluetoothDeviceDiscoveryAgent::MissingPermissionsError`) in CI.
@pcolby
Copy link
Owner

pcolby commented Aug 6, 2023

So it looks like I'm going to have to convert the macOS app from a single executable, to an app bundle instead. This is mostly done already, but it does mean that that the CLI invocation will look a little different, ie instead of:

./build/src/cli/dokit status

it will become:

./build/src/cli.app/Contents/MacOS/dokit status

It might be possible to make it nicer with a symlink? (I thought for later).

I'll also package the app into a *.dmg file, but that will take a little longer, but you can test before that's done.

Anyway, work in progress... 😄

pcolby added a commit that referenced this issue Aug 6, 2023
@KorvinSzanto
Copy link
Contributor Author

KorvinSzanto commented Aug 6, 2023

This was working for me for awhile with #10 applied but it has decided to stop working for some reason. Instead of the behavior originally described I see a panic showing essentially the same failure:

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.

@pcolby
Copy link
Owner

pcolby commented Aug 7, 2023

This was working for me for awhile with #10 applied

Thanks @KorvinSzanto, I've merged, moved to a CMake variable, and populated the rest of the Info.plist file.

but it has decided to stop working ... I see a panic showing essentially the same failure

That is really odd. I'll do some digging 🤔

pcolby added a commit that referenced this issue Nov 25, 2023
Added
- Warn when requesting an unsupported scan timeout ([4094bfb][])

Changed
- Switch macOS CLI to Application Bundle ([#9][])
- Upgrade to Qt 6.6.0

Fixed
- Correctly exit on discovery agent errors ([7f70715][])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants