Skip to content

[cloud_functions] Update cloud_functions to use platform interface #1854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jan 23, 2020
Merged

[cloud_functions] Update cloud_functions to use platform interface #1854

merged 14 commits into from
Jan 23, 2020

Conversation

sbeitzel
Copy link
Contributor

@sbeitzel sbeitzel commented Jan 22, 2020

Description

This change updates the existing cloud_functions plugin to use cloud_functions_platform_interface.

Related Issues

This addresses issue flutter/flutter#45299
It's also a drive-by fix for issue #95

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • If the pull request affects only one plugin, the PR title starts with the name of the plugin in brackets (e.g. [cloud_firestore])
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See [Contributor Guide]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide].
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy].
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • No, this is not a breaking change.

Copy link

@harryterkelsen harryterkelsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with nits

@collinjackson collinjackson merged commit 5b87a69 into firebase:master Jan 23, 2020
@KevinTheGray
Copy link
Contributor

@sbeitzel could you give me a quick rundown on/if there's anything to do for the following issue I had when upgrading to this version (this is on an iOS simulator):
Screen Shot 2020-01-23 at 10 58 09 AM

I haven't dug too deeply, and just downgraded for now as I have to get a quick build out.

this is the call I was making

HttpsCallableResult callableResult = await CloudFunctions.instance
          .getHttpsCallable(
            functionName: functionName,
          )
          .call(parameters);

I can dig a little deeper later today if this is an issue on my end.

@sbeitzel
Copy link
Contributor Author

I think it was an oversight on my end. Looking at the MethodChannel being registered in the new version versus the old version, I think I copy/pasted from the wrong place. The error, I suspect, lies in method_channel_cloud_functions.dart -- in the platform interface library rather than the cloud_functions library. I have to run to a meeting right now but I will prepare a patch later today.

@KevinTheGray
Copy link
Contributor

Sounds good, thanks!

@sbeitzel sbeitzel deleted the cf_pi_p3 branch January 23, 2020 19:42
@sbeitzel
Copy link
Contributor Author

Here's the PR to fix the problem.

functionName: _functionName,
parameters: parameters,
)
.then((response) => HttpsCallableResult._(response));
} on PlatformException catch (e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this catch remain, if an error does not fall into it?

@firebase firebase locked and limited conversation to collaborators Aug 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants