I'm trying to transition my iOS app from Crashlytics to Firebase, since Crashlytics is going to be shut down in a month. I went through the steps described here:
https://firebase.google.com/docs/crashlytics/get-started-new-sdk
It all looked great until I tried my first test distribution. I added a piece of code that would crash the app on a button tap to test that I get the crashes from distributed apps. However, it didn't work. The app crashes, but I see no crash reports. I do see that Crash-free users percentage is going down though. So something is getting registered, but the actual crashes are not there.
My fists couple of test distributions were missing DSYMs. And under DSYMs tab I could even see the crash count. However, when I did upload the DSYMs the crashes still didn't appear.
Now I'm using a script that does the DSYM upload on archive, but crashes are not showing up still.
When I do a build using Xcode and force crash everything works as expected. It's only the distributed AdHoc builds don't show any crashes in the portal.
Any kind of help is highly appreciated.
If your forced crash didn't crash, crashed before you wanted it to, or you're experiencing some other issue with Crashlytics, you can enable Crashlytics debug logging to track down the problem.
To enable debug logging on your development device, specify the following command line argument in Xcode:
Crashlytics 3.11.1+
-FIRDebugEnabled
Previous versions
func application(_ application: UIApplication, didFinishLaunchingWithOptions
launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Initialize Firebase service.
FirebaseApp.configure()
Fabric.sharedSDK().debug = true
return true
}
Boom, after hours of trying and searching.
https://github.com/firebase/firebase-ios-sdk/issues/2901
Disabling bitcode for AdHoc builds fixed it for me.
I have setup firebase in both the console and in the app. Everything configures correctly, and events appear to be logging in the app.
Output to console:
<FIRAnalytics/DEBUG> Logging event: origin, name, params: app,
log_something, {
"_o" = app;
"full_text" = khbsdpibdsjl;
name = lwkjbgskljsavdkjl;
}
I have the debug flag enabled: -FIRDebugEnabled.
Yet in the debugging events console there is NOTHING. I see no devices available, no events being logged, absolutely 0 indication of anything connected. I must be missing something?
edit: I have been following this for setting up Debugging Events. https://firebase.google.com/docs/analytics/debugview#enabling_debug_mode
I am seeing events in the StreamView, but nothing in the debug view even though I have debug mode enabled.
Try this , This is work for me ,
Follow below steps ,
1.In Xcode, select Product → Scheme → EditScheme.
2.Select Run from left Menu and Select Arguments tab
In the Arguments Passed on + option
add -FIRDebugEnabled
For detail debug view follow steps DebugView track Firebase doc
To send an event in Xcode project follow code below,
Objective C
[FIRAnalytics logEventWithName:#"share_image"
parameters:#{#"name": name, #"full_text": text}];
Swift
Analytics.logEvent("share_image", parameters: ["name": name, "full_text": text])
For events log follow detail steps Log events in Application Firebase doc
Hope this will help someone.
Make sure to remove the OS_ACTIVITY_MODE:disable from the Environment Variables in your project scheme if you added it at some point.
Make sure to add ONE DASH before -FIRDebugEnabled
I wasted a whole day making silly mistake having missed that DASH
Hope that doesn't happen to others!
Now it doesn't matter much but still for the people who are getting errors on this issue. Debug mode of firebase analytics does not work sometimes due to issue in GoogleServices-Info.plist file
Simply makes these 2 changes.
Set IS_ANALYTICS_ENABLED to YES
Set FIREBASE_ANALYTICS_COLLECTION_DEACTIVATE to NO
I also have the same problems.
1 check your Cocopods' s Firebase version.
use pod update Firebase
List item
make sure that is the latest
2 open debug mode
In the Arguments Passed On Launch part
add - FIRDebugEnabled.
I made it possible by writing the following:
func application(_ application: UIApplication, didFinishLaunchingWithOptions, ...) {
// some other initialization
FirebaseApp.configure()
Firebase.Analytics.setAnalyticsCollectionEnabled(true)
}
Alternatively you can do that inside your AppDelegate:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
var newArguments = ProcessInfo.processInfo.arguments
newArguments.append("-FIRDebugEnabled")
ProcessInfo.processInfo.setValue(newArguments, forKey: "arguments")
}
---EXTRA---
And just some thoughts:
Regarding
Firebase.Analytics.setAnalyticsCollectionEnabled(true)
If we inspect the method:
So it's kind of POINTLESS...
Check if you have an ad blocker enabled while visiting the Firebase website.
I had uBlock origin enabled and it would block every page (Dashboard, Events, StreamView, DebugView...) and they'd all be blank.
Everything worked as expected as soon as I whitelisted it.
I recently had an issue where the Xcode console said everything was fine, and all was being logged and sent, and I had the "-FIRDebugEnabled" and I tried all other suggestions in this thread, but nothing worked.
Nothing was being sent to Firebase's DebugView.
Looking through my git-history, I determined the issue occurred due to a pod update, and the solution to my issue was another pod update.
I don't know which pod had failed, but I suspect either Moya, Alamofire or FirebaseAnalytics... after this, I'm strongly considering locking my pod-versions.
I had the same configuration as jaywant-khedkar, but no events or devices were showing up in the Firebase Debug View.
Found out that my pi-hole on my network was eating all the events.
So if if you have any kind of ad blocker on your network, disable it and try again.
Happy debugging!
If you've done everything that the Firebase documentation states, then it could be that you have the wrong "Debug Device" selected in Firebase Analytics' "Debug View". After changing the debug device in the top left, all my analytics events from before were displayed! So it wasn't that my events weren't being sent to Firebase, I was just seeing the wrong view. Image attached.
Had this issue a few days ago, after trying every solution I found on the internet and none of them working, these are the steps I used to finally enabled DebugView to find my device:
Close the app on the device you’re working on
Go to the Firebase console and sign out of your account
Sign back in again, go to the console and select the project you’re working on.
Again, not sure if this made a difference however do NOT click on DebugView item under the “Project shortcuts” list. Instead, click on the “Analytics” drop-down and select DebugView from there.
It may be possible that this process updates the data stream used in the DebugView page - after following these steps I noticed events which had been missed initially were now showing up - almost as if the event was sent/received properly however the DebugView wasn’t showing the correct data stream.
Bonus tip:
Had issues with this again today, and after signing out/in to Firebase the DebugView still wasn't finding my device. What fixed it was, on my device, move the app into the background i.e. swipe up from the bottom to go to the home screen...
When you re-open the app into the foreground, the DebugView should now start displaying events. I imagine this works because the action of moving the app into the background I believe triggers any saved events on the device to be sent to Firebase, essentially flushing the queue.
I deleted my installation class in the Parse Data Explorer, and created a new one. Now that it's empty no new installations are appearing in the class. What is causing this behaviour, and how can i fix it. Did Parse implement some kind of function to call in the iOS SDK before an installation can appear?
Any help is appreciated! :)
If you delete records from Installation table, the records will not appear again when you open your App. This easy fix is to delete the App from your device and re-install it for a device Installation record to appear again in your class. This is possibly because when you register an installation it gets cached locally by the Parse SDK on your device and will not be updated again.
I tried to do the push guide from Parse again, and it seemed like they changed some thing in the SDK, which caused the problem!
func application(application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: NSData) {
PFPush.storeDeviceToken(deviceToken)
let currentInstallation = PFInstallation.currentInstallation()
currentInstallation.setDeviceTokenFromData(deviceToken)
currentInstallation.channels = ["global"]
currentInstallation["notifyEnabled"] = true
currentInstallation.saveInBackground() //This line was not there initially!
}
I fixed it by inserting the line highlighted in the code.
Thanks for the all the help! :)
I'm building a simple app, as it is described on this tutorial: Instagram like app
However, I've made all the steps correctly, to the "Run the app" part, but when I ran it, the Xcode 7 (swift2) outputs this error every time I launch the app or pull to refresh:
2015-09-20 00:46:41.224 Paws2[1196:393571] [Error]: unauthorized (Code: 0, Version: 1.8.5)
I'm using the latest pod available and I don't know how to bypass this issue.
Note that I've made an exactly app as described in the tutorial with the version 1.7.5 and the error was the same, so I updated the pos version to the latest.
I've names the app Paws2 on purpose, it wasn't a error, as it says in the Tutorial to name it 'Paws'.
Thanks in advance
- Regards, Ivan.
EDIT 1: I've updated cocoapods and everything else related and the error continues.
I had a same error too.
My case was silly. I put wrong Application ID / Client Key in didFinishLaunchingWithOptions method on AppDelegate.
[Parse setApplicationId:#“Your Application ID"
clientKey:#“Your Client Key"];
Make sure you put right keys.
I'm trying to setup Parse crash reporting on iOS, using this guide, but unfortunatly, even after several crashes, there is nothing on my dashboard.
Here is my code (i'm using sdk 1.6.3) :
- (void)crash {
[NSException raise:NSGenericException format:#"Everything is ok. This is just a test crash."];
}
...
[ParseCrashReporting enable];
[Parse setApplicationId:#"********"
clientKey:#"********"];
[self performSelector:#selector(crash) withObject:nil afterDelay:10.0];
I followed the troubleshooting guide:
Make sure you've enabled Crash Reporting in your App Delegate before you initialize Parse. DONE
If you're testing, make sure Xcode isn't catching the crash with the debugger. DONE
Build, run, stop the app, and then run it from the home screen.
Crashes are sent on the next run of the app. Make sure the app isn't crashing again before it has a chance to send the crash information. If you're testing, you can ensure this by adding a delay. DONE
Crashes may take up to a minute to show up on the dashboard.DONE
Make sure you don't have any other crash reporting solutions linked to your application, as they might interfere with each other. DONE, (disable Flurry)
I tried on both simulator and device, as recommanded here.
Finally, i've this message in my console:
+[PFAnalytics trackEventually:params:]: unrecognized selector sent to class 0x10f08ac20
Any help is highly appreciated.
Parse must have a bug in v1.6.3 because I have downloaded v1.6.0 and it works all fine.
You can download it here:
https://parse.com/downloads/ios/parse-library/1.6.0
And this is the order for enabling:
[ParseCrashReporting enable];
[Parse setApplicationId:kParse_AppID clientKey:kParse_ClientKey];
This probably doesn't count as any answer but I don't have enough rep to comment.
Have you tried enabling the crash report AFTER setting up parse with your keys? I know this was an issue for me when I was trying to enable the local datastore.
I know it goes against the guide but weirder things have happened when I use Parse...
Parse 1.7.3 is also busted... upgrade to 1.7.4!! !
EDIT: DONT UPDATE TO 1.7.5 -- that seems to be busted too !!
Latest version Parse SDK 1.6.4 fixes this problem!
https://www.parse.com/docs/downloads