From f47ad1e76cb8a7a420d52a49e6ed2afee91893a7 Mon Sep 17 00:00:00 2001 From: djkato Date: Wed, 11 Feb 2026 21:37:28 +0100 Subject: [PATCH 1/3] more verbose "Failed to generate action ID" error I wasted like 30 mins trying to figure out why this is happening and how I can develop on any other ip/domain besides localhost/127.0.0.1. This should help guide devs who will enavitably run into this issue faster to setting up the env so they can continue, eg: add their IP/domain to "dom.securecontext.allowlist". --- src/app-bridge/actions.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app-bridge/actions.ts b/src/app-bridge/actions.ts index 4bbe79c5..63a029a4 100644 --- a/src/app-bridge/actions.ts +++ b/src/app-bridge/actions.ts @@ -69,7 +69,9 @@ function withActionId Date: Wed, 11 Feb 2026 21:41:38 +0100 Subject: [PATCH 2/3] chageset --- .changeset/smart-hoops-travel.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/smart-hoops-travel.md diff --git a/.changeset/smart-hoops-travel.md b/.changeset/smart-hoops-travel.md new file mode 100644 index 00000000..84a4149f --- /dev/null +++ b/.changeset/smart-hoops-travel.md @@ -0,0 +1,5 @@ +--- +"@saleor/app-sdk": patch +--- + +more verbose "Failed to generate action ID" error From dc9ff433f3262d4ea707f69e4b387f4decf6427d Mon Sep 17 00:00:00 2001 From: djkato Date: Thu, 12 Feb 2026 14:25:50 +0100 Subject: [PATCH 3/3] fix tests --- src/app-bridge/actions.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app-bridge/actions.test.ts b/src/app-bridge/actions.test.ts index da9ba1b4..2a068844 100644 --- a/src/app-bridge/actions.test.ts +++ b/src/app-bridge/actions.test.ts @@ -94,6 +94,8 @@ describe("actions.ts", () => { actions.Notification({ title: "Test", }), - ).throws("Failed to generate action ID. Please ensure you are using https or localhost"); + ).throws( + "Failed to generate action ID, likely as your browser doesn't consider current session as Secure Context. Please ensure you are using https or localhost, or current IP/domain is in 'dom.securecontext.allowlist'/'#unsafely-treat-insecure-origin-as-secure' if you trust it.", + ); }); });