CleverTap / clevertap-flutter

CleverTap Flutter SDK
Other
30 stars 42 forks source link

Flutter Web CleverTap Event Structure Is Invalid Error #213

Closed sahinemin closed 5 months ago

sahinemin commented 5 months ago

We are currently in the process of integrating the CleverTap plugin into our Flutter web application. Following the documentation guidelines, we have successfully completed the necessary steps, and the plugin functions as expected on our localhost .

However, upon deployment to our server, we encounter a recurring issue where we receive a "512 Invalid event structure" error. Also in localhost if we run the flutter app with "--release" flag it gives the same error.

Additionally, we have discovered that using the console and entering JavaScript code such as clevertap.event.push("example") also records events successfully on the deployment environment.

image

Upon investigation, it appears that the issue may not be directly related to the event structure , as the error message suggests. It's noteworthy that this discrepancy is specific to the web platform, as the integration remains operational on both iOS and Android. We are using the same structure.

You can find the sample function you can use. await CleverTapPlugin.recordEvent("home-screen viewed", {});