3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Flutter][Cloud Functions] Cloud Functionsでリージョンを'asia-northeast1'にした時のFlutterでの呼び出し方法

Posted at

記述コード

サンプルに従って以下を記述していたが、Exceptionが発生した。

final HttpsCallable callable = CloudFunctions.instance.getHttpsCallable(
  functionName: 'FUNCTION NAME',
);
dynamic result = await callable.call();

エラー内容

スクリーンショット 2020-05-24 12.29.35.png
  • エラーコード
    3840
  • エラーメッセージ
    データのフォーマットが正しくないため、読み込めませんでした。

解決策

CloudFunctions生成時にregionを指定してあげる

CloudFunctions cloudFunctions = CloudFunctions(region: 'asia-northeast1');
HttpsCallable callable = cloudFunctions.getHttpsCallable(functionName: 'FUNCTION NAME');
HttpsCallableResult result = await callable.call();
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?