Languages

Menu
Sites
Language
ABORT_ERR: XMLHttpRequest Exception 102: The user aborted a request in synchronous requests. when sending xhr on Gear Fit 2 Pro

Hello there, my problem is I've got this strange error everytime I try to send xmlhttprequest to any other site than tizen.org. What is more the request works normally as expected on Samsung Gear S3 Classic, but not on Gear fit 2 pro. I tried to use request supplied by another users on this forum, but nothing works. I have
tizen.org/privilege/internet set with all necessary certificates. Sample codes I've tried are:

var theUrl = 'http://api.microsofttranslator.com/V2/Http.svc/Translate?oncomplete=mycallback&appId=8B841CA7C1A03443682C52AD07B7775A7BD5B3AA&from=en&to=fr&text="testing sample"' ;
xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", theUrl, false); xmlHttp.send(null);
var xmlDoc = xmlHttp.responseXML ;

and

// js
var client = new XMLHttpRequest();
client.open("GET", "https://cors-test.appspot.com/test");
client.onreadystatechange = function() {
    if (client.readyState == 4) {
        if(client.status == 200) {
           console.log(client.responseText);
        }
    }
};
client.send();

 

Its all the same. Works on Gear S3, but on Gear fir 2 pro its prompting "ABORT_ERR: XMLHttpRequest Exception 102: The user aborted a request in synchronous requests".

Gear S3 Tizen version => 3.0.0.1 and Gear fit 2 pro software version => R365XXU2AQG9

Any help appreciated :)

Edited by: Jan Kaszycki on 22 Apr, 2018
View Selected Answer

Responses

2 Replies
Mark as answer
GEUNSOO KIM

did you put the sites on "access" tag of your config.xml file?

like "<access origin="https://cors-test.appspot.com" subdomains="true"/>" and "<access origin="http://api.microsofttranslator.com" subdomains="true"/>"

If you didn't, set the "access" tag first.

If you did, check your CSP on config.xml. In this case, I cannot add more advice because I don't have experience for CSP stuff. just refer dev docs.

 

 

 

Jan Kaszycki

Setting access tag was the solution. Now everything works as expected. Just wondering how is it, that it isn't necessary for Gear S3 to work. Many thanks for your help :)