-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Crash in -[FIRMessagingRmq2PersistentStore openDatabase:] caused by Messaging setup #199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Occurring in 4.1 also. Can't reproduce on demand, but hundreds of crashes reported in Crashlytics (still around 2-3% of daily sessions). |
Are there any patterns about the device types with the crashes? Are they low in available storage? |
Mostly commonly used 6/6s/7(+) iPhones. iOS 10+. Generally low on memory (1-5%), but memory varies up to 50% free. |
Sorry, disk space up to 50%. |
I'd love it if there was a way to reproduce this, but failing that, we can add some additional safety around this. What's strange is that we haven't seen this reported before (and this code has not changed in a very long time). |
I'd definitely like to have a repro case, I'll see if I can manage to automate the startup sequence and trigger it :) Judging from this community version, could it be crashing in sqlite init part? In the meantime, I'll have to revert to 3.x - do you think that may cause further issues? |
Thanks for the info. And it's also interesting that it works in 3.X but is crashy on 4.X. We haven't modified that code in a long time. I don't think you're negatively affected by reverting to 3.X, but obviously we'd like everyone to be on the latest version (much easier for us to provide support!). |
I'd also like to flag myself as getting this issue quite consistently. Maybe 8-9% DAUs? Let me know what I can do to help you guys track this down. My observations:
I'm still combing through the stack traces, let me know if there's more information I can provide. |
After reverting to 3.x, crashes are indeed gone. I’ll make isolated examples of Firebase setups I’m using for both, but there’s nothing special really. |
We only started seeing this issue with the recent 4.1.1 release. @VladislavJevremovic did you need to revert all the way back to 3.x? Did you try 4.0.2? |
Actually, I think 4.0.4 was the first 4.x I used. I noticed the issue then. Can’t vouch for anything before that. |
Hmm, this is getting worrisome. Another question: Are your apps Swift-only? What other SDKs are you guys using (wondering if there is some conflict with sqlite) |
Ours is 95% Swift. Our bridging header is
The main dependency there is the Facebook stuff, and I'm not sure why we're still using Objective-C versions of their libraries. Pod dependencies are
|
My code is Swift-only, 3rd party libs most probably not:
(only GoogleSignIn in bridging header) Grepping the workspace for 'sqlite' revealed only uploadDSYM (from Fabric/Crashlytics) apart from Firebase itself. |
Same. Aside from FirebaseMessaging and FirebaseAnalytics I only see sqlite referenced in uploadDSYM. |
FYI the function that is crashing is here |
I don't know if this is relevant, but the dashboard in Crashlytics shows "App in Focus 25%". I'm not sure what that means, but it seems odd. Especially odd since this crash is happening in the Could this perhaps be triggered by an app transition to the background during a slow-running disk operation? Or maybe I'm misunderstanding what the Crashlytics graph means, or perhaps it's just plain wrong. |
Is anyone here using Core Data for other aspects of their app? Wondering if it's related to this SO post: https://stackoverflow.com/questions/39335386/did-ios10-remove-the-ability-to-read-a-sqlite-database-from-the-bundle |
We're not using Core Data.
…On Fri, Sep 8, 2017 at 6:19 PM Riz ***@***.***> wrote:
Is anyone here using Core Data for other aspects of their app? Wondering
if it's related to this SO post:
https://stackoverflow.com/questions/39335386/did-ios10-remove-the-ability-to-read-a-sqlite-database-from-the-bundle
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#199 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAl2Gpln0PprfM-DKIx2OwYG1DLKF8iqks5sgb1rgaJpZM4O4xwW>
.
|
No Core Data here either. |
App in Focus < 1% |
For us also app in focus < 1%, but it's something that crashlytics gets wrong, as we get same app in focus rate for definitely in-focus crashes as well. |
We could add some debugging info in crashlytics logs and flags, such as app state on launch if that helps and get back to you with additional info. Any ideas what might be useful? |
We're seeing this crash as well. Contrary to everyone else, however, we're getting App in Focus 100%. I'm happy to provide any information needed to help debug this. |
Thanks for all the info, everyone. Some more questions: Is it possible to see any logs leading up to the crash? Is there any information like
... in the logs? If someone can create a public link for a particular Crashlytics crash (it hides many of the private fields for a crash, so it's safe to show publicly), that would be great. I'm adding additional logging to figure out the exact result code for the crash. |
Hi Riz, thanks for the followup. I searched all of our available device logs for the token I'm not sure how to create a public link to a specific crash session (I do Thanks for your help and let me know if there's anything else I can |
This removes the `FIRMessaging_FAIL` macro which was using `__builtin_trap()`, and replaced with `NSAssert` calls. These `NSAssert` calls may not get called in release builds, and so we also log them with FIRLogger error messages. The RMQ database open error result code is now parsed and included in the error message to help us identify causes for #199
This removes the `FIRMessaging_FAIL` macro which was using `__builtin_trap()`, and replaced with `NSAssert` calls. These `NSAssert` calls may not get called in release builds, and so we also log them with FIRLogger error messages. The RMQ database open error result code is now parsed and included in the error message to help us identify causes for #199
Ok, so this PR should stop the crash from occurring, however it doesn't solve the underlying issue and may still cause an exception down the line. The error code detail for why the database open failed is now being logged as an error in the console, so I'm hoping that if you see this happening, we can learn why it's failing. I'd also suggest that if you are not using direct-channel data messages, then you should set:
Since most of the database-related actions are for the direct socket channel. |
This removes the `FIRMessaging_FAIL` macro which was using `__builtin_trap()`, and replaced with `NSAssert` calls. These `NSAssert` calls may not get called in release builds, and so we also log them with FIRLogger error messages. The RMQ database open error result code is now parsed and included in the error message to help us identify causes for #199 .
We also see this in our app quite often. We do not use core data and are 100% swift. Currently on FBSKD 4.1.0. |
The issue seems to be gone in the current release, as expected. However, as said above, I’m not sure how we can pull the logs from devices out there. Never seen it in test yet. Issue can be closed if you wish. Hoped we could get a definitive reason why it occurred, though. |
Thanks @VladislavJevremovic. We'll keep an eye out for this issue in the future, and please re-open this ticket if it regresses. |
This removes the `FIRMessaging_FAIL` macro which was using `__builtin_trap()`, and replaced with `NSAssert` calls. These `NSAssert` calls may not get called in release builds, and so we also log them with FIRLogger error messages. The RMQ database open error result code is now parsed and included in the error message to help us identify causes for firebase#199 .
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Since the migration to Firebase SDK v4 I'm facing intermittent (2-3% DAU) EXC_BREAKPOINT crashes in [FIRMessagingRmq2PersistentStore openDatabase:]
Steps to reproduce:
Code is setup as in https://github.com/firebase/quickstart-ios/blob/master/messaging/MessagingExampleSwift/AppDelegate.swift
Running on main thread:
Relevant Code:
Relevant threads in stack trace:
The text was updated successfully, but these errors were encountered: