Error from flutter web SDK

I have encountered problems when trying to connect to the backend from the SDK for flutter web, the functions with exceptions returned have been:"TestTable").findFirst()
I get the exception: PlatformException(error, NoSuchMethodError: invalid member on null: 'forEach', null)

Backendless.customService .invoke("onBoarding", "flutter", {"pageSize": 10})
I get the exception: PlatformException(error, Invalid argument: Instance of 'NativeJavaScriptObject', null)

These exceptions don’t occur when I run on iOS or Android

Screen Shot 2020-08-27 at 12.02.38 PM

In the case of android it generates an exception with object type arguments, it only accepts type arrays
PlatformException(error, java.util.HashMap cannot be cast to java.util.List, null)

Hi @David_Delagneau

Both of these problem have been fixed in v.6.0.2. Can you please update the plugin version and verify that findFirst and Custom Service invocation works for Web platform?

Best Regards,

Thanks for your prompt reply, I just upgraded to v6.0.2 from flutter, getting the following results:

  • findFirst - web

    • Now the object is getting it from the backend without problem
  • customService.invoke - web

    • I still get the exception: PlatformException(error, Invalid argument: Instance of 'NativeJavaScriptObject', null)
  • customService.invoke - android

    • Indeed, the problem when compiling for Android with customService has been solved, now it receives Map type being uniform in all platforms

Hi @David_Delagneau

We fixed the issue in v.6.0.3 of the plugin. Can you please update it and verify that everything works fine?
I want to notice that now Flutter SDK makes direct REST calls for Custom Service. The parameters should be of the type, the server is expecting, whether it’s a Map or a single value.

Best Regards,

1 Like

Thank you very much @Maksym_Khobotin now everything works fine

1 Like