Hi Ready Player Me team,
we are using Ready player Me Unity SDK for our WebGL product and it was just working fine but it started throwing CORS related error and Ready Player me Stopped working.
Reproduction steps
When I load into scene in WebGL, we are successfuly able to load the iframe for avatar selector and customizer. The avatars load fine there. Then when we select and the actual avatar starts to load, it keeps getting proper responses from server for all API’s but then at this API it just fails
https://models.readyplayer.me/67da8bfc4cd1f2b7be1a1648.json?tail=c6bd4fa9-f444-4877-8321-468b9aa4d84f
and for this API, in browser, it is sent as a preflight and the response from your server returns 400 and then for the Fetch request, it simply is blocked with a CORS error. This API works fine in Editor as well as if we use hit this API with GET method the response is a valid json but it only fails in an actual WebGL build where the API calling is managed by your SDK and then browser is forcing the call to be OPTIONS method and your backend simply returns 400. It started to happen 12 hours ago (29-04-25, Tuesday noon) and before that it was working fine on Monday.
SDK version
We are using 4.0.1 version but we have seen people using 7.3.1 version too are facing this CORS issue. Please check this link
Unity / Unreal Engine version
The Unity version we are using is 2021.3.14f1
Error logs / screenshots / recordings
Attached are screen shots of the Network tab of browser to let you know what we are facing
Please let me know if you need any more information to solve this bug quickly.
Regards and Thanks,