[Firestore][I-FST000001] Could not reach Firestore backend - ios

I have configured Firebase/Firestore, but Firestore return this error ever:
[Firestore][I-FST000001] Could not reach Firestore backend.
I'm using Swift 4 and Xcode 9. Any idea?

Update 10th March 2018 - thanks to richardfrk
This issue has now been fixed in Firebase SDK 4.10.1
Unfortunately I experienced this bug yesterday for Firebase SDK 4.10.0 and have reported it directly to one of the Firebase engineers working on the iOS SDK. For me, I only had this error when the user is not authenticated. As soon as the user is authenticated, the problem went away.
For now, I'd recommend sticking with Firebase SDK 4.9.0 until they fix it in the next update.

Related

How to programmatically get Crashlytics version with Firebase on iOS

With Fabric, it was the following (answered here):
Crashlytics.sharedInstance().version
With Firebase:
the instance is Crashlytics.crashlytics(), but there is no version on it
nothing of interest in FIRCrashlytics.h
Since Crashlytics is an NSObject, Crashlytics.version exists, but it's equal to 0.
I also looked on the FirebaseCrashlytics module to no avail.
The Crashlytics version is actually printed in the console when running FabricApp.configure in the AppDelegate, so it's clearly defined somewhere, but I need to access it to display it in the app:
${time_stamp} ${app_name}[${process_id}] [Firebase/Crashlytics] Version 4.3.1
The API was added to Firebase/Crashlytics 7.1.0: https://firebase.google.com/docs/reference/ios/firebasecore/api/reference/Functions#/c:#F#FIRFirebaseVersion
Swift:
FirebaseCore.FirebaseVersion()
Objc
FIRFirebaseVersion()
Chintan from Firebase here. This has just been implemented in the latest version of Crashlytics iOS SDK (7.0.1). So from now on Crashlytics will use the same version as iCore, so here’s the API for it: https://firebase.google.com/docs/reference/ios/firebasecore/api/reference/Functions

Google Sign in fails on iOS 13 GM

My app has a Sign in with Google button. When I try to sign in on iOS 13.0 GM GIDSignInDelegate didSignInForUser:WithError: returns this error:
Error Domain=com.google.GIDSignIn Code=-1 "The operation couldn’t be completed. (org.openid.appauth.general error -3.)"
I have no clue how to fix this issue. I'm using Google Sign In 5.0.0 as part of Firebase 6.8.1.
I figured it out! The AppAuth-iOS, which is a open-source dependency of GoogleSignIn SDK, has been updated from 1.1.0 to 1.2.0 in August, including this iOS 13 support. So you need to run pod update GoogleSignIn to update the AppAuth to 1.2.0. The GoogleSignIn SDK itself hasn't been updated since 5.0.0, so that got me confused.
Following is the solution for successfully having the login
view. Call the signin method after the ViewController's view is appeared,
it will not be dismissed programatically. I have just implemented in
IOS 13 and it works fine.
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
GIDSignIn.sharedInstance()?.delegate = self
GIDSignIn.sharedInstance()?.presentingViewController = self
GIDSignIn.sharedInstance()?.scopes = [kGTLRAuthScopeDrive]
GIDSignIn.sharedInstance()?.prepareForInterfaceBuilder()
GIDSignIn.sharedInstance()?.signIn()
}
I downloaded the Firebase 6.9.0 SDK zip and experienced this same issue. The README indicated that the bundled version of AppAuth was 1.2.0. I was able to resolve it by updating AppAuth to the master version.
Specifically, I removed the AppAuth framework included with Firebase, and instead build AppAuth using Carthage.
For future reference when other users find this question:
Google fixed this issue in GoogleSignIn v5.0.1. When updating your app to iOS 13, you'll likely have to update the GoogleSignIn SDK as well.
If you are using Firebase 6.9.0 from Carthage, add github "openid/AppAuth-iOS" "master" to your Cartfile below any Firebase entries.
Sorry if wrong.
I thought this error would happen without targeting.
Support not only from 13, but also from 10.
Solution, but don't keep your pod version up to date.
4.4.0.
pod 'GoogleSignIn', '4.4.0'
It was all right for this version.
I anticipated the error. Less than
The new version may use some code generated by xcode11.3,
So new is OK, existing one may stop processing at 13

iOS v12 Https requests errors

