[Bug]: Native bridge uses an api unsupported by older versions of Android WebView #7620
Open
1 of 3 tasks
Labels
needs reproduction
needs reproducible example to illustrate the issue
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.1.2
@capacitor/core: 6.1.2
@capacitor/android: 6.1.2
@capacitor/ios: 6.1.2
Installed Dependencies:
@capacitor/cli: 6.1.1
@capacitor/core: 6.1.1
@capacitor/android: 6.1.1
@capacitor/ios: 6.1.1
[success] Android looking great! 👌
[error] Xcode is not installed
Other API Details
Platforms Affected
Current Behavior
Sending fetch request with Request object as a parameter does not set data for request on android
This is a duplicate of #7371, I would just like to point out the cause of the issue.
I would have liked to leave a comment on that issue but it has been closed by ionitron-bot
The problem for android is that the native bridge uses
const { body } = request;
, which is only supported by versions >= 105 of the Android WebView (see MDN docs). Therefore the body is undefined, and missing in the final request.Expected Behavior
The body should be added to the request
Project Reproduction
https://github.com/malo-malo/capacitor-android-encoding (tag
origin android-request-body-issue
)Run the project in web : you can see te body is set when clicking both buttons
Run the android project : the body is set with the first button, not with the second
(Note that I am running this on Android WebView 103 on Android 13)
Additional Information
No response
The text was updated successfully, but these errors were encountered: