ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.31k stars 962 forks source link

[Bug]: XMLHttpRequest onreadystatechange not working for requests #7456

Closed JpEngelbrecht89 closed 3 weeks ago

JpEngelbrecht89 commented 3 weeks ago

Capacitor Version

💊 Capacitor Doctor 💊

Latest Dependencies:

@capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/android: 6.0.0 @capacitor/ios: 6.0.0

Installed Dependencies:

@capacitor/ios: not installed @capacitor/cli: 6.0.0 @capacitor/android: 6.0.0 @capacitor/core: 6.0.0

[success] Android looking great! 👌

Other API Details

npm: 10.2.4
node: v20.11.0

Platforms Affected

Current Behavior

After upgrading to @capacitor/android version 6.0.0, requests seem to be intercepted by CapacitorHttp but request.onreadystatechange is not updating readyState (readystate is alway 0). This is happening in both iOS and Android.

Expected Behavior

CapacitorHttp intercepts all requests like it did with Capacitor v5

Project Reproduction

https://github.com/JpEngelbrecht89/capacitor-http-error

Additional Information

Think its similar to this issue 7417

This stared happening from version 5.7.1

jcesarmobile commented 3 weeks ago

yes, it's a duplicate of https://github.com/ionic-team/capacitor/issues/7417