Hi, I’m facing this issue when I upgrade cocos version from 3.16 to 3.17.1
In old version 3.16, XMLHttpRequest() is works fine. After upgrade and build Android, application crash.
I noticed that I call getXMLHttpRequest() to request a site to get data. It’s work but in the next time I call request another site, fail and crash.
The code is here:
var xhr = cc.loader.getXMLHttpRequest();
xhr.withCredentials = true;
xhr.open(“POST”, baseURL);
xhr.setRequestHeader(“Content-Type”, “application/x-www-form-urlencoded”);
var params = “Some params”
cc.log(params);
xhr.send(params);
xhr.onreadystatechange = function () {
cc.log("Away");
…
It never reach log ‘Away’. I think the line cause crash is: xhr.send(params) because it still log params before crash.