Issue: Main thread in WebXR application stalls in published mode, but not in Editor->Launch. Video with commentary at link below (sorry the audio is muffled). Are published links using header; Origin-Agent-Cluster to turn off multi-threading?
Location:
The scene “0 - Published Showcase”, which is what was published. Works from Editor, but not when published at https://playcanvas.com/project/873970/overview/webxrpress-library
Backgound: So this is a strange one. I’ve got an iframe that’s essentially running some rendering tasks in the background. This works well in the editor, but not when published. I’ve simulated the issue further by intentionally running a “CPU intensive task” on top of the rendering which is the real-time HTML console window itself (from https://gist.github.com/sqren/5083d73f184acae0c5b7).
Usually the web browser will dedicate a thread to a given domain in an iframe; a feature of most Chrome (88+) based browsers, including what’s found in the Oculus Quest. Now there is a new setting that web servers can issue in response headers (maybe as new as 2021?) that has to do with “Origin-Agent-Cluster”. This specifically tells the browser to enable or disable the allocation of resources for things like embedded content. I’m not sure if this is the source of the issue (more info about the setting here: Requesting performance isolation with the Origin-Agent-Cluster header)
Video showing the main thread locking up movement and hand controller tracking (again, only in Published mode):
Any clues greatly appreciated!
Update: origin-agent-cluster doesn’t appear to be set or doesn’t seem to be the cause of the issue AFAIK. According to docs; the window.originAgentCluster would contain a value and I don’t see that from either links (Published or Launched) when using Firefox on the desktop.