Fabric & Crashlytics Plugin - Having troubles - 3 things

Hi,

We’re in the process of adding  https://scotth.tech/plugin-fabric to our apps and are have 3 problems that we could use some help with. They could all be related, don’t know

1) Google (GP console) is still getting the error “logged” on Crash and ARN dashboard.

Looks like the error are bleeding through, not suppressing them in the first place which is consistent with our crash (see #3 below)

2) We’re not seeing the Crashlytics dashboard we logging into the web 

We don’t understand why, our account was created and the plugin paid for.  The fact that google is also logging error tells us we’re not doing something right either. 

So if we login, and then try to go to we are redirected to https://fabric.io/kits/ios/crashlytics/install which means I either didn’t  log any bugs (and we have)  or there’s something we don’t understand we need to do (account registration/setup).

3) This doesn’t always work Runtime:addEventListener(“unhandledError”, firerabbitErrorHandler)

We believe this has nothing to do with plugin its self but even when we “return true” in the our listener firerabbitErrorHandler, our app crash on device 50% of the time. One thought is that we’re maybe crashing in our error handler. Other other is that are many, many plugs might somehow over-write this handler (is that even possible? how can we check). Anyways, here’s the code:

mainLibrary.useFirebaseCrashlytics = true -- Firebase Crashlytics... if( mainLibrary.useFirebaseCrashlytics ) then fabric = require "plugin.fabric" fabric.init(true) end -- Function for recording a Crashlytics error... function recordError( stringErrorMessage, numberErrorCode ) printToConsole( "\n\nrecordError: Request received to log error!" ) -- Validation... if( stringErrorMessage == nil or numberErrorCode == nil ) then -- Missing one of the parameters! printToConsole( "recordError: FAIL. stringErrorMessage or numberErrorCode was nil: " .. tostring(stringErrorMessage) .. ", " .. tostring(numberErrorCode) ) return false elseif( type(numberErrorCode) ~= "number" ) then -- Was not a number provided! printToConsole( "recordError: FAIL. numberErrorCode must be number! Was given: " .. tostring(numberErrorCode) ) return false end if( mainLibrary.useFirebaseCrashlytics and fabric ~= nil and mainLibrary.specialText ~= nil and mainLibrary.specialText.text ~= nil and system.getInfo( "environment" ) ~= "simulator" ) then -- Add the current log text to the error report, might be handy? fabric.addLog( "LOG: " .. tostring(mainLibrary.specialText.text) ) end -- Okay, let's report the error. No matter what we need to report to console first. printToConsole( "recordError: ERROR NUMBER: " .. tostring(numberErrorCode) ) printToConsole( "recordError: ERROR DESCRIPTION: \n\n" .. tostring(stringErrorMessage) ) -- Send to Crashlytics if enabled... if( mainLibrary.useFirebaseCrashlytics ) then -- Is it initialized? if( fabric == nil ) then -- Not initialized! printToConsole( "recordError: WARNING. Crashlytics is enabled but not initialized! Could not send!" ) elseif( system.getInfo( "environment" ) == "simulator" ) then -- Simulator! printToConsole( "recordError: Not sending to Crashlytics because it doesn't work on Simulator!" ) else -- Send it! printToConsole( "recordError: Transmitting error to Crashlytics now!" ) fabric.recordError(stringErrorMessage, numberErrorCode) end else printToConsole( "recordError: Not sending to Crashlytics because mainLibrary.useFirebaseCrashlytics == FALSE!" ) end -- This was success... return true end -- Error handling override... function firerabbitErrorHandler( event ) -- An unhandled error has occurred! \*\*\*\*! printToConsole( "UNHANDLED ERROR: \*\*\*\*! Unhandled runtime error occurred!" ) -- Validate 'event'.. it should have 'errorMessage' and 'stackTrace' to play with, then log the error... if( event == nil ) then printToConsole( " ... WARNING: 'event' that was passed to handler was nil!" ) recordError( "UNKNOWN UNHANDLED ERROR, no event was passed!", 666) -- recordError takes error description (string), and error code (number)... elseif( event.errorMessage == nil or event.stackTrace == nil) then printToConsole( " ... WARNING: 'event.errorMessage' or 'event.stackTrace' was nil!" ) recordError( "[ERRORSTART]\n\nERROR MESSAGE: " .. tostring(event.errorMessage) .. "\n\nSTACK TRACE: " .. tostring( event.stackTrace) .. "\n\n[ERROREND]\n", 667) -- recordError takes error description (string), and error code (number)... else -- Looks fine, send it... printToConsole( " ... event looks okay, requesting log..." ) recordError( "[ERRORSTART]\n\nERROR MESSAGE: " .. tostring(event.errorMessage) .. "\n\nSTACK TRACE: " .. tostring( event.stackTrace) .. "\n\n[ERROREND]\n", 1) -- recordError takes error description (string), and error code (number)... end -- Error is logged, now what to do about the runtime? -- Return TRUE to allow app to continue (suppress error, default behaviour), return FALSE to allow app to crash (for testing only)... if( mainLibrary.suppressUnhandledErrors ~= nil ) then return mainLibrary.suppressUnhandledErrors else return true -- If nothing found, default to true (suppress)... end end Runtime:addEventListener("unhandledError", firerabbitErrorHandler)

Help/Advise/Ideas please.

Alex

@Scott

Let me answer two real quick you have to set up an app before you can see the dashboard. Not sure if did already

As for your third/first question, I am not sure. I do try to auto catch the corona errors and submit them to Crashlyitics but don’t suppress the errors, this should conflict with the Lua api. Let me ask

Hi Scott, thanks for the reply.

We still cannot get your plugin to work.  We’ve been trying for a week now.  We followed your documentation and installation instructions here: https://scotth.tech/plugin-fabric

… but we are not receiving any errors on Fabric/Crashlytics.  When we go to the site: https://fabric.io/kits/ios/crashlytics/install

we do not see a dashboard, or settings to change, or any of our data, and only goes straight to the installation instructions.  Fabric tells us they have seen our app run but Fabric was not configured.  No data is being sent to them.

Can you please help us out?  I want this to work and don’t want to ask for a refund but we’ve spent a lot of time trying to make this work with no luck.  It doesn’t work on Android or Apple, and we’ve tried multiple versions of Corona SDK.

Are we supposed to use the Fabric API before the Crashlytics API or something?  The documentation on your page is pretty brief.

Cheers,

Chris

Another question, are we supposed to be handling unhandled exceptions using Corona SDK and then tell Crashlytics to log the error?  Or are we supposed to just let unhandled errors happen because the Fabric/Crashlytics plugin will handle them now?

Cheers,

Chris

You may try contacting Fabic support. I have recommended this to a couple people who have not been able to see there app. They should be able to fix it or give more details
support@fabric.io

As for logging, the plugin automatically logs all errors. You can log an error if you feel you need to.

Does the plugin suppress errors?

We have contacted Fabric support but they were not able to help us.  

Currently yes getting ready to push out an update that will send out error events via the plugin.

^ What did fabric tell you and what did you say to fabric?

You mean to console?  Right now the plugin doesn’t send anything to the console so it’s impossible to know if it’s working or not.

They said they cold “see our app” but that it didn’t look like Fabric was initialized or setup correctly anywhere in the app.

Though to me, how would they see our app runs if it wasn’t initialized?

Yeah, this does not make much sense to me. I experienced the fabric problem and talk to a lot of people about this problem

I posted a thread about this

https://forums.coronalabs.com/topic/70222-my-app-does-not-appear-in-my-dashboard-fabric-crashlytics-plugin/?hl=fabric

So Scott, we’re stuck I guess. We followed the process and got no where. Are you working on fix of some kind? 

I am going to try to update fabric version and create a new app. I may try to convert fabric to firebase crashlytics soon. But for now let me see if updating fabric version helps

Did you have any luck with this?  We’d really like to get this to work.  Currently we have nothing to go on, nothing to debug, nothing to troubleshoot.

We would love it if it was Firebase Crashlytics, that’s actually what we though this was…

I am still looking into this