Malformed calls from JS: Field size is diferent
cobeo2004 opened this issue · 4 comments
Hi @nandorojo,
I hope you are doing well. I'm writing this regarding the error that I am encountering in the Android platform when using Burnt.alert()
function. It is doing pretty okay in iOS platform. However, when I am switching to Android (Java 22.0.1, Gradle 88) and when I load the Burnt.alert()
function, it encounters an error given in the picture below:
Here is the information that I have took using npx react-native info
:
System:
OS: macOS 14.2.1
CPU: (10) arm64 Apple M1 Pro
Memory: 153.95 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.4.1
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 10.8.1
path: /opt/homebrew/bin/npm
Watchman:
version: 2024.07.08.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK:
API Levels:
- "34"
- "34"
- "34"
Build Tools:
- 30.0.3
- 34.0.0
System Images:
- android-31 | Google Play ARM 64 v8a
- android-34 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.15989.150.2411.11948838
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 22.0.1
path: /opt/homebrew/opt/openjdk/bin/javac
Ruby:
version: 3.2.1
path: /Users/cobeo/.rubies/ruby-3.2.1/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
In addition, here is the typescript
code that I used for testing the burnt.alert()
.
const onSignIn = async () => {
await Burnt.alert({
title: "Signing in",
message: "Please wait...",
duration: Number.MAX_VALUE,
preset: "spinner",
});
const user = await handleSignIn(email, password);
try {
if (user) {
setIsLoggedIn(true);
setUser(user);
router.navigate("/home");
await Burnt.dismissAllAlerts();
await Burnt.alert({
title: "Signed in",
message: "You are now signed in",
preset: "done",
duration: 1,
});
} else {
await Burnt.dismissAllAlerts();
await Burnt.alert({
title: "Error",
message: "Invalid credentials",
preset: "error",
duration: 3000,
});
}
} catch (error) {
await Burnt.dismissAllAlerts();
await Burnt.alert({
title: "Error",
message: "Something went wrong",
preset: "error",
duration: 3000,
});
}
};
Should you have any questions or any clarifications regarding the error, please let me know and I will try my best to deliver the informations to you. Thank you.
Best regards.
hmm not sure. what if you remove await
Hey @nandorojo, I have removed the await
on all of my codes and I am still encounters with the error. I am thinking on my Gradle
version is not compatible with Burnt (Gradle 88
). Do you have any comments with this ?
it's possible. but the android code simply uses ToastAndroid from react-native so something is off there
That could be the thing, let me try downgrade the Gradle
version to 86 and have a look at it !