Environment: KeyOS v1.4.0 (eb2c2edb3) hosted simulator; third-party-class sideloaded app built in-tree with cargo xtask build-app.
Steps: in app_main, before ui.run() has started (or from a worker thread started immediately at launch), call a grantOnFirstUse message such as Security::app_seed() (GetAppSeed).
What happens: the consent prompt is never shown; gui-server logs
gui_server::permissions: permission prompt for request 0 dropped unanswered; denying
and the blocking client in server/src/blocking_archive.rs:154 unwraps the resulting Xous(AccessDenied), so the calling thread panics:
thread '<unnamed>' panicked at server/src/blocking_archive.rs:154:41:
called `Result::unwrap()` on an `Err` value: Xous(AccessDenied)
Making the same call about 1.5 s after the event loop is running (window registered, app in the foreground) shows the prompt and works.
Expected / suggestions: either queue the prompt until the requesting app has a registered window, or document in the SDK that permission-gated calls must wait until the app is in the foreground. Independently, send_blocking_archive could return the xous error to the caller instead of unwrapping, so a denied permission is recoverable in-app (there is a try_send_blocking_archive, but the typed API methods such as Security::app_seed do not expose it).
Environment: KeyOS v1.4.0 (
eb2c2edb3) hosted simulator; third-party-class sideloaded app built in-tree withcargo xtask build-app.Steps: in
app_main, beforeui.run()has started (or from a worker thread started immediately at launch), call agrantOnFirstUsemessage such asSecurity::app_seed()(GetAppSeed).What happens: the consent prompt is never shown; gui-server logs
and the blocking client in
server/src/blocking_archive.rs:154unwraps the resultingXous(AccessDenied), so the calling thread panics:Making the same call about 1.5 s after the event loop is running (window registered, app in the foreground) shows the prompt and works.
Expected / suggestions: either queue the prompt until the requesting app has a registered window, or document in the SDK that permission-gated calls must wait until the app is in the foreground. Independently,
send_blocking_archivecould return the xous error to the caller instead of unwrapping, so a denied permission is recoverable in-app (there is atry_send_blocking_archive, but the typed API methods such asSecurity::app_seeddo not expose it).