Ejecta
Ejecta copied to clipboard
EXC_BAD_ACCESS Error (on iOS) when using Stream
I am using stream in my weex project, the apps crash everytime I try to run it on iOS simulator. It works fine on android though.
If I comment out the stream code (viz commenting the code where I am using stream and import is still uncommented) the application works fine on both the platform.
Considering that stream code is working fine on android concludes that there is nothing wrong with my Vue code (maybe I am not doing some iOS specific thingy).
Here is the code:
stream.fetch({
method: 'GET',
type: 'json',
url: 'https://example.com/someUrl.json'
}, res => {
if(res.ok){
this.isLoading = false;
this.isError = false;
this.number = res.data.number;
this.name = res.data.name;
}else{
this.isLoading = false;
this.isError = true;
}
});
The error which I get is on the following line:
callbackRsp setObject:@{ @"OPENED": @1 } forKey:@"readyState"];
progressCallback(callbackRsp, TRUE);
The error is:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
Occuring on progressCallback
line.
What I can think of is that it could be because of some package which I need to install or maybe version number of something is messed up because on playground it is working absolutely fine.
Any help would greatly appreciated.
Ejecta supports XmlHttpRequest out of the box. Have you tried that?