Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@rishabnayak
Copy link
Contributor

Fixes flutter/flutter#28578, which was an artifact introduced by #1210 which tried to fix flutter/flutter#27888 and flutter/flutter#24333.

This issue is most likely caused by #1210 as this commit is correlated with the version roll to 0.1.1, which is confirmed by git blame.

Thanks to @aytunch for confirming that the build works with cloud_functions: 0.1.0+1

Performs a null check on the variable, reverting it to the default us-central1 if not found.

@cyanglaz cyanglaz changed the title fixed error introduced by #1210 [cloud_functions]fixed error introduced by #1210 Mar 1, 2019
CloudFunctions({FirebaseApp app, String region})
: _app = app ?? FirebaseApp.instance,
_region = region;
_region = region ?? "us-central1";
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like defaulting to a certain value behind the scene might be hard to debug for users that does not enable the "us-central1" region in their application. Do google cloud always enable "us-central1"?
Maybe `assert (region != null) is better.
@collinjackson

Copy link
Contributor Author

@rishabnayak rishabnayak Mar 1, 2019

Choose a reason for hiding this comment

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

I agree, but apparently the Cloud Functions docs say that they run in the us-central1 region by default. Here's the link

@collinjackson
Copy link
Contributor

Thanks for the contribution! I fixed this a different way, see #1316

@rishabnayak rishabnayak deleted the cloud-functions branch March 7, 2019 03:20
@gustavobrian
Copy link

help me please:
firebase_auth: ^0.8.1+4
cloud_firestore: ^0.9.5+2
cloud_functions: 0.1.1+1
firebase_storage: ^2.1.0+1
firebase_core: ^0.3.1+1
firebase_analytics: ^2.0.3
firebase_messaging: ^4.0.0+1

Xcode's output:

/Volumes/Home/gustavobrian/.pub-cache/hosted/pub.dartlang.org/cloud_functions-0.1.1+1/ios/Classes/CloudFunctionsPlugin.m:49:16: error: no visible @interface for 'FIRFunctions' declares the selector 'callFunction:withObject:completion:'
[functions callFunction:functionName
~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

@rishabnayak
Copy link
Contributor Author

@gustavobrian #1316 fixed this issue, there should be a version bump for cloud_functions from 0.1.1+1 to 0.1.2 soon; that should take care of this issue for you! Till then, hold on, or, you could get the bleeding-edge version by editing your cloud_functions entry in your pubspec.yaml file to look like this

  cloud_functions:
    git:
      url: https://github.com/flutter/plugins.git
      path: packages/cloud_functions

@gustavobrian
Copy link

#1316

i love you!!!

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.

[cloud_functions] - Internal Exception invisible to the user cloud_functions non-default Firebase app support

6 participants