CRAN Package Check Results for Package shinyOAuth

Last updated on 2026-11-19 12:49:38 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.7.0 31.19 370.41 401.60 OK
r-devel-linux-x86_64-debian-gcc 0.8.0 21.93 252.11 274.04 OK
r-devel-linux-x86_64-fedora-clang 0.8.0 26.00 241.70 267.70 OK
r-devel-linux-x86_64-fedora-gcc 0.8.0 25.00 252.02 277.02 OK
r-devel-windows-x86_64 0.7.0 39.00 369.00 408.00 OK
r-patched-linux-x86_64 0.7.0 34.83 338.96 373.79 ERROR
r-release-linux-x86_64 0.7.0 32.72 345.50 378.22 OK
r-release-macos-arm64 0.8.0 8.00 81.00 89.00 OK
r-release-macos-x86_64 0.8.0 27.00 837.00 864.00 OK
r-release-windows-x86_64 0.7.0 42.00 373.00 415.00 OK
r-oldrel-macos-arm64 0.8.0 OK
r-oldrel-macos-x86_64 0.8.0 27.00 574.00 601.00 OK
r-oldrel-windows-x86_64 0.7.0 55.00 483.00 538.00 OK

Check Details

Version: 0.7.0
Check: examples
Result: ERROR Running examples in ‘shinyOAuth-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: prepare_authorization_request > ### Title: Prepare a browser authorization request using GET or POST > ### Aliases: prepare_authorization_request > > ### ** Examples > > provider <- oauth_provider( + name = "Example service", + auth_url = "https://example.com/authorize", + token_url = "https://example.com/token", + token_auth_style = "public" + ) > client <- oauth_client( + provider = provider, + client_id = "example-client", + redirect_uri = "http://127.0.0.1:8100/callback" + ) > # In a custom browser flow, bind this secret to the initiating browser and > # supply it again to handle_callback(). Shiny modules manage this for you. > browser_token <- paste(format(openssl::rand_bytes(64)), collapse = "") > request <- prepare_authorization_request(client, browser_token) Warning in openssl::aes_gcm_decrypt(data = c(ct, tg), key = key, iv = iv) : No authentication tag supplied: aes-gcm data is decrypted without verification Error in err_abort(msg, class = "shinyOAuth_state_error", context = context) : [shinyOAuth] - Invalid OAuth state ✖ state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. ℹ Trace ID: BEe944iQ6uC2 Calls: prepare_authorization_request ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted Flavor: r-patched-linux-x86_64

Version: 0.7.0
Check: tests
Result: ERROR Running ‘testthat.R’ [156s/181s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > # This file is part of the standard devtools workflow. > # See `?devtools::test()` for more information. > > # The mTLS request fixtures use separate PEM certificate/key files. Select the > # backend before loading curl through Shiny/httr2. Keep this out of the > # package-check process so curl's backend startup diagnostic does not create a > # check NOTE. > if ( + .Platform[["OS.type"]] == "windows" && !nzchar(Sys.getenv("CURL_SSL_BACKEND")) + ) { + Sys.setenv(CURL_SSL_BACKEND = "openssl") + } > > library(testthat) > library(shiny) > library(shinyOAuth) > helper_otel <- file.path("testthat", "helper-otel.R") > if (file.exists(helper_otel)) { + source(helper_otel, local = TRUE) + } > > # CRAN runs a representative regression suite with small fixtures. The full suite > # covers larger adversarial matrices, subprocesses, browser flows and telemetry. > # Keep the selection here so devtools::test()/testthat::test_local() continue to > # discover every test file. CI and tests/run-local.R explicitly set NOT_CRAN=true. > # Both suites should assert shinyOAuth behavior. Avoid pinning dependency error > # wording, private output attributes or malformed-input handling when multiple > # upstream behaviors are safe for shinyOAuth. Remove such assertions rather than > # hiding them from CRAN; retain package-level rejection and interoperability tests. > cran_tests <- c( + # Public constructors, provider defaults and input validation. + "basic", + "defaults-and-validation", + "provider-helpers", + "public-argument-aliases", + "coerce-expires-in", + "scope-validation", + "utils-url-and-scopes", + # State encryption, PKCE, callback binding and single-use state. + "base64url-helpers", + "constant-time-compare", + "key-normalization", + "pkce-s256-encoding", + "state-envelope-roundtrip", + "state-payload-tamper", + "state-store-atomic-take", + "state-record-consistency", + "login-callback", + "callback-fixed-query", + "callback-route-validation", + "cookie-tossing", + # Token responses, refresh, scopes and safe resource requests. + "token-type-and-scopes", + "token-type-policy", + "token-validation-flag", + "missing-token-type", + "token-extra-fields", + "missing-expires-in", + "refresh-token", + "refresh-single-flight", + "client-bearer-req-url-validation", + "resource-binding", + "userinfo-sub-claim", + # Successful signature verification plus malformed tokens and claim checks. + "jwt-positive-algs", + "jwt-malformed-and-claims", + "jwt-at-hash", + "id-token-audience", + "oidc-standard-claim-types", + "jwk-selection", + "jwt-jwe-roundtrip", + # Retained credentials, SMART permissions and Shiny module wiring. + "connection-credentials", + "connection-store", + "connection-strict-callbacks", + "smart-client", + "smart-scopes", + "smart-exact-members", + "smart-property-policy", + "module-test-exports", + # Redaction, diagnostics and telemetry unit tests. + "print-redaction", + "errors-and-audit", + "otel-unit" + ) > > if (identical(Sys.getenv("NOT_CRAN"), "true")) { + test_check("shinyOAuth") + } else { + # Fail if a selected file is removed or renamed instead of silently reducing + # coverage (or letting a stale filter match no files). + stopifnot( + !anyDuplicated(cran_tests), + all(file.exists(file.path("testthat", paste0("test-", cran_tests, ".R")))) + ) + message( + "Running CRAN regression suite (", + length(cran_tests), + " test files)." + ) + cran_filter <- paste0("^(", paste(cran_tests, collapse = "|"), ")$") + test_check("shinyOAuth", filter = cran_filter) + } Running CRAN regression suite (48 test files). Saving _problems/test-callback-fixed-query-37.R Saving _problems/test-callback-route-validation-85.R Saving _problems/test-callback-route-validation-207.R Saving _problems/test-callback-route-validation-241.R Saving _problems/test-callback-route-validation-255.R Saving _problems/test-callback-route-validation-277.R Saving _problems/test-connection-credentials-38.R Saving _problems/test-connection-strict-callbacks-44.R Saving _problems/test-connection-strict-callbacks-44.R Saving _problems/test-connection-strict-callbacks-44.R Saving _problems/test-connection-strict-callbacks-44.R Saving _problems/test-login-callback-265.R Saving _problems/test-login-callback-341.R Saving _problems/test-login-callback-411.R Saving _problems/test-login-callback-447.R Saving _problems/test-login-callback-517.R Saving _problems/test-login-callback-544.R Saving _problems/test-login-callback-592.R Saving _problems/test-missing-expires-in-28.R Saving _problems/test-missing-expires-in-70.R Saving _problems/test-missing-expires-in-301.R Saving _problems/test-missing-token-type-67.R Saving _problems/test-scope-validation-97.R Saving _problems/test-scope-validation-157.R Saving _problems/test-scope-validation-220.R Saving _problems/test-scope-validation-290.R Saving _problems/test-scope-validation-349.R Saving _problems/test-scope-validation-412.R Saving _problems/test-scope-validation-579.R Saving _problems/test-scope-validation-646.R Saving _problems/test-scope-validation-707.R Saving _problems/test-scope-validation-771.R Saving _problems/test-scope-validation-849.R Saving _problems/test-smart-client-19.R Saving _problems/test-smart-client-506.R Saving _problems/test-smart-client-627.R Saving _problems/test-smart-client-677.R Saving _problems/test-smart-exact-members-276.R Saving _problems/test-smart-exact-members-301.R Saving _problems/test-smart-property-policy-188.R Saving _problems/test-smart-scopes-99.R Saving _problems/test-smart-scopes-192.R Saving _problems/test-smart-scopes-428.R Saving _problems/test-state-envelope-roundtrip-26.R Saving _problems/test-state-envelope-roundtrip-66.R Saving _problems/test-state-payload-tamper-4.R Saving _problems/test-state-store-atomic-take-113.R Saving _problems/test-state-store-atomic-take-181.R Saving _problems/test-state-store-atomic-take-246.R Saving _problems/test-token-extra-fields-56.R Saving _problems/test-token-extra-fields-134.R Saving _problems/test-token-extra-fields-270.R Saving _problems/test-token-extra-fields-274.R Saving _problems/test-token-type-and-scopes-32.R Saving _problems/test-token-type-and-scopes-88.R Saving _problems/test-token-type-policy-35.R Saving _problems/test-token-type-policy-77.R Saving _problems/test-token-type-policy-120.R Saving _problems/test-token-type-policy-365.R Saving _problems/test-token-type-policy-420.R Saving _problems/test-token-type-policy-477.R [ FAIL 61 | WARN 63 | SKIP 0 | PASS 2547 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-callback-fixed-query.R:34:5'): SMART callbacks retain registered queries and HTTPS policy ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: WTgiwP2iO-jB Backtrace: ▆ 1. ├─httr2::url_parse(prepare_call(client, browser_token = valid_browser_token())) at test-callback-fixed-query.R:34:5 2. │ └─httr2:::check_string(url) 3. │ └─httr2:::.rlang_check_is_string(...) 4. │ └─rlang::is_string(x) 5. └─shinyOAuth::prepare_call(client, browser_token = valid_browser_token()) 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ ├─base::tryCatch(...) 11. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 12. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 13. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 14. │ └─base::eval(code, envir = parent.frame()) 15. │ └─base::eval(code, envir = parent.frame()) 16. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 17. └─shinyOAuth (local) state_fail(...) 18. └─shinyOAuth:::err_invalid_state(msg, context = context) 19. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 20. └─rlang::abort(...) ── Error ('test-callback-route-validation.R:81:3'): HTTP callback bridge rejects a decoded route without consuming state ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: c8fV8mpdYIUK Backtrace: ▆ 1. ├─shinyOAuth:::parse_query_param(...) at test-callback-route-validation.R:81:3 2. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 3. │ └─base::is.factor(x) 4. └─shinyOAuth::prepare_call(client, valid_browser_token()) 5. └─shinyOAuth:::prepare_call_internal(...) 6. ├─shinyOAuth:::with_trace_id(...) 7. │ └─base::force(code) 8. ├─shinyOAuth:::with_otel_span(...) 9. │ ├─base::tryCatch(...) 10. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 11. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 12. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 13. │ └─base::eval(code, envir = parent.frame()) 14. │ └─base::eval(code, envir = parent.frame()) 15. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 16. └─shinyOAuth (local) state_fail(...) 17. └─shinyOAuth:::err_invalid_state(msg, context = context) 18. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 19. └─rlang::abort(...) ── Failure ('test-callback-route-validation.R:203:5'): distinct redirect routes stop a public-client provider mix-up ── Expected `is_valid_string(...)` to be TRUE. Differences: `actual`: FALSE `expected`: TRUE Backtrace: ▆ 1. ├─shiny::testServer(...) at test-callback-route-validation.R:200:3 2. │ ├─shiny:::withMockContext(...) 3. │ │ ├─shiny::isolate(...) 4. │ │ │ ├─shiny::..stacktraceoff..(...) 5. │ │ │ └─ctx$run(...) 6. │ │ │ ├─promises::with_promise_domain(...) 7. │ │ │ │ └─domain$wrapSync(expr) 8. │ │ │ ├─shiny::withReactiveDomain(...) 9. │ │ │ │ └─promises::with_promise_domain(...) 10. │ │ │ │ └─domain$wrapSync(expr) 11. │ │ │ │ └─base::force(expr) 12. │ │ │ ├─shiny:::with_otel_span_context(...) 13. │ │ │ │ └─base::force(expr) 14. │ │ │ ├─shiny::captureStackTraces(...) 15. │ │ │ │ └─promises::with_promise_domain(...) 16. │ │ │ │ └─domain$wrapSync(expr) 17. │ │ │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 18. │ │ │ └─env$runWith(self, func) 19. │ │ │ └─shiny (local) contextFunc() 20. │ │ │ └─shiny::..stacktraceon..(expr) 21. │ │ ├─shiny::withReactiveDomain(...) 22. │ │ │ └─promises::with_promise_domain(...) 23. │ │ │ └─domain$wrapSync(expr) 24. │ │ │ └─base::force(expr) 25. │ │ └─withr::with_options(...) 26. │ │ └─base::force(code) 27. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env()) 28. └─testthat::expect_true(...) at test-callback-route-validation.R:203:5 ── Failure ('test-callback-route-validation.R:241:5'): distinct redirect routes stop a public-client provider mix-up ── Expected `malicious_auth[["error"]]` to be NULL. Differences: `actual` is a character vector ('auth_url_error') `expected` is NULL Backtrace: ▆ 1. ├─shiny::testServer(...) at test-callback-route-validation.R:200:3 2. │ ├─shiny:::withMockContext(...) 3. │ │ ├─shiny::isolate(...) 4. │ │ │ ├─shiny::..stacktraceoff..(...) 5. │ │ │ └─ctx$run(...) 6. │ │ │ ├─promises::with_promise_domain(...) 7. │ │ │ │ └─domain$wrapSync(expr) 8. │ │ │ ├─shiny::withReactiveDomain(...) 9. │ │ │ │ └─promises::with_promise_domain(...) 10. │ │ │ │ └─domain$wrapSync(expr) 11. │ │ │ │ └─base::force(expr) 12. │ │ │ ├─shiny:::with_otel_span_context(...) 13. │ │ │ │ └─base::force(expr) 14. │ │ │ ├─shiny::captureStackTraces(...) 15. │ │ │ │ └─promises::with_promise_domain(...) 16. │ │ │ │ └─domain$wrapSync(expr) 17. │ │ │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 18. │ │ │ └─env$runWith(self, func) 19. │ │ │ └─shiny (local) contextFunc() 20. │ │ │ └─shiny::..stacktraceon..(expr) 21. │ │ ├─shiny::withReactiveDomain(...) 22. │ │ │ └─promises::with_promise_domain(...) 23. │ │ │ └─domain$wrapSync(expr) 24. │ │ │ └─base::force(expr) 25. │ │ └─withr::with_options(...) 26. │ │ └─base::force(code) 27. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env()) 28. └─testthat::expect_null(malicious_auth[["error"]]) at test-callback-route-validation.R:241:5 ── Error ('test-callback-route-validation.R:251:5'): distinct redirect routes stop a public-client provider mix-up ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `shinyOAuth:::state_payload_decrypt_validate(malicious, decoded_state, audit_success = FALSE)`: State payload decryption or validation failed i [shinyOAuth] - Invalid OAuth state ! state token payload is not valid JSON i Trace ID: S_n5DfagR0Fy Caused by error in `err_abort()`: ! [shinyOAuth] - Invalid OAuth state ! state token payload is not valid JSON i Trace ID: S_n5DfagR0Fy ── Error ('test-callback-route-validation.R:273:3'): synchronous multi-redirect callbacks complete only on their own route ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: MkdhRXXdRZiS Backtrace: ▆ 1. ├─shinyOAuth:::parse_query_param(...) at test-callback-route-validation.R:273:3 2. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 3. │ └─base::is.factor(x) 4. └─shinyOAuth::prepare_call(client, browser) at ./helper-login.R:8:3 5. └─shinyOAuth:::prepare_call_internal(...) 6. ├─shinyOAuth:::with_trace_id(...) 7. │ └─base::force(code) 8. ├─shinyOAuth:::with_otel_span(...) 9. │ ├─base::tryCatch(...) 10. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 11. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 12. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 13. │ └─base::eval(code, envir = parent.frame()) 14. │ └─base::eval(code, envir = parent.frame()) 15. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 16. └─shinyOAuth (local) state_fail(...) 17. └─shinyOAuth:::err_invalid_state(msg, context = context) 18. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 19. └─rlang::abort(...) ── Error ('test-connection-credentials.R:38:3'): encrypted credential schemas retain token continuity without live objects ── <shinyOAuth_token_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_token_error", context = context)`: [shinyOAuth] - Token error ! Stored connection credentials are unavailable or incompatible i Trace ID: xNHfr_RtBceg Backtrace: ▆ 1. └─shinyOAuth:::connection_credentials_open(...) at test-connection-credentials.R:38:3 2. └─base::tryCatch(...) 3. └─base (local) tryCatchList(expr, classes, parentenv, handlers) 4. └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5. └─value[[3L]](cond) 6. └─shinyOAuth:::err_token("Stored connection credentials are unavailable or incompatible") 7. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_token_error", context = context) 8. └─rlang::abort(...) ── Error ('test-connection-strict-callbacks.R:39:13'): Strict callback documents defer owner checks FALSE FALSE ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: BMBN5av9mSL0 Backtrace: ▆ 1. ├─shiny::withReactiveDomain(...) at test-connection-strict-callbacks.R:34:9 2. │ └─promises::with_promise_domain(...) 3. │ └─domain$wrapSync(expr) 4. │ └─base::force(expr) 5. ├─shiny::isolate(...) 6. │ ├─shiny::..stacktraceoff..(...) 7. │ └─ctx$run(...) 8. │ ├─promises::with_promise_domain(...) 9. │ │ └─domain$wrapSync(expr) 10. │ ├─shiny::withReactiveDomain(...) 11. │ │ └─promises::with_promise_domain(...) 12. │ │ └─domain$wrapSync(expr) 13. │ │ └─base::force(expr) 14. │ ├─shiny:::with_otel_span_context(...) 15. │ │ └─base::force(expr) 16. │ ├─shiny::captureStackTraces(...) 17. │ │ └─promises::with_promise_domain(...) 18. │ │ └─domain$wrapSync(expr) 19. │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 20. │ └─env$runWith(self, func) 21. │ └─shiny (local) contextFunc() 22. │ └─shiny::..stacktraceon..(expr) 23. └─shinyOAuth:::prepare_call_internal(...) at test-connection-strict-callbacks.R:39:13 24. ├─shinyOAuth:::with_trace_id(...) 25. │ └─base::force(code) 26. ├─shinyOAuth:::with_otel_span(...) 27. │ ├─base::tryCatch(...) 28. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 29. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 30. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 31. │ └─base::eval(code, envir = parent.frame()) 32. │ └─base::eval(code, envir = parent.frame()) 33. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 34. └─shinyOAuth (local) state_fail(...) 35. └─shinyOAuth:::err_invalid_state(msg, context = context) 36. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 37. └─rlang::abort(...) ── Error ('test-connection-strict-callbacks.R:39:13'): Strict callback documents defer owner checks FALSE TRUE ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: GxzyJ2NOKkX- Backtrace: ▆ 1. ├─shiny::withReactiveDomain(...) at test-connection-strict-callbacks.R:34:9 2. │ └─promises::with_promise_domain(...) 3. │ └─domain$wrapSync(expr) 4. │ └─base::force(expr) 5. ├─shiny::isolate(...) 6. │ ├─shiny::..stacktraceoff..(...) 7. │ └─ctx$run(...) 8. │ ├─promises::with_promise_domain(...) 9. │ │ └─domain$wrapSync(expr) 10. │ ├─shiny::withReactiveDomain(...) 11. │ │ └─promises::with_promise_domain(...) 12. │ │ └─domain$wrapSync(expr) 13. │ │ └─base::force(expr) 14. │ ├─shiny:::with_otel_span_context(...) 15. │ │ └─base::force(expr) 16. │ ├─shiny::captureStackTraces(...) 17. │ │ └─promises::with_promise_domain(...) 18. │ │ └─domain$wrapSync(expr) 19. │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 20. │ └─env$runWith(self, func) 21. │ └─shiny (local) contextFunc() 22. │ └─shiny::..stacktraceon..(expr) 23. └─shinyOAuth:::prepare_call_internal(...) at test-connection-strict-callbacks.R:39:13 24. ├─shinyOAuth:::with_trace_id(...) 25. │ └─base::force(code) 26. ├─shinyOAuth:::with_otel_span(...) 27. │ ├─base::tryCatch(...) 28. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 29. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 30. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 31. │ └─base::eval(code, envir = parent.frame()) 32. │ └─base::eval(code, envir = parent.frame()) 33. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 34. └─shinyOAuth (local) state_fail(...) 35. └─shinyOAuth:::err_invalid_state(msg, context = context) 36. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 37. └─rlang::abort(...) ── Error ('test-connection-strict-callbacks.R:39:13'): Strict callback documents defer owner checks TRUE FALSE ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: n08T1IGdO4nK Backtrace: ▆ 1. ├─shiny::withReactiveDomain(...) at test-connection-strict-callbacks.R:34:9 2. │ └─promises::with_promise_domain(...) 3. │ └─domain$wrapSync(expr) 4. │ └─base::force(expr) 5. ├─shiny::isolate(...) 6. │ ├─shiny::..stacktraceoff..(...) 7. │ └─ctx$run(...) 8. │ ├─promises::with_promise_domain(...) 9. │ │ └─domain$wrapSync(expr) 10. │ ├─shiny::withReactiveDomain(...) 11. │ │ └─promises::with_promise_domain(...) 12. │ │ └─domain$wrapSync(expr) 13. │ │ └─base::force(expr) 14. │ ├─shiny:::with_otel_span_context(...) 15. │ │ └─base::force(expr) 16. │ ├─shiny::captureStackTraces(...) 17. │ │ └─promises::with_promise_domain(...) 18. │ │ └─domain$wrapSync(expr) 19. │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 20. │ └─env$runWith(self, func) 21. │ └─shiny (local) contextFunc() 22. │ └─shiny::..stacktraceon..(expr) 23. └─shinyOAuth:::prepare_call_internal(...) at test-connection-strict-callbacks.R:39:13 24. ├─shinyOAuth:::with_trace_id(...) 25. │ └─base::force(code) 26. ├─shinyOAuth:::with_otel_span(...) 27. │ ├─base::tryCatch(...) 28. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 29. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 30. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 31. │ └─base::eval(code, envir = parent.frame()) 32. │ └─base::eval(code, envir = parent.frame()) 33. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 34. └─shinyOAuth (local) state_fail(...) 35. └─shinyOAuth:::err_invalid_state(msg, context = context) 36. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 37. └─rlang::abort(...) ── Error ('test-connection-strict-callbacks.R:39:13'): Strict callback documents defer owner checks TRUE TRUE ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: wAwUQR_D-GYB Backtrace: ▆ 1. ├─shiny::withReactiveDomain(...) at test-connection-strict-callbacks.R:34:9 2. │ └─promises::with_promise_domain(...) 3. │ └─domain$wrapSync(expr) 4. │ └─base::force(expr) 5. ├─shiny::isolate(...) 6. │ ├─shiny::..stacktraceoff..(...) 7. │ └─ctx$run(...) 8. │ ├─promises::with_promise_domain(...) 9. │ │ └─domain$wrapSync(expr) 10. │ ├─shiny::withReactiveDomain(...) 11. │ │ └─promises::with_promise_domain(...) 12. │ │ └─domain$wrapSync(expr) 13. │ │ └─base::force(expr) 14. │ ├─shiny:::with_otel_span_context(...) 15. │ │ └─base::force(expr) 16. │ ├─shiny::captureStackTraces(...) 17. │ │ └─promises::with_promise_domain(...) 18. │ │ └─domain$wrapSync(expr) 19. │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 20. │ └─env$runWith(self, func) 21. │ └─shiny (local) contextFunc() 22. │ └─shiny::..stacktraceon..(expr) 23. └─shinyOAuth:::prepare_call_internal(...) at test-connection-strict-callbacks.R:39:13 24. ├─shinyOAuth:::with_trace_id(...) 25. │ └─base::force(code) 26. ├─shinyOAuth:::with_otel_span(...) 27. │ ├─base::tryCatch(...) 28. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 29. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 30. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 31. │ └─base::eval(code, envir = parent.frame()) 32. │ └─base::eval(code, envir = parent.frame()) 33. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 34. └─shinyOAuth (local) state_fail(...) 35. └─shinyOAuth:::err_invalid_state(msg, context = context) 36. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 37. └─rlang::abort(...) ── Error ('test-login-callback.R:265:3'): handle_callback validates browser token, PKCE verifier, and nonce ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: ZK1A9bVNTE-K Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:265:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:341:3'): handle_callback rejects oversized authorization code ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: f1pceQSvHlTV Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:341:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:411:3'): state store is single-use during handle_callback ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: SoOWIVEwDGZx Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:411:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:447:3'): handle_callback errors when PKCE verifier missing and when browser token format invalid ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 6jB6ZCwyA3W- Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:447:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:517:3'): handle_callback fails when nonce is required but missing in state store ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: U-DKQNWkd3lN Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:517:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:544:3'): handle_callback fails when PKCE verifier is malformed (not NULL) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 2g_HLgsJ3yYS Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:544:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-login-callback.R:592:3'): handle_callback fails when nonce is malformed (not NULL) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: RChJ2eGSMn4Y Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-login-callback.R:592:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-missing-expires-in.R:28:3'): handle_callback warns when expires_in is absent (login) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: X9Yv0-ckGLmv Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = bt) at test-missing-expires-in.R:28:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-missing-expires-in.R:70:3'): handle_callback does NOT warn when expires_in is present (login) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 7lnb_CdArzai Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = bt) at test-missing-expires-in.R:70:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-missing-expires-in.R:301:3'): handle_callback uses default_expires_in option (login) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: L44HOiDsOMuv Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = bt) at test-missing-expires-in.R:301:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ ├─base::tryCatch(...) 7. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 8. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-missing-token-type.R:64:9'): login and refresh only infer Bearer from an absent token type ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: m9tnZ8fQ4suD Backtrace: ▆ 1. ├─testthat::expect_error(run(), "missing token_type", class = "shinyOAuth_token_error") at test-missing-token-type.R:79:5 2. │ └─testthat:::expect_condition_matching_(...) 3. │ └─testthat:::quasi_capture(...) 4. │ ├─testthat (local) .capture(...) 5. │ │ └─base::withCallingHandlers(...) 6. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. └─shinyOAuth (local) run() 8. ├─shinyOAuth:::parse_query_param(...) at test-missing-token-type.R:64:9 9. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 10. │ └─base::is.factor(x) 11. └─shinyOAuth::prepare_call(client, browser_token = browser) at ./helper-login.R:8:3 12. └─shinyOAuth:::prepare_call_internal(...) 13. ├─shinyOAuth:::with_trace_id(...) 14. │ └─base::force(code) 15. ├─shinyOAuth:::with_otel_span(...) 16. │ ├─base::tryCatch(...) 17. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 18. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 19. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 20. │ └─base::eval(code, envir = parent.frame()) 21. │ └─base::eval(code, envir = parent.frame()) 22. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 23. └─shinyOAuth (local) state_fail(...) 24. └─shinyOAuth:::err_invalid_state(msg, context = context) 25. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 26. └─rlang::abort(...) ── Error ('test-scope-validation.R:97:3'): scope_validation = 'strict' errors on missing scopes ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: GO5GYRr1LO0a Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:97:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:157:3'): scope_validation defaults to 'warn' for reduced grants ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: FjXLRTimCcx0 Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:157:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:220:3'): scope_validation tokenizes space-delimited scope strings ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: G8rhS1E_LwK9 Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:220:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:290:3'): scope_validation does not split comma-bearing scope tokens ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: JlDb5DPXaoJk Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:290:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:349:3'): scope_validation = 'warn' continues on missing scopes ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: rBay7HJV-RGo Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:349:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:412:3'): scope_validation = 'none' skips validation entirely ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: SwoZg-OZPzor Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:412:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:579:3'): scope_validation = 'strict' error message includes hint ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 0pRj2gn1fu1C Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:579:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:646:3'): scope_validation = 'strict' accepts token response that omits scope ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: xCxgAIZ2Va9e Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:646:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:707:3'): scope_validation = 'warn' accepts token response that omits scope ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: lqvXI5i54-Ka Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:707:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:771:3'): scope_validation = 'none' succeeds when token response omits scope ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: jNONG0hCrQ4- Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:771:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-scope-validation.R:849:3'): scope_validation succeeds when no scopes were requested ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: hTlblX9yXmzU Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-scope-validation.R:849:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-smart-client.R:16:3'): SMART client opts into an exact FHIR audience and S256 ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: dNVfto2dnWGi Backtrace: ▆ 1. ├─httr2::url_parse(prepare_call(client, browser_token = valid_browser_token())) at test-smart-client.R:16:3 2. │ └─httr2:::check_string(url) 3. │ └─httr2:::.rlang_check_is_string(...) 4. │ └─rlang::is_string(x) 5. └─shinyOAuth::prepare_call(client, browser_token = valid_browser_token()) 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-smart-client.R:503:9'): SMART capabilities match resource scope spellings on the wire ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: aEbZRkgZoLjz Backtrace: ▆ 1. ├─httr2::url_parse(prepare_call(client, browser_token = valid_browser_token())) at test-smart-client.R:503:9 2. │ └─httr2:::check_string(url) 3. │ └─httr2:::.rlang_check_is_string(...) 4. │ └─rlang::is_string(x) 5. └─shinyOAuth::prepare_call(client, browser_token = valid_browser_token()) 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-smart-client.R:627:3'): SMART initial lifetimes can be supplied explicitly out of band ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: _lyiicXfYDE5 Backtrace: ▆ 1. ├─shinyOAuth:::parse_query_param(...) at test-smart-client.R:627:3 2. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 3. │ └─base::is.factor(x) 4. └─shinyOAuth::prepare_call(client, browser) at ./helper-login.R:8:3 5. └─shinyOAuth:::prepare_call_internal(...) 6. ├─shinyOAuth:::with_trace_id(...) 7. │ └─base::force(code) 8. ├─shinyOAuth:::with_otel_span(...) 9. │ └─base::eval(code, envir = parent.frame()) 10. │ └─base::eval(code, envir = parent.frame()) 11. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 12. └─shinyOAuth (local) state_fail(...) 13. └─shinyOAuth:::err_invalid_state(msg, context = context) 14. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 15. └─rlang::abort(...) ── Error ('test-smart-client.R:674:3'): SMART requires effective request scopes while accepting explicit empty grants ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: HoDXlTJ9eM4N Backtrace: ▆ 1. ├─httr2::url_parse(prepare_call(identity, browser_token = valid_browser_token())) at test-smart-client.R:674:3 2. │ └─httr2:::check_string(url) 3. │ └─httr2:::.rlang_check_is_string(...) 4. │ └─rlang::is_string(x) 5. └─shinyOAuth::prepare_call(identity, browser_token = valid_browser_token()) 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-smart-exact-members.R:273:5'): callback lifetime policy cannot be supplied by a near-match extension ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 2nfcsMvJFrt6 Backtrace: ▆ 1. ├─shinyOAuth:::parse_query_param(...) at test-smart-exact-members.R:273:5 2. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 3. │ └─base::is.factor(x) 4. └─shinyOAuth::prepare_call(client, browser_token = browser) at ./helper-login.R:8:3 5. └─shinyOAuth:::prepare_call_internal(...) 6. ├─shinyOAuth:::with_trace_id(...) 7. │ └─base::force(code) 8. ├─shinyOAuth:::with_otel_span(...) 9. │ └─base::eval(code, envir = parent.frame()) 10. │ └─base::eval(code, envir = parent.frame()) 11. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 12. └─shinyOAuth (local) state_fail(...) 13. └─shinyOAuth:::err_invalid_state(msg, context = context) 14. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 15. └─rlang::abort(...) ── Error ('test-smart-exact-members.R:301:3'): a signed near-match fhirUser claim fails the complete callback ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: WGijPEuCxMD0 Backtrace: ▆ 1. └─shinyOAuth::prepare_call(client, browser_token = browser) at test-smart-exact-members.R:301:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-smart-property-policy.R:188:7'): SMART rejects claims through property edits and restored configuration ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: eDeTVqgYKbiC Backtrace: ▆ 1. └─shinyOAuth::prepare_call(ordinary, valid_browser_token()) at test-smart-property-policy.R:188:7 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-smart-scopes.R:99:3'): SMART v1 aliases require explicit policy and keep wire spellings ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: l8wWtllmaH3D Backtrace: ▆ 1. └─shinyOAuth::prepare_call(client, browser_token = valid_browser_token()) at test-smart-scopes.R:99:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-smart-scopes.R:189:5'): granular scopes accept simple common FHIR search parameters ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: QBaKvo--VzN- Backtrace: ▆ 1. ├─httr2::url_parse(prepare_call(client, browser_token = valid_browser_token())) at test-smart-scopes.R:189:5 2. │ └─httr2:::check_string(url) 3. │ └─httr2:::.rlang_check_is_string(...) 4. │ └─rlang::is_string(x) 5. └─shinyOAuth::prepare_call(client, browser_token = valid_browser_token()) 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-smart-scopes.R:425:3'): SMART scope evidence survives the actual callback and refresh paths ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: MLRUb-ezyfsM Backtrace: ▆ 1. ├─shinyOAuth:::parse_query_param(...) at test-smart-scopes.R:425:3 2. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 3. │ └─base::is.factor(x) 4. └─shinyOAuth::prepare_call(client, browser_token = browser) at ./helper-login.R:8:3 5. └─shinyOAuth:::prepare_call_internal(...) 6. ├─shinyOAuth:::with_trace_id(...) 7. │ └─base::force(code) 8. ├─shinyOAuth:::with_otel_span(...) 9. │ └─base::eval(code, envir = parent.frame()) 10. │ └─base::eval(code, envir = parent.frame()) 11. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 12. └─shinyOAuth (local) state_fail(...) 13. └─shinyOAuth:::err_invalid_state(msg, context = context) 14. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 15. └─rlang::abort(...) ── Error ('test-state-envelope-roundtrip.R:26:3'): state_encrypt_gcm <-> state_decrypt_gcm roundtrip and properties ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: PAMb0bOzudsV Backtrace: ▆ 1. └─shinyOAuth:::state_decrypt_gcm(enc1, key = key) at test-state-envelope-roundtrip.R:26:3 2. └─shinyOAuth (local) state_fail(...) 3. └─shinyOAuth:::err_invalid_state(msg, context = context) 4. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 5. └─rlang::abort(...) ── Error ('test-state-envelope-roundtrip.R:66:3'): Unicode state roundtrips under the C locale ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: kDuKYDOOEvzH Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-state-envelope-roundtrip.R:66:3 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─shinyOAuth:::state_decrypt_gcm(token, key) 5. └─shinyOAuth (local) state_fail(...) 6. └─shinyOAuth:::err_invalid_state(msg, context = context) 7. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 8. └─rlang::abort(...) ── Error ('test-state-payload-tamper.R:4:3'): tampered state payload fails AES-GCM auth during callback ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: zRxn61T5nRpY Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-state-payload-tamper.R:4:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-state-store-atomic-take.R:113:3'): state_store_get_remove uses $take() when available (single-use) ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state ! [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: PFIeiIT1HYI_ i Trace ID: tvV3qcwr9wQz Backtrace: ▆ 1. └─shinyOAuth:::state_store_get_remove(cli, state) at test-state-store-atomic-take.R:113:3 2. └─shinyOAuth:::state_store_consume_atomic(...) 3. └─shinyOAuth:::err_invalid_state(...) 4. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 5. └─rlang::abort(...) ── Error ('test-state-store-atomic-take.R:181:3'): atomic $take() prevents simulated stale-read replay ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state ! [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: uc0Ooz2YTidp i Trace ID: yhMIyH5L2v75 Backtrace: ▆ 1. └─shinyOAuth:::state_store_get_remove(cli, state) at test-state-store-atomic-take.R:181:3 2. └─shinyOAuth:::state_store_consume_atomic(...) 3. └─shinyOAuth:::err_invalid_state(...) 4. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 5. └─rlang::abort(...) ── Error ('test-state-store-atomic-take.R:246:3'): custom_cache() with take passes OAuthClient validation and works ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state ! [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: l1IsfRwzII19 i Trace ID: JWSuKuLisT0k Backtrace: ▆ 1. └─shinyOAuth:::state_store_get_remove(cli, state) at test-state-store-atomic-take.R:246:3 2. └─shinyOAuth:::state_store_consume_atomic(...) 3. └─shinyOAuth:::err_invalid_state(...) 4. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 5. └─rlang::abort(...) ── Error ('test-token-extra-fields.R:56:3'): login preserves provider extras separately from token metadata ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: p_UGApTJhMfF Backtrace: ▆ 1. └─shinyOAuth (local) extra_fields_test_callback(client) at test-token-extra-fields.R:56:3 2. ├─shinyOAuth:::parse_query_param(...) at test-token-extra-fields.R:3:3 3. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 4. │ └─base::is.factor(x) 5. └─shinyOAuth::prepare_call(client, browser_token = browser_token) at ./helper-login.R:8:3 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Error ('test-token-extra-fields.R:134:3'): login handles form extras and does not expose generated metadata ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: lj9poCwWZu1J Backtrace: ▆ 1. └─shinyOAuth (local) extra_fields_test_callback(client) at test-token-extra-fields.R:134:3 2. ├─shinyOAuth:::parse_query_param(...) at test-token-extra-fields.R:3:3 3. │ └─base::sub("^[^?]*\\?", "", url) at ./helper-login.R:8:3 4. │ └─base::is.factor(x) 5. └─shinyOAuth::prepare_call(client, browser_token = browser_token) at ./helper-login.R:8:3 6. └─shinyOAuth:::prepare_call_internal(...) 7. ├─shinyOAuth:::with_trace_id(...) 8. │ └─base::force(code) 9. ├─shinyOAuth:::with_otel_span(...) 10. │ └─base::eval(code, envir = parent.frame()) 11. │ └─base::eval(code, envir = parent.frame()) 12. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 13. └─shinyOAuth (local) state_fail(...) 14. └─shinyOAuth:::err_invalid_state(msg, context = context) 15. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 16. └─rlang::abort(...) ── Failure ('test-token-extra-fields.R:270:7'): the module exposes extras and clears them with the login session ── Expected `values[["authenticated"]]` to be TRUE. Differences: `actual`: FALSE `expected`: TRUE Backtrace: ▆ 1. ├─shiny::testServer(...) at test-token-extra-fields.R:258:3 2. │ ├─shiny:::withMockContext(...) 3. │ │ ├─shiny::isolate(...) 4. │ │ │ ├─shiny::..stacktraceoff..(...) 5. │ │ │ └─ctx$run(...) 6. │ │ │ ├─promises::with_promise_domain(...) 7. │ │ │ │ └─domain$wrapSync(expr) 8. │ │ │ ├─shiny::withReactiveDomain(...) 9. │ │ │ │ └─promises::with_promise_domain(...) 10. │ │ │ │ └─domain$wrapSync(expr) 11. │ │ │ │ └─base::force(expr) 12. │ │ │ ├─shiny:::with_otel_span_context(...) 13. │ │ │ │ └─base::force(expr) 14. │ │ │ ├─shiny::captureStackTraces(...) 15. │ │ │ │ └─promises::with_promise_domain(...) 16. │ │ │ │ └─domain$wrapSync(expr) 17. │ │ │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 18. │ │ │ └─env$runWith(self, func) 19. │ │ │ └─shiny (local) contextFunc() 20. │ │ │ └─shiny::..stacktraceon..(expr) 21. │ │ ├─shiny::withReactiveDomain(...) 22. │ │ │ └─promises::with_promise_domain(...) 23. │ │ │ └─domain$wrapSync(expr) 24. │ │ │ └─base::force(expr) 25. │ │ └─withr::with_options(...) 26. │ │ └─base::force(code) 27. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env()) 28. └─testthat::expect_true(values[["authenticated"]]) at test-token-extra-fields.R:270:7 ── Error ('test-token-extra-fields.R:271:7'): the module exposes extras and clears them with the login session ── Error in `values[["token"]]@extra_fields`: no applicable method for `@` applied to an object of class "NULL" Backtrace: ▆ 1. ├─shiny::testServer(...) at test-token-extra-fields.R:258:3 2. │ ├─shiny:::withMockContext(...) 3. │ │ ├─shiny::isolate(...) 4. │ │ │ ├─shiny::..stacktraceoff..(...) 5. │ │ │ └─ctx$run(...) 6. │ │ │ ├─promises::with_promise_domain(...) 7. │ │ │ │ └─domain$wrapSync(expr) 8. │ │ │ ├─shiny::withReactiveDomain(...) 9. │ │ │ │ └─promises::with_promise_domain(...) 10. │ │ │ │ └─domain$wrapSync(expr) 11. │ │ │ │ └─base::force(expr) 12. │ │ │ ├─shiny:::with_otel_span_context(...) 13. │ │ │ │ └─base::force(expr) 14. │ │ │ ├─shiny::captureStackTraces(...) 15. │ │ │ │ └─promises::with_promise_domain(...) 16. │ │ │ │ └─domain$wrapSync(expr) 17. │ │ │ │ └─base::withCallingHandlers(expr, error = doCaptureStack) 18. │ │ │ └─env$runWith(self, func) 19. │ │ │ └─shiny (local) contextFunc() 20. │ │ │ └─shiny::..stacktraceon..(expr) 21. │ │ ├─shiny::withReactiveDomain(...) 22. │ │ │ └─promises::with_promise_domain(...) 23. │ │ │ └─domain$wrapSync(expr) 24. │ │ │ └─base::force(expr) 25. │ │ └─withr::with_options(...) 26. │ │ └─base::force(code) 27. │ └─rlang::eval_tidy(quosure, mask, rlang::caller_env()) 28. ├─testthat::expect_identical(...) at test-token-extra-fields.R:271:7 29. │ └─testthat::quasi_label(enquo(object), label) 30. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 31. └─base::.handleSimpleError(...) 32. └─shiny (local) h(simpleError(msg, call)) ── Error ('test-token-type-and-scopes.R:32:3'): token_type is enforced when present ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: IUqQ-uP8CNoM Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-and-scopes.R:32:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-and-scopes.R:88:3'): missing requested scopes cause error in strict mode ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: FwLX9rIYeniZ Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-and-scopes.R:88:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:35:3'): when allowed_token_types is empty, missing token_type errors ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: 18GO1XSBk6iJ Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:35:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:77:3'): DPoP clients still reject missing token_type on callback ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: LzXI1JKSLKKh Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:77:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:120:3'): callback rejects missing token_type before DPoP userinfo ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: p26fU_XlpYTU Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:120:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:365:3'): when allowed_token_types is non-empty, missing token_type errors ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: -IO7mqmffH9C Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:365:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:420:3'): handle_callback validates token_type before fetching userinfo ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: GQwCM5FKYnVe Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:420:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) ── Error ('test-token-type-policy.R:477:3'): handle_callback rejects non-scalar token_type values ── <shinyOAuth_state_error/shinyOAuth_error/rlang_error/error/condition> Error in `err_abort(msg, class = "shinyOAuth_state_error", context = context)`: [shinyOAuth] - Invalid OAuth state x state token decrypted payload is not valid JSON ! This can happen if the state key/secret is wrong (e.g., OAuthClient created inside a Shiny session so the key changes on redirect/new session, different Shiny worker, or rotated secret); the decrypted bytes won't decode as JSON. i Trace ID: Oqe8ATl0lrBM Backtrace: ▆ 1. └─shinyOAuth:::prepare_call(cli, browser_token = tok) at test-token-type-policy.R:477:3 2. └─shinyOAuth:::prepare_call_internal(...) 3. ├─shinyOAuth:::with_trace_id(...) 4. │ └─base::force(code) 5. ├─shinyOAuth:::with_otel_span(...) 6. │ └─base::eval(code, envir = parent.frame()) 7. │ └─base::eval(code, envir = parent.frame()) 8. └─shinyOAuth:::state_decrypt_gcm(payload, key = oauth_client@state_key) 9. └─shinyOAuth (local) state_fail(...) 10. └─shinyOAuth:::err_invalid_state(msg, context = context) 11. └─shinyOAuth:::err_abort(msg, class = "shinyOAuth_state_error", context = context) 12. └─rlang::abort(...) [ FAIL 61 | WARN 63 | SKIP 0 | PASS 2547 ] Error: ! Test failures. Execution halted Flavor: r-patched-linux-x86_64