Sitata / titanium-google-analytics

Google analytics for Appcelerator Titanium
MIT License
92 stars 47 forks source link

App crash while using google analytics #56

Closed chidsami closed 8 years ago

chidsami commented 8 years ago

While using google analytics in Appcelerator, we tried implementing a navigation screen in Appcelerator. On clicking the next screen button more than twice for navigating between screens the app crashes.On staying on second screen for long time also crashes the app. But the crash logs are not displayed neither in google analytics nor in Appcelerator. SDK version: 3.1.0 Titanium SDK version: 4.1.0 and above iOS Simulator version: 9.2

astjohn commented 8 years ago

What have you done in your code? Did you enable track exceptions? Please note that it can take up to 48 hours for your data to show up in google analytics. Also note that this module has nothing to do with Appcelerator.

chidsami commented 8 years ago

Hi John, Module working fine in Appcelerator project native module integration (Google Analytics) and also data got updated properly in google analytics site. Here we are facing one crash when application navigating form one screen to another.

var newScreen = Alloy.createController('screen2').getView(); $.win.openWindow(newScreen);

Above code are making the crash when executing frequently. After this did removed this module from project and tried executing same code, unable to replicate the crash.

astjohn commented 8 years ago

@chidsami Sorry. I misunderstood your issue. Are you expecting to see the crash logs in analytics or are you just reporting a crash in your app?

At this point, I don't think the crash is from the module as many other apps are successfully using it.

chidsami commented 8 years ago

Hi John,

No Problem. Crash only in simulator, in device module working fine. Possible to get/see crash log's in google analytics? If yes please help to do that.

astjohn commented 8 years ago

You can enable crash reporting by following the documentation here: https://github.com/Sitata/titanium-google-analytics#moduletrackuncaughtexceptions

This will not track exceptions generated in the main javascript thread, and unfortunately, I believe the error you are encountering is an example of that, but I'm not sure.

You can also track exceptions manually in certain cases by following the documentation here: https://github.com/Sitata/titanium-google-analytics#trackertrackexceptionparams

For example, you might use that in a try/catch routine.

Hope that helps and best of luck!