Google Sign-In for iOS crash? - ios

In an iOS project that uses Google Sign-In SDK (v5.0.2, added manually to the project, as well as GTM and Firebase), we have a crash that we could reproduce several times with a specific account on a specific device, when trying to sign in with a Google account.
The crash is:
** Assertion failure in +[UIAlertAction _actionWithTitle:descriptiveText:image:style:handler:shouldDismissHandler:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3901.4.5/UIAlertAction.m:42
The stack trace says the crash appears in
+[UIAlertAction actionWithTitle:style:handler:]
-[GIDEMMErrorHandler passcodeRequiredAlertWithCompletion:] + 556
-[GIDEMMErrorHandler handleErrorFromResponse:completion:]_block_invoke + 724
Poking with the debugger, it looks like UIAlertAction is passed a nil title, which causes an assertion failure.
The OS of the device is iOS 13.3.1.
I can't find an official way to report a bug in the Google Sign-In SDK, the Google issue tracker seems to be restricted to people with specific permissions, and they otherwise point to a forum that doesn't exist anymore, or to Stack Overflow...

The problem is that the resource bundle isn't being correctly linked in your project so the SDK gets a nil string for the action dialog which triggers the crash.
Until Google will gracefully fix it by providing a fallback string you can verify how you are linking the GoogleSignIn.bundle in your project

Related

How to find the place where the iOS code crashes using Firebase ? (when you can't reproduce the bug)

I'm using Firebase to get information about crashes of users of my application. Most of the crashes has no any useful information about code or place where it happens. All stack-trace and threads shows "Missing" text. Also I can't reproduce these crashes at my PC.
That crash is on Mac OS application, not iOS. My point of view is to look at that doc, (see "Build Your App With Symbol Information"). But may be on Mac OS apps that feature is not available.
https://developer.apple.com/documentation/xcode/building_your_app_to_include_debugging_information
What can I do to find the place it crashes ? See attached screenshot

Error with Universal Links on phone w/ iOS 13

I am seeing the below error in iOS 13 when trying to setup an app with universal links. Has anyone seen this or know what it means?
I am seeing this error in the device console for the swcd process.
Error getting enterprise-managed associated domains data. If this device is not enterprise-managed, this is normal:
Error Domain=SWCErrorDomain Code=1701 "Failed to get associated domain data from ManagedConfiguration framework." UserInfo={NSDebugDescription=Failed to get associated domain data from ManagedConfiguration framework., Line=250, Function=<private>}
When I install the same app on an iOS 12 device it works perfectly fine. Any thoughts would be appreciated
It seems that upgrading to iOS 13.2.2 solves the issue.
There is no official confirmation about this, but is seems resolved on iOS 13.2.2.
There may be some different places that cause this problem. Note that the format of AASA file seems to be changed recently. Please refer to this.
If the delegate isn't called, and there are some Google Analysis or Firebase features in the app, then it may be caused by method swizzling. If that's the case, please refer to my answer here.

iOS - Crashes not getting logged with log “[Crashlytics:Crash] Reporting is disabled”

I'm trying to set up a new organization to make sure that Debug (debugger not attached) builds' crashes are not dirtying the production Crashlytics. For Debug builds, I use a different organization and a different one for Release.
I am trying to achieve this by changing the API Keys & Build Secret. The problem that I'm facing is that with the new organization my crashes are not getting logged. I've double checked the API Key & Build Secret.
I see logs like these:
Crashlytics:Crash] Reporting is disabled
[Crashlytics] Crash reporting could not be initialized
The code I'm using to initialize Crashlytics looks like this ->
Fabric.with([Crashlytics.start(withAPIKey: my_private_api_key), Answers.self])
The crash reporting is working fine with the older organization, it's just the newer organization that's causing issues.
I've seen a previous question asked here and done a fair bit of researching + trial and error but I've not been able to find a solution.

'Open this page in "null"' Modal appearing from FacebookSDK login after iOS9 and Swift 2 upgrade

I'm in the process of updating projects to Swift 2 and iOS 9. One of the projects I'm doing relies heavily on Facebooks SDK. I use it to login, get user information, ect... Prior ot the update, once you logged in the Safari would redirect you directly to the app. Now I'm getting a fun little modal displaying the following (See Fig 1 at bottom)
I assume this has some connection to the new Info.plist key we add LSApplicationQueriesSchemes with a Item0 as fbauth2 now required by iOS 9.
I also noticed I'm getting a stack trace with my app saying:
failed for URL: "fbauth2:///" - error: "(null)"
I found the reoccurence of the new key data fbauth2 interesting, and I'm assuming that there is now a way to configure what this modal will say upon redirect. Does anyone have any idea how to configure this? I'm assuming this is a common issue for all those updating their apps. Thanks!
Fig 1
Make sure that you have updated to the newest version of the Facebook SDK at http://fb.me/FacebookSDKs-iOS-20150910.zip.
You will also want to Whitelist the Facebook Servers for Network Requests.
More information on this can be found here.
Specifically look at steps #2 & #3.
From the documentation in Step #3 there were also changes to the canOpenURL method:
Why do I see console messages like 'canOpenURL: failed for URL: "fb...://' or ?
This is an Xcode warning indicating the the canOpenURL: call returned false. As long as you have configured the LSApplicationQueriesSchemes entry in your plist as described above, you can ignore this warning

Parse.com 1.6 crash analytics upload failure

I have a problem getting the new crash reporting in Parse 1.6 to work. The symptoms are the same as parse.com 1.6 crash analytics not working , but my reputation is too low to add my information.
1) I followed the quick start and guide to set up crash reporting and upload my symbols
https://parse.com/docs/ios_guide#crashreporting/iOS
https://parse.com/apps/quickstart#analytics/crashreporting/ios/existing
2) I'm following the instructions to generate a crash report by running the app directly in the simulator (iOS 7-8) and on the device (iOS 6) without a debugger attached. On the simulator I can actually see the minidump being created in Library/Parse/PFCrashReports.
3) When launching the app again I get the message "Breakpad Uploader: unable to determine minidump file length" and the crash dump disappears from the file system. So I assume Parse uses google breakpad under the hood, and the error is created by Uploader.mm because the call to stat() fails. I tried the same call in my own code and it succeeds there.
My gut feeling is that there is either a permission problems, or some other code locks the file while the uploader tries to access it. As the parse libraries are closed source it is hard to check anything, though. It is a bit suspicious that other people don't seem to have a problem with this, which may mean some other settings or configuration problem.

Resources