I noticed that https requests made from my Ionic Angular app on iOS v12 are failing respectively never reach my backend.
I could confirm that my app is productive and the fact that this error only occurs on iOS >= v12
When I debug in Xcode 10 beta I get the following error
{“headers”:{“normalizedNames”:{},“lazyUpdate”:null,“headers”:{}},“status”:0,“statusText”:“Unknown Error”,“url”:null,“ok”:false,“name”:“HttpErrorResponse”,“message”:“Http failure response for (unknown url): 0 Unknown Error”,“error”:{“isTrusted”:true}}
My Node / Express.js backend set the following headers
var allowedOrigins = ["https://example.com", "http://ionic.local", "http://localhost:8080"];
var origin = req.headers.origin;
if(allowedOrigins.indexOf(origin) > -1){
res.setHeader('Access-Control-Allow-Origin', origin);
} else {
res.setHeader("Access-Control-Allow-Origin", "https://example.com");
}
res.header("Access-Control-Allow-Credentials", "true")
res.header("Access-Control-Allow-Headers", "Origin, Authorization, Content-Type, Content-Range, Content-Disposition, Content-Description, X-Requested-With, X-ACCESS_TOKEN");
res.header("Access-Control-Allow-Methods", "GET,PUT,POST");
Anyone is facing the same problem?
What did you change in your code to fix the problem for iOS v12?
P.S.:
I have opened an issue by Apple
Also here the linked subject on the Ionic forum: https://forum.ionicframework.com/t/ios-12-beta-preflight-requests-fail
And just in case opened an issue on the WkWebView plugin: https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/112
UPDATE
I'm not sure but it looks like that I only face issue while querying POST requests respectively that I don't face it while doing GET requests...could you confirm that too?
UPDATE 2
In the following discussion/issue, https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/112, we are also betting on a bug in the iOS version itself. Let see if it will be corrected with the next beta version
UPDATE 3
Xcode 10 beta 2 respectively iOS 12 beta 2 released Tuesday 19th June 2018 solved my problem
The problem was an internal problem of iOS 12 beta 1
Xcode 10 beta 2 respectively iOS 12 beta 2 released Tuesday 19th June 2018 solved my problem
I'm feeling very confident that this is just a beta 1 bug with no confirmed work around. I never found an opportunity to get this verified in person while at WWDC, but it seems to be very confirmed by multiple sources including this bug on open radar. I'm going to file an additional bug with Apple directly and will update my answer with any responses.
Update:
I've tested multiple devices on iOS 12 beta 2 and the issue seems to be resolved. No update on the bug filed with Apple, but I'm going to assume that it was addressed in the latest update.
Update 2:
Apple has finally closed my bug as fixed.
Test is issue, On iOS 12, below two ways will not run into this issue
request with HTTP
post request with form-data, not with json. if you post with JSON, will trigger option request, but webkit not post this request, so cros domain failed

Firebase crash reporting causing crashes on iOS 10

I noticed that since iOS 10 release I have couple of crashes refers to firebase library system monitoring.
Crashed: com.google.system-monitoring
SIGABRT ABORT 0x0000000186c58ff0
-[FCRSystemMetadata sampleMemoryStats] + 4300660144
I already updated to the latest version of firebase on my app, but is there any way I can fix this?
At this moment, Firebase does not work on iOS 10, neither a device nor a simulator. This is a work in progress, so please stay tuned for updates. You can follow general discussion on Firebase at the firebase-talk group, and the Firebase Blog will have announcements as they occur.

Kinvey on IOS Simulator issue

I am working on a project in Xcode using objective c. I am implementing kinvey for login purposes and found that there is an error when on login and registration, both manual and auto-generated, on the simulator. The odd thing is that the error only happens on iOS 8.3; it works fine on 9.0 or 9.3.
In 8.3 I receive the following error:
domain: #"KinveyError" - code: 406
#"Kinvey requires application/json as the Content-Type of the response"
I have tried resetting the simulator, restarting Xcode, restarting the mac, updating to the latest kinvey module, and even using an old kinvey module. The error persists, and I am not sure what else I should try.
Does the Statusshare sample app work for you?
Here is the link: http://devcenter.kinvey.com/ios/samples/statusshare
It does have new user account creation and login. I tried it on an iphone6/ iOS 8.3 simulator and Kinveykit version (1.40.7) and the sample worked fine for me.
Thanks,
Pranav
Kinvey Support

Resources