Open chrisekelley opened 3 years ago
Check the fetchLocal function in the code here: https://github.com/Tangerine-Community/Tangerine/commit/aca5b643586cd68cb497d8e5770ee5c183827efe#diff-654a2a2a2f2db514da7640fbeabb70f9527941294e1c14a28628cd188e440454
function fetchLocal(url) {
return new Promise(function(resolve, reject) {
var xhr = new XMLHttpRequest
xhr.responseType = 'json';
xhr.onload = function() {
if (xhr.status < 200 || xhr.status >= 300) {
if (xhr.status === 0) {
if (Array.isArray(xhr.response)) {
resolve(xhr.response)
} else {
reject({request: xhr});
}
} else {
reject({request: xhr});
}
} else {
resolve(xhr.response)
}
}
xhr.open('GET', url)
xhr.send(null)
})
}
In certain circumstances on an APK, the following code fails even if it has received the payload:
Even if readyState === 4, the status stays at 0, never reaching 200, but responseText is populated.