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 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.", + ); }); }); 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