bitstadium / HockeySDK-Cordova

HockeyApp was retired and the SDKs are deprecated. Please use App Center instead.
https://github.com/microsoft/appcenter-sdk-cordova
Other
82 stars 73 forks source link

hockeyapp.forceCrash() function is not logging any crash report on hockey dashboard, but able to get events. #105

Closed nikhilknoldus closed 4 years ago

nikhilknoldus commented 6 years ago

Why forceCrash function is not doing anything on my button click in ionic 2 app, not even any error in code, followed all the instructions written in readMe of hokeyapp-Cordova. Is there any specific condition or thing that i have to do to check why this forceCrash or even actually crashes are not getting reported over hockeyapp dashboard.

Need this badly.

bmourat commented 6 years ago

Hi @nikhilknoldus To investigate this issue we need additional info:

nikhilknoldus commented 6 years ago

Targeting Android (Cordova) (Windows & Mac for development) CordovaSdk for ionic2 yes same as written in docs.

bmourat commented 6 years ago

Could you please explain what docs are you referring to? Cause officially we support only Cordova plugin, not ionic. The only plugin for ionic I am aware of is ionic-hockeyapp, and i've tried that today and it works.

nikhilknoldus commented 6 years ago

Yes, I am using the same ionic-hockeyapp, and basically the part of cordova-hockeyapp, I have followed all instructions (I can see the Event logs on hockey dashboard), but I cannot crash the app by forceCrash function and there is no crashReport on dashboard as well. So any generic instruction(s) you would like to give or should I re-focus some step(s) that could be the cause of this issue ?

nikhilknoldus commented 6 years ago

Is it like that hockey cannot report crashes if they are related to JS in app? I found this answer on community regarding similar issues problem with Ionic apps of course is that there are two sources for crashes: native and JS. The normal, common crash reporting stuff is probably targeted at the native part, for JS error logging there are other services and libraries out there Please helpout because my project is on ending phase to be launch & this could be critical, we already spent time with hockey for achieving the same.

bmourat commented 6 years ago

forceCrash is crashing native code not js, and to tell why forceCrash is not working i will need to see your setup code. I've tested it with ionic-hockeyapp plugin and it worked normally. As to your second question, to my knowledge only native crashes are reported. You need to report js crashes?

nikhilknoldus commented 6 years ago

Yes, So that's the reason I am able to get the event logs on hockey Dashboard, not when i click the button (that i created and calling forceCrash function) is not sending any force crash reports, I am working on an extensive app that uses some pulse Sensor (that i attach to device and it takes input from that and generate graph) and this is the area where i face crashes (not generally but in rare cases, even hard to reproduce, but i want to get the details and logs of those crashes), this functionality is in Js (you're right here). So what do you suggest about this. For my code implementation I am following this https://www.npmjs.com/package/ionic-hockeyapp along with java files code snippets (mentioned in docs) nothing else.

Thanks 👍

guperrot commented 6 years ago

Hi, is your javascript error actually crashing your application as in exiting like for a native crash?

nikhilknoldus commented 6 years ago

I don't know sometimes it crashes my app that I can see, but how about forceCrash (id doesn't works with js errors ?) or should i make some manual js exceptions to crash my app to look into hockey dashboard. what do you suggest.

ElektrojungeAtWork commented 6 years ago

Hi @nikhilknoldus,

forceCrash is a native crash, it does not produce a Javascript exception, this functionality comes from the native Hockey SDK that is bundled.

There is no built in support for Javascript exceptions in HockeyApp, they are reflected as native crashes only if it makes the app crash and you would not be able to see a meaningful javascript stack trace, it would be a native stack trace that can give hints about the Javascript exception depending on the message of the native crash.

So, unfortunately, I don't have much to suggest for you at this point to improve your JS stacktrace.