35

After updating to XCode 8 GM(Swift 3)

Firebase started logging these error's in the Console:-

FIRInstanceID/WARNING STOP!! Will reset deviceID from memory.

FIRInstanceID/WARNING Failed to fetch default token Error Domain=com.firebase.iid Code=6 "(null)"

FIRInstanceID/WARNING Failed to retrieve the default GCM token after 5 retries

Community
  • 1
  • 1
Dravidian
  • 9,945
  • 3
  • 34
  • 74
  • 4
    The Xcode8, iOS 10, Swift 3.0 trifecta has been challenging to say the least! You will need to run 'pod update' from your project directory to get the latest firebase 3.6.0. I needed to run 'git add .' to clean up all the 'missing' errors after doing that. Finally refer to the instructions at https://firebase.google.com/docs/cloud-messaging/ios/receive and https://firebase.googleblog.com/ to fix your issue. Sorry, no time for a detailed code example, I am still fixing my own apps! – Dan Ross Sep 18 '16 at 00:33
  • 2
    I have followed the steps @dan proposes but still have the warnings. Everything seems to be working however. – Simon Bengtsson Sep 18 '16 at 15:44
  • Crash Reporting uses a unique ID to identify each user. Due to a known bug in Xcode 8.1, creating this ID fails on iOS 10 simulators, preventing the upload of error reports. To work around this in Xcode 8.1, you can run tests on a device, or turn on Keychain Sharing in the Capabilities section of your app settings. This bug has been addressed in the beta release of Xcode 8.2. – Fa.Shapouri Jan 21 '17 at 11:51

2 Answers2

48

Apparently Enabling your app's KeyChain Sharing in Capabilities does the trick!

keychain sharing

After enabling your capabilities , app.entitlements should look something like this:-

entitlements

Also See:- Firebase Group Talk

Dravidian
  • 9,945
  • 3
  • 34
  • 74
0

You could try set FirebaseAutomaticScreenReportingEnabled to NO in your Info.plist file. It doesn't resolve problem, but makes Errors happening little less frequently, which makes reading console less painfully.

With FirebaseAutomaticScreenReportingEnabled == YES (which is default), error happens on every screen change. Of course setting flag to NO will disable screen reporting, so set it only of you are not using this functionality.

Errors happens only on simulator, so you may want to set this flag only for developing time.

zalogatomek
  • 666
  • 1
  • 9
  • 19