apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 988 forks source link

WKWebView cancelled request(NSURLErrorCancelled -999) leads to errorUrl page instead of the second request #959

Closed arunn closed 6 days ago

arunn commented 4 years ago

Bug Report

Problem

A request cancelled due to another request ends up showing the error page instead of response of the second request.

What is expected to happen?

The response of the second request should be shown.

What does actually happen?

The errorUrl page is shown.

Information

The error is similar to https://github.com/apache/cordova-plugin-wkwebview-engine/issues/83 . We have two requests being run one after the other. The first request is cancelled once the second request is made. Instead of waiting for the response of the second request, the didFailLoadWithError shows the errorUrl page.

Environment, Platform, Device

cordova-ios, iPhone 8(iOS 13.6)

Version information

cordova(9.0.0) cordova-ios(5.1.1) cordova-plugin-wkwebviewengine(1.2.1)

Filing it here since the code has been integrated as of cordova-ios 6.0.0 and the issue doesn't seem to be fixed in the code.

Checklist

tdfeslo commented 2 years ago

Hi. Is there any news about this problem? The solution proposed here solves the problem but may be introduce other problems (regression) ? Thanks