Code Monkey home page Code Monkey logo

Comments (10)

mflesh1 avatar mflesh1 commented on July 19, 2024 2

I contacted Crashlytics support and they stated:

Our limit is around 64kb or 128kb in some cases. It looks like ANRwatchdog is producing reports over 500kb

So looks like currently you must use the setReportMainThreadOnly() option as it limits the size of the report.

from anr-watchdog.

mflesh1 avatar mflesh1 commented on July 19, 2024 1

I have been looking into this, and I was able to get this to work by setting the ANRWatchDog to only report the main thread.

anrWatchDog.setReportMainThreadOnly()

I still cannot get this to work without that setting.

from anr-watchdog.

voidshad avatar voidshad commented on July 19, 2024

Hi,
We`ve come across exactly the same problem. onAppNotResponding callback is raised, but the issue on crashlytics never created. Any thoughts or updates on this?

from anr-watchdog.

navaneet avatar navaneet commented on July 19, 2024

I too was having this issue earlier, it seems when you Log a non-runtime exception in crashlytics it creates nonfatal exceptions in fabric dashboard since ANRs don't necessarily crash an application. You need to toggle the switch in the fabric dashboard to show all exceptions including non-fatals as by default it only shows fatal exceptions.

screen shot 2017-09-27 at 11 53 25 pm

Another issue might be proguard which when enabled strips some important classes required by anrWatchDog. To prevent that use the following rule in your proguard-rules.pro file.

-keep class com.github.anrwatchdog.** { *; }

You might also want to do the following to change the error into string

  anrWatchDog.setANRListener(new ANRWatchDog.ANRListener() {
            @Override
            public void onAppNotResponding(ANRError error) {
                StringWriter sw = new StringWriter();
                error.printStackTrace(new PrintWriter(sw));
                CrashUtil.logException(new RuntimeException(sw.toString()));
            }
        });

Hope it helps!

from anr-watchdog.

harminderkharbanda avatar harminderkharbanda commented on July 19, 2024

@navaneet Regarding the dashboard thing, I have already selected "All Events".

Will surely look into the 2nd part of your solution though. Thanks!

Btw Fabric team replied that they are receiving an empty report and hence it is not showing in the dashboard. Any thoughts?

from anr-watchdog.

navaneet avatar navaneet commented on July 19, 2024

Not sure, however if it logs into logcat it should log into fabric too. Try logging to logcat and then check against fabric if the same error is getting logged.

from anr-watchdog.

voidshad avatar voidshad commented on July 19, 2024

I dont think that proguard is the case because weve got the same situation for our debug builds (which arent minimized). But Ill give it a try.
I also tried it with some dummy exception and it works fine. So the problem is definitely with ANRError class

from anr-watchdog.

umair6 avatar umair6 commented on July 19, 2024

@mflesh1 I think issue is because of ANR format. Crashlytics is expecting an exception which normally contains a message and a stack trace. When "setReportMainThreadOnly" is disabled, ANRError creates a nested stack trace of all threads which Crashlytics does not accept. If I convert the ANRError into a string, as suggested by @navaneet , then it get posted fine. But then there is error grouping issue on crashlytics dashboard which I am currently trying to figure out. .

from anr-watchdog.

Fossor avatar Fossor commented on July 19, 2024

ANRError indeed is too big for Crashlytics. I convert errors into text files and upload to Firebase storage it is free and you can setup it from Android Studio.

from anr-watchdog.

SalomonBrys avatar SalomonBrys commented on July 19, 2024

The documentation warns about this.
That's all I can do 😞

from anr-watchdog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.