Android Question Problem with Crashlytics

PierPaduan

Active Member
Licensed User
Longtime User
Hi All,
I've followed the implementation exposed here:
https://www.b4x.com/android/forum/threads/crashlytics-crash-reports.87510/
but in Crashlytics the app's crashes are not detected. I don't understand where the error is.

My app has minSdkVersion="9", targetSdkVersion="28" and I'm testing on a tablet with Android v.4.4.4 and Google Play Services v.13.2.80.

I performed the following.

1. All requested SDK installed.
2. Firebase integration:
2.1 Created a new project in console.firebase.google.com with package name = app's package.
2.2 Downloaded google-services.json and put it in the projects folder:
upload_2018-10-15_15-23-4.png

3. Added to manifest editor the Erel's code. QUESTION: in this code some parts must be changed according to my specific firebase project or must be left unchanged?
4. Added to main activity, in the Region Project Attributes, the additional jars.
5. Added the Crashlytics.bas class and initialized it from the starter service.
6. Added the code to produce the crash.
7. Compiled OK. Installed OK.

On Firebase I click on Crashlytics and I arrive to this step:
upload_2018-10-15_15-10-50.png

I just click on button at step number 2, but I don't install SDK in my app because I've already followed Erel's instruction above, so we are in step 3 where Crashlytics wait for communication between app and their server.
upload_2018-10-15_15-10-20.png

I run my app in release, I create a crash like in the Erel's tutorial, but nothing appear in Crashlytics and I wait more than few minutes.

Is correct what I did or I forgot something?

Thanks a lot to everyone.
 

PierPaduan

Active Member
Licensed User
Longtime User
May be the following logs could be useful:

Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=3375515428000
Delivering touch to (7024): action: 0x1, toolType: 1
Crashlytics must be initialized by calling Fabric.with(Context) prior to logging messages.
main_activity_click (java line: 1435)
java.lang.NumberFormatException: Invalid double: "sdkljkljkljfsdf"
at java.lang.StringToReal.invalidReal(StringToReal.java:63)
at java.lang.StringToReal.parseDouble(StringToReal.java:269)
at java.lang.Double.parseDouble(Double.java:295)

How can I initialize Crashlytics by calling Fabric.with(Context) ?

I have io.fabric.sdk installed
upload_2018-10-16_11-44-35.png
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upload a sample project with all the integration.

How can I initialize Crashlytics by calling Fabric.with(Context) ?
I guess it is inside the library call to initialize....

'starter service
Sub Process_Globals
Public CL As Crashlytics
End Sub

Sub Service_Create
Dim context As JavaObject 'depends on JavaObject
context.InitializeContext
CL.Initialize(context) ' ptrobably it is called here in the lib

End Sub
 
Upvote 0

PierPaduan

Active Member
Licensed User
Longtime User
Hi.
The sample project is attached.
The package name now is: b4a.example.crash
The app is in release mode on the tablet.

On Firebase site I have added a new app. The site is checking for communication...
upload_2018-10-16_12-31-34.png


I run the app, I click on it and it crashes.

The result in the Logs is the same:
Crashlytics must be initialized by calling Fabric.with(Context) prior to logging messages.
main_activity_click (java line: 341)
java.lang.NumberFormatException: Invalid double: "sdkljkljkljfsdf"

And Firebase remain in checking for communication...
 

Attachments

  • CrashExample.zip
    9 KB · Views: 214
Upvote 0

PierPaduan

Active Member
Licensed User
Longtime User
I've added to manifest file the following lines:
B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
...and now Crashlytics works fine.
Thanks a Lot :):):):) , bye.
 
Upvote 0

Mikonios

Active Member
Licensed User
Longtime User
Hello, I have the same problem, and when I add in the manifest ::

B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)

the compiler generates the error ::

B4X:
B4A Version: 8.50
Parsing code.    (2.78s)
Building folders structure.    (1.96s)
Running custom action.    (1.49s)
Compiling code.    Error
Error parsing manifest script:
File not found: GooglePlayBase.b4x_excluded

upload_2018-10-30_11-4-13.png
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0
Top