While downloading image, I lost my connection. Then, I reconnect to Internet and re-download the image again. however, I can't download this image anymore, each time I tried to download the image, I got error status: "Domain=NSURLErrorDomain Code=-1100 "The operation couldnāt be completed. (NSURLErrorDomain error -1100.)". please help me !
@hungbv according to this
the error you are having is because the file does not exist.
can you make sure the online image exists?
thanks
closing this now.You can reopen if you have more info
The online image is exist because after I can't download image by SDWebImage, I used NSURLSession to download that image. my problem is: if I lost internet while downloading by SDWebImage (I used function sd_setImageWithURL: placeholderImage: completed: ), I can't redownload that image by SDWebImage until I close and reopen my app. I think SDWebImage cache download progress somewhere but both SDImageCache.sharedImageCache().clearMemory() and SDImageCache.sharedImageCache().clearDisk() do not solved my problem
@hungbv can you please try using this SDWebImageRetryFailed in the options of the method you are using. Please let me know how it turns out
@mythodeia It's worked, thank you so much
glad it worked for you
I got this error on this image:
http://img4.imgtn.bdimg.com/it/u=2496578486,2607734154&fm=21&gp=0.jpg
and add the retry option still not working. But it can be displayed in the web browser. Is there something wrong with that image file?
@f33chobits using your image i get:
403 "The operation couldnāt be completed. (NSURLErrorDomain error 403.)
according to wiki:
A web server may return a 403 Forbidden HTTP status code in response to a
request from a client for a web page or resource to indicate that the server
can be reached and understood the request, but refuses to take any further action.
Requests from different countries might have been blocked. Bad thing.
Never mind. We have changed it to another image file and it seems working now.
Thanks.
:+1:
When I tried to download image with Japanese words in download url like this "åē§°ęŖčØå®-4.png", error happened: "Error Domain=NSURLErrorDomain Code=500 "The operation couldnāt be completed. (NSURLErrorDomain error 500.)". It works well when I change url with no Japanese words in the URL. How can I download image with Japanese word in my url? please help me, thanks
@hungbv i think this is unrelated with the current closed issue.
maybe this can help you
@mythodeia I'll try it, thank you :)
Yes, I have found this issue and fixed.
By adding a header field User-Agent with the value of Mozilla/5.0 (iPod; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1, which same as to the Safari Browser's, everything works well again
Most helpful comment
@hungbv can you please try using this
SDWebImageRetryFailedin the options of the method you are using. Please let me know how it turns out