Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postMessage error on Cancel current action brick #9322

Closed
Pashaminkovsky opened this issue Oct 21, 2024 · 4 comments
Closed

postMessage error on Cancel current action brick #9322

Pashaminkovsky opened this issue Oct 21, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Pashaminkovsky
Copy link
Collaborator

Pashaminkovsky commented Oct 21, 2024

Unable to reproduce on my end, but I am seeing an error in the logs for a deployment for announcement. Will include screenshot in thread ; also saw render nunjucks error

@Pashaminkovsky Pashaminkovsky added the bug Something isn't working label Oct 21, 2024
@twschiller
Copy link
Contributor

As per thread, postMessage error likely thrown while messaging the sandbox to evaluate the condition for the brick: https://pixiebrix.slack.com/archives/C0436P48QHY/p1729544374033449

@fungairino fungairino self-assigned this Oct 22, 2024
@fungairino
Copy link
Collaborator

The error is happening here, where recipient is null

recipient.postMessage(packet, "*", [privateChannel.port2]);

getSandbox seems to be able to return null. Typescript is inferring the wrong return value for this function.

recipient: await getSandbox(),

fungairino added a commit that referenced this issue Oct 23, 2024
Adds a type check to injectIframe to ensure that the frame does
not have a null contentWindow property.
Also includes e2e test to verify nunjucks execution in sandbox
fungairino added a commit that referenced this issue Oct 24, 2024
* ensure iframe removed interval is cleared

* set fetchPriority of sandbox script to high
@fungairino
Copy link
Collaborator

For the purposes of this reported bug, I think we can close this issue and track more specific sandbox improvements that we are planning in #9150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants