Skip to content

Commit b6c8720

Browse files
authored
fix: crashpad path not being found (#3016)
* Add another candidate * Add log * Update CHANGELOG{ * Update sentry_flutter.dart * Update * Update CHANGELOG * Update sentry_native.dart * Update CHANGELOG.md * Update
1 parent 49e44d2 commit b6c8720

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Fixes
66

7+
- Add additional crashpad path candidate ([#3016](https://github.com/getsentry/sentry-dart/pull/3016))
78
- Replay JNI usage with `SentryFlutterPlugin` ([#3036](https://github.com/getsentry/sentry-dart/pull/3036), [#3039](https://github.com/getsentry/sentry-dart/pull/3039))
89
- Do not set `isTerminating` on `captureReplay` for Android ([#3037](https://github.com/getsentry/sentry-dart/pull/3037))
910
- Previously segments might be missing on Android replays if an unhandled error happened

flutter/lib/src/native/c/sentry_native.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ class SentryNative with SentryNativeSafeInvoker implements SentryNativeBinding {
7878

7979
if (crashpadPath != null) {
8080
native.options_set_handler_path(cOptions, c.str(crashpadPath));
81+
} else {
82+
options.log(
83+
SentryLevel.warning, 'SentryNative: could not find crashpad path');
8184
}
8285

8386
return cOptions;
@@ -440,7 +443,8 @@ String? _getDefaultCrashpadPath() {
440443
final appDir = Platform.resolvedExecutable.substring(0, lastSeparator);
441444
final candidates = [
442445
'$appDir${Platform.pathSeparator}crashpad_handler',
443-
'$appDir${Platform.pathSeparator}bin/crashpad_handler'
446+
'$appDir${Platform.pathSeparator}bin${Platform.pathSeparator}crashpad_handler',
447+
'$appDir${Platform.pathSeparator}lib${Platform.pathSeparator}crashpad_handler'
444448
];
445449
return candidates.firstWhereOrNull((path) => File(path).existsSync());
446450
}

0 commit comments

Comments
 (0)