Our's app is a Android app, which has a JNI writed by golang. And we use the Fabric Crashlytics to track carshes.
But, we can not get the Stack-trace information in the Crashlytics, after a crash happened in the JNI. In the Java, We can get it.
In the Object-C for iOS app, we can upload the dSYM file to map the functions. But where can I do it with Golang?
Does the Fabric support it?
Now, in the Crashlytics, we can see below only:
Crashed: Thread
0 libc.so 0xf6f4c778 (Missing)
1 libc.so 0xf6f26791 (Missing)
2 libc.so 0xf6f23933 (Missing)
3 (Missing) 0x15c791e6 (Missing)
4 libgojni.so 0xdddd910e (Missing)
5 libc.so 0xf6f214ee (Missing)
6 (Missing) 0x15c791e6 (Missing)
7 libgojni.so 0xde00a8de (Missing)
8 libgojni.so 0xde00a93e (Missing)
9 libgojni.so 0xdddd8ed6 (Missing)
We have been resolved this issue.
The background:
We build a Android app, it has a JNI writed by go, which is build by gomobile. We use the Fabric Crashlytics to monitor the crash information. But in the Crashlytics, we could not see the full stack trace information which occurred in the JNI.
The Solution is:
At the first, please check your NDK version, it must be
r17c
or more.Add a param
--work
in the gomobile command, likegomobile bind --work YOUR-SOURCE-CODE-PATH WORK=TEMP-PATH
.After build successful, move the all of files in the
jniLibs
toYOUR-PROJECT-PATH/app/obj
.At the last, do the steps list in Fabric docs.
Hope our experiences can save your time :-)