Closed jtoth55 closed 9 years ago
HockeyApp does not catch JS runtime errors (unfortunately), but only app crashes. If you force an app crash (don't know how btw), it should show up on HockeyApp.
Ok that makes sense in a debug build, as it'll show the red error screen when a js error is hit so won't technically crash the app. What about in a release build, where a js error does crash the app instead of showing the red error screen? Does that count as a crash that would be logged by this module? Or would that scenario simply be another js error that is caught by Titanium and then Titanium is quitting the app?
I noticed that in production builds, app most of the time do not crash on JS errors. They just fail silently. I know there are ways to catch these errors and send them to a server, but HockeyApp does not do that. HockeyApp really focusses on beta testen and logging of hard app crashes
Ok thanks, that's disappointing because js errors are the most common but I guess it's still useful to be able to catch native crashes, which generally would be Titanium bugs or misuse of Titanium API's.
I have an idea that would make this more useful. Titanium obviously has a way to globally catch javascript runtime errors, that would be the segment of code that checks if we're in debug mode and shows the red error screen if so or quits the app if not. They just don't provide a way for developers to hook into this event. I'm thinking the Titanium framework could be hacked to throw a native exception when a js error is thrown and we're in release mode, and the native exception could contain the js error message. That should allow HockeyApp to pick it up I think? My brother works for Appcelerator so I'll discuss this with him.
Let me check with the guys from Peerby. When helping them with their mobile app, we also spoke about this and they send JS errors to their own server. They use 2 open source modules to do it, so maybe we can trigger an exception and send it to HockeyApp! Any advice from Appcelerator is of course appreciated! With a bit of luck we could build it into this module
Very cool, let me know what you discover.
Thanks for letting me know! Will definitely follow that one.
Tim, Did you check with Peerby? What are those 2 open source modules they are using - to send JS errors to their server?
I created new HockeyApp "apps" for both Android and iOS, set the type of each to "Alpha", and specified the appropriate app id. I also created a "version" for each app that matches the versionName and versionCode in the tiapp.xml. I then plugged in the keys into my Ti app.js, using the 2 lines of code in the read me.
When I launch the app in the iPhone Simulator or Android Genymotion emulator and force a js error, I don't see any crashes in HockeyApp. What am I missing?