Andrea Grippi
Andrea Grippi

Reputation: 1589

Cloud function exception in Flutter

I'm facing an issue after updating all my libraries to comply with AndroidX. Specifically, when I try to use the package "cloud_functions", I receive this error message:

flutter: throwing generic exception
flutter: Exception: Unable to call function funName

Now, I didn't touch the code handling the call, I simply updated the packages in the yaml file.

My code is:

cfResponse = await CloudFunctions.instance.call(
      functionName: 'funName',
      parameters: {
        "p1": p1,
        "p2": p2,
      },
    ).then((response) {
      return response;
    }).catchError((error) {
      print(error);
      return null;
    });

I'm having the same issue both on Android and iOS.

My libraries are at version:
- cloud_functions: ^0.1.1
- firebase_auth: ^0.8.1+4

I'm on Flutter 1.2.1 and Dart 2.1.2

Upvotes: 1

Views: 1574

Answers (1)

Brad
Brad

Reputation: 122

I ran into the same issue but only on iOS and came across cloud_functions bug. I manually set the region like the PR does and was able to get it to work. It looks like the fix will be in a coming release.

Upvotes: 2

Related Questions