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

Cannot create a SharedArrayBuffer #2094

Open
pflannery opened this issue Jan 2, 2023 · 15 comments · May be fixed by #3285
Open

Cannot create a SharedArrayBuffer #2094

pflannery opened this issue Jan 2, 2023 · 15 comments · May be fixed by #3285

Comments

@pflannery
Copy link

Details about the bug:

When trying to create a SharedArrayBuffer an error message is displayed

SharedArrayBuffer is not defined

In order to enable SharedArrayBuffer the server needs the following headers:

Also see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer#security_requirements

@pflannery pflannery added the Bug label Jan 2, 2023
@welcome
Copy link

welcome bot commented Jan 2, 2023

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.

@prajwalbandak
Copy link

hey @raclim , just need to add the above two properties in server.js? is it my understanding correct. please correct me if am wrong.

@Raj100679
Copy link

@lindapaiste Can you assign this issue to me

@imshashanksharma
Copy link

@pflannery can u assign this issue to me

@soniyaprasad77
Copy link
Contributor

Hey @lindapaiste Can you tell me if this reference is the correct way to resolve this issue?

@lindapaiste
Copy link
Collaborator

lindapaiste commented Dec 10, 2023

Hey @lindapaiste Can you tell me if this reference is the correct way to resolve this issue?

We need to think more about where we set those headers, which honestly I haven’t so I don’t know the answer. Do we need it on the entire server?

The sketch itself is run in an iframe. Do we need to add anything to the handler which serves the iframe? Is that included in the server.js file or is it elsewhere? The iframe is served from a different subdomain. Is that considered “same-origin” or not? Do we need to explicitly allow that subdomain as an origin?

edit: I think the file which needs changes is this one?
https://github.com/processing/p5.js-web-editor/blob/develop/server/previewServer.js

@grvup
Copy link

grvup commented Dec 27, 2023

Hey @lindapaiste may i work on this issue if still not resolved ?

@lindapaiste
Copy link
Collaborator

Hey @lindapaiste may i work on this issue if still not resolved ?

TBH I haven't properly reviewed @soniyaprasad77's code. Maybe you can start by looking at that, and investigating the questions in my last comment. We may need a team effort here!

@codebybishwa
Copy link

Hello, could someone please provide me with an update on the progress regarding this issue.? Thank you!

@grvup
Copy link

grvup commented Jan 4, 2024

I have implemented the suggested modifications in both codes , but the issue persists, and errors continue to occur.

If you could offer any additional solutions related to this issue, it would be helpful.

@goutamdh
Copy link

goutamdh commented Jan 6, 2024

Hi @lindapaiste,

kindly, Review that PR.

@shamvrueth
Copy link

@lindapaiste May I work on this issue if its still not resolved?

@shivdev12
Copy link

@lindapaiste, If not resolved can I work on this issue.

@Noorain464
Copy link

I am new to open source I would like to work on this issue

@Indhiraraj
Copy link

hey @raclim , I have worked on this issue and come up with a solution
Would it be okay if I shared my work?

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