Sinch js sdk not making calls - sinch

This is my log i the call always ends with a timeout
I'm using angularjs also so what i'm doing is starting the sinchClient (from a Factory) in the app.js and adding the onIncoming Listener then finally make calls in the controller (from a Factory)
GET http://localhost:63342/chatome/www/cordova.js
i {sinch: f, eventListeners: Array[0], callBuffert: Object, localMediaStream: undefined, incomingCallCustomStream: undefined…}
Notification {progress: 0, message: "Get authentication token", object: undefined}
Notification {progress: 0.2, message: "Get instance using auth token", object: undefined}
Notification {progress: 0.4, message: "Get MXP configuration", object: undefined}
Notification {progress: 0.6, message: "Create MXP object", object: undefined}
Notification {progress: 0.8, message: "Will start active connection", object: undefined}
Notification {progress: 0.8, message: "Manually starting active connection", object: undefined}
Notification {progress: 0, message: "SinchClient started", object: undefined}
Notification {progress: 1, message: "Successfully started SinchClient", object: undefined}
Notification {progress: 0, message: "CallUser method called", object: "brenty"}
Notification {progress: 0, message: "Will retrieve new Mic for stream", object: undefined}
Notification {progress: 0, message: "Call was muted using mute().", object: undefined}
Notification {progress: 0, message: "Call PROGRESSING timeout. Will hangup call.", object: g}message: "Call PROGRESSING timeout. Will hangup call."object: gactiveInstance: undefinedautoAnswer: falseautoHangup: falsecallDomain: "data"callEndCause: 1callId: "bf5d5c3a-9b08-47ed-9275-5d03eb1447ed"callOutbound: truecallState: 3clientMap: Objectvirtual: Objectfs: "29987351-7351-4835-86c1-179ad669a45eS"fu: "brenty"__proto__: Object__proto__: Object__defineGetter__: __defineGetter__() { [native code] }__defineSetter__: __defineSetter__() { [native code] }__lookupGetter__: __lookupGetter__() { [native code] }__lookupSetter__: __lookupSetter__() { [native code] }constructor: Object() { [native code] }hasOwnProperty: hasOwnProperty() { [native code] }isPrototypeOf: isPrototypeOf() { [native code] }propertyIsEnumerable: propertyIsEnumerable() { [native code] }toLocaleString: toLocaleString() { [native code] }toString: toString() { [native code] }valueOf: valueOf() { [native code] }get __proto__: __proto__() { [native code] }set __proto__: __proto__() { [native code] }customHeaders: Objecttype: "voice"__proto__: ObjectdataChannels: Object__proto__: Objecterror: nulleventListeners: Array[3]0: Object1: Object2: Objectlength: 3__proto__: Array[0]fromId: "triniwiz"hangupRetries: 6iceMapRx: Object__proto__: ObjecticeMapTx: Array[0]length: 0__proto__: Array[0]incomingStream: undefinedincomingStreamURL: undefinedjoinBuffer: Object__proto__: ObjectoutgoingOffer: RTCSessionDescriptionsdp: "v=0
↵o=- 2486728347566751432 2 IN IP4 127.0.0.1
↵s=-
↵t=0 0
↵a=group:BUNDLE audio video
↵a=msid-semantic: WMS nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵m=audio 9 RTP/SAVPF 111 103 104 9 0 8 106 105 13 126
↵c=IN IP4 0.0.0.0
↵a=rtcp:9 IN IP4 0.0.0.0
↵a=ice-ufrag:9XgGQPNJQUYrwuC3
↵a=ice-pwd:7Y30gM1zjN0Vnt5y6IoOoNYD
↵a=fingerprint:sha-256 99:E8:0A:BB:55:9A:5F:C6:21:01:06:32:4B:5A:5E:B7:F0:A7:87:49:68:0A:20:4E:5C:AA:ED:66:87:6E:A3:AB
↵a=setup:actpass
↵a=mid:audio
↵a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
↵a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
↵a=sendrecv
↵a=rtcp-mux
↵a=rtpmap:111 opus/48000/2
↵a=fmtp:111 minptime=10; useinbandfec=1
↵a=rtpmap:103 ISAC/16000
↵a=rtpmap:104 ISAC/32000
↵a=rtpmap:9 G722/8000
↵a=rtpmap:0 PCMU/8000
↵a=rtpmap:8 PCMA/8000
↵a=rtpmap:106 CN/32000
↵a=rtpmap:105 CN/16000
↵a=rtpmap:13 CN/8000
↵a=rtpmap:126 telephone-event/8000
↵a=maxptime:60
↵a=ssrc:885316323 cname:joI6MrZklmLX+lvZ
↵a=ssrc:885316323 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG a7565e73-846b-495a-b50a-42aff6d70d06
↵a=ssrc:885316323 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:885316323 label:a7565e73-846b-495a-b50a-42aff6d70d06
↵m=video 9 RTP/SAVPF 100 116 117 96
↵c=IN IP4 0.0.0.0
↵a=rtcp:9 IN IP4 0.0.0.0
↵a=ice-ufrag:9XgGQPNJQUYrwuC3
↵a=ice-pwd:7Y30gM1zjN0Vnt5y6IoOoNYD
↵a=fingerprint:sha-256 99:E8:0A:BB:55:9A:5F:C6:21:01:06:32:4B:5A:5E:B7:F0:A7:87:49:68:0A:20:4E:5C:AA:ED:66:87:6E:A3:AB
↵a=setup:actpass
↵a=mid:video
↵a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
↵a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
↵a=extmap:4 urn:3gpp:video-orientation
↵a=sendrecv
↵a=rtcp-mux
↵a=rtpmap:100 VP8/90000
↵a=rtcp-fb:100 ccm fir
↵a=rtcp-fb:100 nack
↵a=rtcp-fb:100 nack pli
↵a=rtcp-fb:100 goog-remb
↵a=rtpmap:116 red/90000
↵a=rtpmap:117 ulpfec/90000
↵a=rtpmap:96 rtx/90000
↵a=fmtp:96 apt=100
↵a=ssrc-group:FID 3499157865 1266786744
↵a=ssrc:3499157865 cname:joI6MrZklmLX+lvZ
↵a=ssrc:3499157865 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:3499157865 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:3499157865 label:c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:1266786744 cname:joI6MrZklmLX+lvZ
↵a=ssrc:1266786744 msid:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG c62982b1-d511-4e38-99dc-f212c2f334bc
↵a=ssrc:1266786744 mslabel:nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG
↵a=ssrc:1266786744 label:c62982b1-d511-4e38-99dc-f212c2f334bc
↵"type: "offer"__proto__: RTCSessionDescriptionoutgoingStream: MediaStreamactive: trueended: falseid: "nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG"label: "nMB73xPU5jOnbz5Aek3wP4ASqlrk2Vl3cgHG"onactive: nullonaddtrack: nullonended: nulloninactive: nullonremovetrack: null__proto__: MediaStreamoutgoingStreamURL: "blob:http%3A//localhost%3A63342/72a45df9-ae1f-4098-b7e3-743589f5cc74"pcMap: ObjectproxyUrl: "audio:ISAC/0.0.0.0/0/81.19.110.135:23526"sdpAnswerBuffer: ObjectsdpMap: Objectsinch: fPAPI: Object_appKey: "appKey"_appSecret: undefined_autoStartMxp: true_customStream: undefined_expiresIn: 86400_logHandler: (message) {_logMxpHandler: (){}_multiCall: true_onlineCapability: true_sessionId: "91cf12c2-2b03-47f9-b02f-1ebcdfb97e04"_sessionSecret: "M1sdRn5z2UCTYVMGrAc6FQ=="_subInstanceId: 2586157107_supportVideo: true_url: ObjectapplicationKey: "appKey"authenticate: () { [native code] }authenticateNumber: () { [native code] }authenticateUsername: () { [native code] }callClient: icallData: () { [native code] }callPSTN: () { [native code] }callReporting: () { [native code] }capabilities: ObjectchangePassword: () { [native code] }confirmUserSMS: () { [native code] }createUser: () { [native code] }firefox: falsegetConfiguration: () { [native code] }getInstance: () { [native code] }getInstances: () { [native code] }getServerTime: () { [native code] }getTransportById: () { [native code] }getTransportByParticipants: () { [native code] }getUserProfile: () { [native code] }messageReporting: () { [native code] }mxp: ppostMedia: () { [native code] }pushMessage: () { [native code] }renewInstance: () { [native code] }renewSecret: () { [native code] }started: truetimeDelta: -252updateUser: () { [native code] }user: nverifyUserSMS: () { [native code] }__proto__: ftimeEnded: Thu Jul 02 2015 22:08:18 GMT-0400 (AST)__proto__: Invalid DatetimeEstablished: nulltimeProgressing: nulltoId: "brenty"videoSupport: truewebRtcConfig: ObjecticeServers: Array[2]0: Objecturl: "stun:23.21.150.121"__proto__: Object1: Objectlength: 2__proto__: Array[0]__proto__: Object__proto__: gprogress: 0__proto__: Notification
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Can not hang up call at this time. Will try again in 0.5 seconds (max five retries).", object: undefined}
Notification {progress: 0, message: "Call HANGUP Received", object: undefined}
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
TIMEOUT
MXPLog {message: "Added meta data to MXP message", object: q}message: "Added meta data to MXP message"object: q__proto__: MXPLog
TypeError: Cannot read property 'key' of undefined
at p.17.p.identifyEnKey (sinch.min.js:6)
at d (sinch.min.js:4)
at 8.p.then.l.nextTick.h.promiseDispatch.j (sinch.min.js:4)
at p.8.d.promiseDispatch (sinch.min.js:4)
at sinch.min.js:4
at Array.a (sinch.min.js:4)
at d (sinch.min.js:4)
TypeError: Cannot read property 'key' of undefined
at p.17.p.identifyEnKey (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:6:27539)
at d (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:9844)
at 8.p.then.l.nextTick.h.promiseDispatch.j (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:10117)
at p.8.d.promiseDispatch (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:4377)
at http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:3382
at Array.a (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:7540)
at d (http://localhost:63342/chatome/www/lib/sinch-rtc/sinch.min.js:4:836)
Notification {progress: 0, message: "Successfully initiated call, waiting for MXP signalling.", object: Object}

For some reason the API call to initiate the data-call does not seem to have been properly made, it may be due to the way you've integrated the SDK, a bug in the SDK or other issue. Does the sample apps (supplied with the SDK) work with your application key in your environment?
Also, could you make sure (by looking at the "networks" tab in chrome while making a call) that the request for initiating the call is properly made and there's no error.
If you can, could you share more details on your setup and/or code?
Edit: I'm looking for a request like this;

I was also receiving the console message Notification {progress: 0, message: "Will retrieve new Mic for stream", object: undefined} After struggling with this for some time, I found a solution that solved it for me. Basically, Sinch requires HTML5 audio elements to be present on the page. Look in your onCallProgressing and onCallEstablished event handlers and you'll see lines that look like this:
'onCallProgressing': function (TheSinchCall) {
$('#SinchRingtone').trigger("play");
},
'onCallEstablished': function (TheSinchCall) {
$('#SinchIncoming').attr('src', TheSinchCall['incomingStreamURL']);
$('#SinchRingtone').trigger('pause');
},
When $('#SinchRingtone') and $('#SinchIncoming') don't return a jQuery element because the HTML tags aren't on the page, then Sinch won't work.

Related

Unexpected error during jasmine test (with observable)

I wrote a test for the following method:
private _segmentationStatus$: Subject<string> = new Subject();
public readonly segmentationStatus: Observable<string> = this._segmentationStatus$.asObservable();
/**
* Get the status from the segmentation service.
*/
public getStatus() {
const segmentationId: string = this._segmentationIdService.segmentationId;
const segmentationStatusUrl = `${this.getSegmentationStatusUrl}/${segmentationId}/status`;
this._http
.get(segmentationStatusUrl, { responseType: 'text' })
.subscribe({
next: () => {
this._loggerService.trackTrace(`Segmentation status: ${status}`, LogSeverity.Verbose);
this._segmentationStatus$.next(status);
},
error: (error) => {
this._messageService.emitMessage(new Message(MessageCode.ErrorGetStatus, error));
this._loggerService.trackException(error);
this._segmentationStatus$.error(error);
}
});
}
To test the method I started to write a test as below:
fit('should emit a message if the request failed', done => {
let messageReceived: Message;
spyOn((service as any)._messageService, 'emitMessage').and.callFake(message => {
messageReceived = message;
});
service.segmentationStatus.subscribe({
error: () => {
expect(messageReceived.messageCode).toBe(MessageCode.ErrorGetStatus);
done();
}
});
spyOnProperty(
(service as any)._segmentationIdService,
'segmentationId',
'get'
).and.returnValue('id');
service.getStatus();
httpTestingController
.expectOne(`${service.getSegmentationStatusUrl}/id/status`)
.flush('{}', { status: 500, statusText: 'status' });
});
If I use the debugger the flow of the program and test is as expected. I see the emitted message and the error handler in the unit test is called. However, after the error handler in the unit test completes the line this._segmentationStatus$.error(error); in the productive code throws another error, which is not handled. Thus the tests fails with the message Uncaught [object Object] thrown.
I`ve read the RxJS documentation and googled the problem, but was not able to figure out what I need to do pass the test. Any help to point out where I did the mistake would be highly appreciated.
I've found the problem; there was another subscriber to segmentationStatus which did not handle the error. As nobody "trapped" the exception it bubbled up and was re-thrown. As explained in On The Subject Of Subjects (in RxJS).

OSF.DDA.Error 9020 on Office.context.mailbox.item.body.getAsync()

Since a few days we get an error response 9020 on the call Office.context.mailbox.item.body.getAsync. This code used to work flawless. Is there a Microsoft problem?
getMessageBody() {
// call the async function to get the body
Office.context.mailbox.item.body.getAsync(Office.CoercionType.Text,{},
(result) => {
this.entityAnalyzeData.EntityItem.Properties.ContactProperty.Body = String(result.value);
// inform listeners
this.mlBodySubject.next('ok');
}
);
The result is
OSF.DDA.AsyncResult {value: null, status: "failed", error: OSF.DDA.Error}
value: null
status: "failed"
error: OSF.DDA.Error
name: "GenericResponseError"
message: "Er is een interne fout opgetreden."
code: 9020
Thanks in advance for your attention!
Wilco

Set cookie in after() hook nightwatch

I tried to set cookie in nightwatch after() hook function but apparently it didn't work. The idea is I want to set the cookie's value as "failed" if the test failed and "success" if the test passed.
export = {
'#tags': [ 'heboh' ],
after(browser) {
browser
.setCookie({ name: 'mycookie', value: 'success' })
.getCookie('mycookie', function callback(result) {
console.log(result); // print null
})
.end();
},
'create heboh'(browser) {
browser
.url('http://www.google.com')
.waitForElementVisible('body', 1000)
.assert.title('Facebook'); // intended to make it failed
}
}
I specified --verbose and this is what I got
FAILED: 1 assertions failed and 1 passed (5.446s)
INFO Request: POST /wd/hub/session/null/cookie
- data: {"cookie":{"name":"mycookie","value":"true"}}
- headers: {"Content-Type":"application/json; charset=utf-8","Content-Length":45}
INFO Response 404 POST /wd/hub/session/null/cookie (19ms) { sessionId: 'null',
value:
{ error: 'invalid session id',
message: 'No active session with ID null',
stacktrace: '' },
status: 6 }
LOG → Completed command cookie (22 ms)
INFO Request: GET /wd/hub/session/null/cookie
- data:
- headers: {"Accept":"application/json"}
INFO Response 404 GET /wd/hub/session/null/cookie (15ms) { sessionId: 'null',
value:
{ error: 'invalid session id',
message: 'No active session with ID null',
stacktrace: '' },
status: 6 }
null
LOG → Completed command cookie (16 ms)
LOG → Completed command end (0 ms)
Looks like there is no session in after() function.
Try this, I believe you need to call done on your after hook.
after: function (browser, done) {
browser
.setCookie({name: 'mycookie', value: 'success'})
.getCookie('mycookie', function callback(result) {
console.log(result);
})
.end()
.perform(function () {
done();
});
}

Parse error 100

I'm getting this error most of the time in last 24 hours. Sometimes, it works ok, without any fixes. After few requests it stops working again.
This error first appears without any changes in code. My internet connection is ok.
error in browser console in my app:
POST https://api.parse.com/1/classes/NewEstateData net::ERR_CONNECTION_RESETmain.js:2000
Parse._ajax.dispatchmain.js:2003
Parse._ajaxmain.js:2109
(anonymous function)main.js:4509
_.extend.then.wrappedResolvedCallbackmain.js:4571
(anonymous function)main.js:4554
_.extend.then.runLatermain.js:4570
_.extend.thenmain.js:2098
Parse._requestmain.js:8872
Parse.Query.firstmain.js:8727
Parse.Query.getmain.js:38795
Parse.Object.extend.getNewEstateByIdmain.js:36802
React.createClass.componentDidMountmain.js:17732
assign.notifyAllmain.js:30901
ON_DOM_READY_QUEUEING.closemain.js:33673
Mixin.closeAllmain.js:33614
Mixin.performmain.js:28956
batchedMountComponentIntoNodemain.js:33600
Mixin.performmain.js:26083
ReactDefaultBatchingStrategy.batchedUpdatesmain.js:31827
batchedUpdatesmain.js:29091
ReactMount._renderNewRootComponentmain.js:30330
ReactPerf.measure.wrappermain.js:29180
ReactMount.rendermain.js:30330
ReactPerf.measure.wrappermain.js:38781
(anonymous function)main.js:15664
React.createClass.statics.run.dispatchHandlermain.js:15632
(anonymous function)main.js:14686
(anonymous function)main.js:14686
(anonymous function)main.js:14689
Transition.tomain.js:15631
(anonymous function)main.js:14668
Transition.frommain.js:15628
dispatchmain.js:15679
refreshmain.js:15675
runmain.js:16367
runRoutermain.js:38780
224../components/appmain.js:1
smain.js:1
emain.js:1
(anonymous function)
main.js:38800
getById() error null Parse.Error {code: 100, message: "XMLHttpRequest failed: {"statusText":"","status":0…null,"onload":null,"onerror":null,"onabort":null}"}code: 100message: "XMLHttpRequest failed: {"statusText":"","status":0,"responseURL":"","response":"","responseType":"","responseXML":null,"responseText":"","upload":{"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null},"withCredentials":false,"readyState":4,"timeout":0,"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null}"__proto__: Parse.Errorconstructor: function (code, message) {ACCOUNT_ALREADY_LINKED: 208AGGREGATE_ERROR: 600CACHE_MISS: 120COMMAND_UNAVAILABLE: 108CONNECTION_FAILED: 100DUPLICATE_VALUE: 137EMAIL_MISSING: 204EMAIL_NOT_FOUND: 205EMAIL_TAKEN: 203EXCEEDED_QUOTA: 140FILE_DELETE_ERROR: 153FILE_READ_ERROR: 601FILE_SAVE_ERROR: 130FILE_TOO_LARGE: 129INCORRECT_TYPE: 111INTERNAL_SERVER_ERROR: 1INVALID_ACL: 123INVALID_CHANNEL_NAME: 112INVALID_CLASS_NAME: 103INVALID_CONTENT_LENGTH: 128INVALID_EMAIL_ADDRESS: 125INVALID_EVENT_NAME: 160INVALID_FILE_NAME: 122INVALID_IMAGE_DATA: 150INVALID_JSON: 107INVALID_KEY_NAME: 105INVALID_LINKED_SESSION: 251INVALID_NESTED_KEY: 121INVALID_POINTER: 106INVALID_PUSH_TIME_ERROR: 152INVALID_QUERY: 102INVALID_ROLE_NAME: 139INVALID_SESSION_TOKEN: 209LINKED_ID_MISSING: 250MISSING_CONTENT_LENGTH: 127MISSING_CONTENT_TYPE: 126MISSING_OBJECT_ID: 104MUST_CREATE_USER_THROUGH_SIGNUP: 207NOT_INITIALIZED: 109OBJECT_NOT_FOUND: 101OBJECT_TOO_LARGE: 116OPERATION_FORBIDDEN: 119OTHER_CAUSE: -1PASSWORD_MISSING: 201PUSH_MISCONFIGURED: 115REQUEST_LIMIT_EXCEEDED: 155SCRIPT_FAILED: 141SESSION_MISSING: 206TIMEOUT: 124UNSAVED_FILE_ERROR: 151UNSUPPORTED_SERVICE: 252USERNAME_MISSING: 200USERNAME_TAKEN: 202VALIDATION_ERROR: 142X_DOMAIN_REQUEST: 602arguments: nullcaller: nulllength: 2name: ""prototype: Parse.Error__proto__: function Empty() {}<function scope>__proto__: Object__defineGetter__: function __defineGetter__() { [native code] }__defineSetter__: function __defineSetter__() { [native code] }__lookupGetter__: function __lookupGetter__() { [native code] }__lookupSetter__: function __lookupSetter__() { [native code] }constructor: function Object() { [native code] }hasOwnProperty: function hasOwnProperty() { [native code] }isPrototypeOf: function isPrototypeOf() { [native code] }propertyIsEnumerable: function propertyIsEnumerable() { [native code] }toLocaleString: function toLocaleString() { [native code] }toString: function toString() { [native code] }valueOf: function valueOf() { [native code] }get __proto__: function __proto__() { [native code] }set __proto__: function __proto__() { [native code] }main.js:38800
Parse.Object.extend.getNewEstateById.query.get.errormain.js:4645
(anonymous function)main.js:4533
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4549
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4539
(anonymous function)main.js:4533
_.extend.then.wrappedRejectedCallbackmain.js:4575
(anonymous function)main.js:4554
_.extend.then.runLatermain.js:4574
_.extend.thenmain.js:4536
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4549
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4539
(anonymous function)main.js:4533
_.extend.then.wrappedRejectedCallbackmain.js:4575
(anonymous function)main.js:4554
_.extend.then.runLatermain.js:4574
_.extend.thenmain.js:4536
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4516
(anonymous function)main.js:4533
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:4539
(anonymous function)main.js:4533
_.extend.then.wrappedRejectedCallbackmain.js:4575
(anonymous function)main.js:4554
_.extend.then.runLatermain.js:4574
_.extend.thenmain.js:4536
_.extend.then.wrappedRejectedCallbackmain.js:4471
(anonymous function)main.js:522
_.each._.forEachmain.js:4470
_.extend.rejectmain.js:1987
Parse._ajax.xhr.onreadystatechange
Parse.com administrative panel - the same. Can't fetch any data, getting an error:
XMLHttpRequest failed: {"statusText":"","status":0,"responseURL":"","response":"","responseType":"","responseXML":null,"responseText":"","upload":{"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null},"withCredentials":false,"readyState":4,"timeout":0,"ontimeout":null,"onprogress":null,"onloadstart":null,"onloadend":null,"onload":null,"onerror":null,"onabort":null}
There are no excessive API requests.

QUnit asyncTest for CORS AJAX Call always fails

I am learning QUnit Unit Testing for UI testing.
I want to test an AJAX CORS Call with asyncTest function by QUnit and following is my code,
asyncTest("Async Test", 1, function () {
$.getJSON("http://oursite.com/api/product" + "/?PageSize=' + 25 + '&ActiveOnly=' + 1
+ '&Index=' + 0", function (data) {
deepEqual(data, {
status: "ok"
});
start();
});
});
but IE Gives me following error
1.Died on test #1: Invalid character - { "description": "Invalid character", "number": - 2146827274, "stack": "SyntaxError: Invalid character at parseJSON (http://oursite.com/scripts/json.js:532:13) at ajax (http://oursite.com/Scripts/jquery- 2.0.3.js:7276:4) at Anonymous function (http://oursite.com/Scripts/jquery-2.0.3.js:7447:3) at getJSON (http://oursite.com/Scripts/jquery-2.0.3.js:7430:3) at Anonymous function (http://oursite.com/scripts/custom/JSUnitTest.js:64:5) at run (http://oursite.com/scripts/qunit.js:102:4) at Anonymous function (http://oursite.com/scripts/qunit.js:232:5) at process (http://oursite.com/scripts/qunit.js:869:4) at Anonymous function (http://oursite.com/scripts/qunit.js:408:5)", "toJSONString": function( a ){ [code] }, "parseJSON": function( a ){ [code] } }
PLEASE NOTE: qunit asyncTest is not even making an AJAX Call, I guess it is failing even before it does anything. It is a PARSING Error but why?
Any help will be appreciated. Thanks in advance.

Resources