我在调试模式下可以正常查看堆栈跟踪,但是在发布模式下运行应用程序时有些奇怪。我正在尝试将stacktrace报告给哨兵。堆栈跟踪如下:
RangeError: RangeError (length): Invalid value: Valid value range is empty: 8
File "kOd", line 0, in _ai.qea
File "HWd", line 4012, in qL.qea
File "HWd", line 3924, in oL.xra
File "HWd", line 3721, in lL.wra
File "HWd", line 2340, in kL.jbb
File "UNd", line 700, in _gK.kob
File "dVd", line 285, in _fK._Cob
File "NVd", line 1016, in _cK._Opa
File "NVd", line 958, in _cK.Ipa
File "NVd", line 874, in _cK._Gpa
File "pYd", line 1124, in _Fta
File "pYd", line 1021, in _ic.Dua
File "pYd", line 923, in _ic.uua
File "PXd", line 236, in _cZ
File "PXd", line 194, in _drawFrame
我的哨兵集成代码为:
final SentryClient _sentry = SentryClient(dsn: ConstantVariables.sentryDSN);
我的错误报告功能是:
Future<Null> _reportError(dynamic error, dynamic stackTrace) async {
// print('Reporting to Sentry.io...');
print(error);
print(stackTrace);
await _sentry.captureException(
exception: error,
stackTrace: stackTrace,
);
}
我的颤抖医生-v 输出:
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale en_IN)
• Flutter version 1.7.8+hotfix.4 at /home/flutter
• Framework revision 20e59316b8 (6 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /home/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /home/Downloads/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /home/Downloads/android-studio
• Flutter plugin version 38.2.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.2)
• IntelliJ at /home/Downloads/idea-IU-192.5728.98
• Flutter plugin version 38.1.4
• Dart plugin version 192.6262.13
[✓] Connected device (1 available)
• Redmi Note 4 • 358315129904 • android-arm64 • Android 7.0 (API 24)
有人可以解决这个问题吗?