- Firebase/Auth (4.2.0):
- Firebase/Core
- FirebaseAuth (= 4.2.0)
- Firebase/Core (4.2.0):
- FirebaseAnalytics (= 4.0.3)
- FirebaseCore (= 4.0.7)
- FirebaseAnalytics (4.0.3):
- FirebaseCore (~> 4.0)
- FirebaseInstanceID (~> 2.0)
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseAuth (4.2.0):
- FirebaseAnalytics (~> 4.0)
- GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
- GTMSessionFetcher/Core (~> 1.1)
- FirebaseCore (4.0.7):
- GoogleToolboxForMac/NSData+zlib (~> 2.1)
- nanopb (~> 0.3)
- FirebaseInstanceID (2.0.3)
- FirebaseUI/Auth (4.3.0):
- Firebase/Auth (~> 4.2)
- FirebaseUI/Phone (4.3.0):
- FirebaseUI/Auth
FUIPhoneAuth and FIRPhoneAuthWhen entering an invalid phone number, like a 9 digit phone number for the US, the error callback is called out of the main thread
let auth = FUIAuth(uiWith: Auth.auth())!
let provider = FUIPhoneAuth(authUI: auth)
auth.providers = [provider]
auth.delegate = self
provider.signIn(withPresenting: self)
enter 123456789 as phone number, with US selected as country
This triggers a callback with an error that is in a background thread and tries to change the UI and crashes:

and the log is:
[Assert] Cannot be called with asCopy = NO on non-main thread.
*** Assertion failure in void _UIPerformResizeOfTextViewForTextContainer(NSLayoutManager *, UIView<NSTextContainerView> *, NSTextContainer *, NSUInteger)(), /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIFoundation/UIFoundation-543/UIFoundation/TextSystem/NSLayoutManager_Private.m:1619
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Only run on the main thread!'
This has already been fixed in https://github.com/firebase/firebase-ios-sdk/pull/298/files but the fix didn't make into the release.
Great, thanks. Is there an easy way to copy those changes in my pods? They seem to only include frameworks.
Hi there. I am facing the same issue. Xcode 9, iOS 11
The fix is planned for our next release. I'll update this issue when the release is available.
Hi @paulb777, great to hear! Do you have a sense of the timeline to expect? Also has a test been added to the PR done by @XiangtianDai ? I had to ship with this crash since the deadline to migrate from Digit is end of September :(
@gsabran Since you're using FUIPhoneAuth, the workaround https://github.com/firebase/FirebaseUI-iOS/pull/339 has already been merged by @yramanchuk , who can ping the thread when this is released as part of FirebaseUI.
Re-closing here. I conflated the FirebaseAuthUI with a FirebaseAuth issue.
I think it is a FirebaseAuth issue, just that FirebaseAuthUI had implemented a workaround before our fix is shipped as their release schedule is more flexible.
OK, I'll open again and update when the next Auth release goes out.
Fix released today in Firebase 4.3.0 and FirebaseAuth 4.2.1