Coming back to this thread because the same crash is still present on current versions, and I now have a more precise root cause than what I posted in March.
Still reproducible on:
- AYON server 1.16.0+202607241808 (build 20260724-1808, frontend commit 53dfa1aba, backend commit 16b514a7)
- Review addon 0.7.1
- Chrome, desktop
So this was never a 0.3.0 regression that later got fixed. It is still the behaviour now.
Same symptom as before, the review page dies with “Oops” and the console shows:
Error: useGlobalContext must be used within a GlobalProvider
What I can now confirm is the actual mechanism. I compared the exact same server through two access paths in the same browser, one over http on a LAN IP and one over https through our domain. Same server, same bundle, same project.
Over http on a LAN IP, window.isSecureContext is false, so Chrome withholds all of these:
- crypto.subtle
- crypto.randomUUID
- navigator.locks
- navigator.storage
- serviceWorker
Over https all five are available.
The Review addon’s sync chunk (global-.js) references crypto.randomUUID, crypto.subtle, isSecureContext and navigator.storage. Over https that chunk initialises and logs “[sync] initial unsynced join”. Over http it never initialises at all, so GlobalProvider is never mounted, the component calling useGlobalContext throws, and the error boundary renders the generic “Oops”.
That also answers, negatively, the question I asked earlier in this thread about allowing ws instead of wss. It is not a WebSocket problem. The WebSocket connects fine over http and the license check passes. The blocker is the secure-context-gated crypto APIs, so no transport setting can work around it.
Worth flagging one red herring, since it cost me time twice. This warning:
[ Federation Runtime ] Version 1.18.17 from host of shared singleton module ynput/ayon-react-components does not satisfy the requirement of review which needs 1.18.16
appears on the working https instance too, so it is unrelated noise. It looks like a smoking gun but it is not.
A few questions:
-
Is the secure-context requirement intended to be permanent for Review? If so, could it be stated in the addon requirements or docs? Any studio reaching the server by LAN IP over http will hit this immediately.
-
Could the addon check window.isSecureContext at mount and render an explicit message, something like “Review requires a secure https connection”, instead of the generic “Oops”? The current error points you towards version mismatches and network problems, which is exactly where I lost time in March and again now.
-
Is a degraded mode feasible on an insecure origin, for example playback and comments without the collaborative sync layer, or is the crypto dependency too deep for that to be practical?