doulu8446
2018-11-19 07:48
浏览 69

如何在Crashlytics中获取golang的堆栈跟踪

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)

图片转代码服务由CSDN问答提供 功能建议

我们的应用程序是Android应用程序,它具有由golang编写的JNI。 而且,我们使用Fabric Crashlytics来跟踪糖浆。

但是,在JNI中发生崩溃之后,我们无法在Crashlytics中获取堆栈跟踪信息。 在Java中,我们可以获取它。

在iOS版Object-C应用中,我们可以上传dSYM文件来映射功能。 但是我在哪里可以用Golang呢?

Fabric是否支持它?

现在,在Crashlytics中,我们只能看到以下内容:< / p>

 已崩溃:线程
0 libc.so 0xf6f4c778(缺少)
1 libc.so 0xf6f26791(缺少)
2 libc.so 0xf6f23933(缺少)
3(缺少)0x15c791e6( 丢失)
4 libgojni.so 0xdddd910e(丢失)
5 libc.so 0xf6f214ee(丢失)
6(丢失)0x15c791e6(丢失)
7 libgojni.so 0xde00a8de(丢失)
8 libgojni.so(0xde00a93 \ 9)  .so 0xdddd8ed6(Missing)
   
 
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douzong7283 2018-11-23 14:19
    已采纳

    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, like gomobile bind --work YOUR-SOURCE-CODE-PATH WORK=TEMP-PATH.

    After build successful, move the all of files in the jniLibs to YOUR-PROJECT-PATH/app/obj.

    At the last, do the steps list in Fabric docs.

    Hope our experiences can save your time :-)

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题