Coder Social home page Coder Social logo

Comments (5)

skaman avatar skaman commented on July 17, 2024 1

I think we can only put a +1 here: https://twittercommunity.com/t/how-to-ungroup-non-fatal-exceptions-with-different-messages/59996/9
And hope twitter will do something about that.

from fabricplugin.

Justin-Credible avatar Justin-Credible commented on July 17, 2024

Crashlytics is for tracking native crashes which are separate from JavaScript exceptions.

If you want to track your JavaScript exceptions you should use a service like http://LogEntries.com and log the JS errors from the window.on_error handler.

from fabricplugin.

jesusbotella avatar jesusbotella commented on July 17, 2024

I know Crashlytics is for native exceptions instead of the JS ones. But it gives more mobile specific information that is so useful. I have always used Sentry for that and I thought that the change would be worth it.

If no one has anything else to say, the issue can be closed. 👍

from fabricplugin.

skaman avatar skaman commented on July 17, 2024

I found a way to workaround it (on iOS), i use recordError with a crc32 on the first line of the stack trace for the errore code. Maybe it's not perfect but for now (in my case) is enough.

Here is i did it on ionic with stacktrace.js

    .config(function($stateProvider, $urlRouterProvider, $provide) {
      $provide.decorator("$exceptionHandler", ['$delegate', function($delegate) {
        return function(exception, cause) {
            $delegate(exception, cause);

            var makeCRCTable = function(){
                var c;
                var crcTable = [];
                for(var n =0; n < 256; n++){
                    c = n;
                    for(var k =0; k < 8; k++){
                        c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
                    }
                    crcTable[n] = c;
                }
                return crcTable;
            }

            var crc32 = function(str) {
                var crcTable = window.crcTable || (window.crcTable = makeCRCTable());
                var crc = 0 ^ (-1);

                for (var i = 0; i < str.length; i++ ) {
                    crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF];
                }

                return (crc ^ (-1)) >>> 0;
            };

            var message = exception.toString();
            var stacktrace = exception.stack.toLocaleString();
            window.fabric.Crashlytics.addLog("ERROR: " + message);
            window.fabric.Crashlytics.addLog("Stacktrace: " + stacktrace);
            window.fabric.Crashlytics.recordError(message, crc32(stacktrace.split('\n')[0]));
        };
      }]);

from fabricplugin.

wodka avatar wodka commented on July 17, 2024

I added a pull request that will push the js stack trace to fabric - then all js errors will be grouped the right way (at least on android)

from fabricplugin.

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.