Skip to content

Firestore add check if GoogleService-Info.plist isn't present #1229

Closed
@kroikie

Description

@kroikie
firebase_core: ^0.4.0+1
cloud_firestore: ^0.11.0+1
firebase_auth: ^0.11.0
firebase_messaging: ^5.0.1

Simple methods failing:

 final CollectionReference postRef = Firestore.instance.collection('Games');
        await Firestore.instance.runTransaction((Transaction tx) async {
          await tx.set(postRef.document(), data);
        });

Or 

Firestore.instance.collection('Games').add(data);

Or

Firestore.instance.collection('Games').document('key').set(data);

On direct methods add/save there is not even error coming through. However if I try transaction i got:

Unhandled Exception: PlatformException(9, Transaction failed all retries., null)
#0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:564:7)
#1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:302:33)
<asynchronous suspension>
#2      Firestore.runTransaction (package:cloud_firestore/src/firestore.dart:116:10)
<asynchronous suspension>
#3      Core.saveGameObject.<anonymous closure> (package:bigrush/helpers/core.dart:208:34)
<asynchronous suspension>
#4      new Future.<anonymous closure> (dart:async/future.dart:176:37)
#5      _rootRun (dart:async/zone.dart:1120:38)
#6      _CustomZone.run (dart:async/zone.dart:1021:19)
#7      _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#8      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#9      _rootRun (dart:async/zone.dart:1124:13)
#10     _CustomZone.run (dart:async/zone.dart:1021:19)
#11     _CustomZone.bind<…>

And if i try to do breakpoints in xcode i can go bit deeper and there was another exception

Printing description of error:
Error Domain=FIRFirestoreErrorDomain Code=9 "Transaction failed all retries." UserInfo={NSLocalizedDescription=Transaction failed all retries., NSUnderlyingError=0x600002de85a0 {Error Domain=FIRFirestoreErrorDomain Code=2 "An internal error has occurred, print and inspect the error details for more information." UserInfo={NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information.}}}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions