Skip to content

Permission-gated call made before the app window is registered is dropped unanswered and denied; blocking client then panics on Xous(AccessDenied) #23

Description

@tobyjaguar

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions