Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reenable windows obfuscation support #2426

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## Unreleased

### Features

- Windows native error & obfuscation support ([#2286](https://github.com/getsentry/sentry-dart/pull/2286), [#2426](https://github.com/getsentry/sentry-dart/pull/2426))
- Improve app start measurements by using `addTimingsCallback` instead of `addPostFrameCallback` to determine app start end ([#2405](https://github.com/getsentry/sentry-dart/pull/2405))
- ⚠️ This change may result in reporting of shorter app start durations
- Improve frame tracking accuracy ([#2372](https://github.com/getsentry/sentry-dart/pull/2372))
Expand All @@ -14,7 +15,7 @@
void main() async {
// Replace WidgetsFlutterBinding.ensureInitialized()
SentryWidgetsFlutterBinding.ensureInitialized();

await SentryFlutter.init(...);
runApp(MyApp());
}
Expand All @@ -24,7 +25,7 @@
### Enhancements

- Only send debug images referenced in the stacktrace for events ([#2329](https://github.com/getsentry/sentry-dart/pull/2329))
- Remove `sentry` frames if SDK falls back to current stack trace ([#2351](https://github.com/getsentry/sentry-dart/pull/2351))
- Remove `sentry` frames if SDK falls back to current stack trace ([#2351](https://github.com/getsentry/sentry-dart/pull/2351))
- Flutter doesn't always provide stack traces for unhandled errors - this is normal Flutter behavior
- When no stack trace is provided (in Flutter errors, `captureException`, or `captureMessage`):
- SDK creates a synthetic trace using `StackTrace.current`
Expand Down Expand Up @@ -101,15 +102,15 @@
),
);
```

- Add screenshot to `SentryFeedbackWidget` ([#2369](https://github.com/getsentry/sentry-dart/pull/2369))
- Use `SentryFlutter.captureScreenshot` to create a screenshot attachment
- Call `SentryFeedbackWidget` with this attachment to add it to the user feedback

```dart
final id = await Sentry.captureMessage('UserFeedback');
final screenshot = await SentryFlutter.captureScreenshot();

Navigator.push(
context,
MaterialPageRoute(
Expand All @@ -127,7 +128,7 @@
- Avoid sending too many empty client reports when Http Transport is used ([#2380](https://github.com/getsentry/sentry-dart/pull/2380))
- Cache parsed DSN ([#2365](https://github.com/getsentry/sentry-dart/pull/2365))
- Handle backpressure earlier in pipeline ([#2371](https://github.com/getsentry/sentry-dart/pull/2371))
- Drops max un-awaited parallel tasks earlier, so event processors & callbacks are not executed for them.
- Drops max un-awaited parallel tasks earlier, so event processors & callbacks are not executed for them.
- Change by setting `SentryOptions.maxQueueSize`. Default is 30.
- Use native spotlight integrations on Flutter Android, iOS, macOS ([#2285](https://github.com/getsentry/sentry-dart/pull/2285))
- Improve app start integration ([#2266](https://github.com/getsentry/sentry-dart/pull/2266))
Expand All @@ -154,7 +155,7 @@

- Metrics API ([#2312](https://github.com/getsentry/sentry-dart/pull/2312))
- Learn more: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Metrics-Beta-Coming-to-an-End

### Dependencies

- Bump Native SDK from v0.7.10 to v0.7.12 ([#2390](https://github.com/getsentry/sentry-dart/pull/2390))
Expand Down
7 changes: 4 additions & 3 deletions dart/lib/src/platform_checker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ class PlatformChecker {
// the OS checks return true when the browser runs on the checked platform.
// Example: platform.isAndroid return true if the browser is used on an
// Android device.
return platform.isAndroid || platform.isIOS || platform.isMacOS;
// Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270
// platform.isWindows
return platform.isAndroid ||
platform.isIOS ||
platform.isMacOS ||
platform.isWindows;
}

static bool _isWebWithWasmSupport() {
Expand Down
3 changes: 2 additions & 1 deletion flutter/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies:

dev_dependencies:
flutter_lints: ^2.0.0
sentry_dart_plugin: ^1.1.0
sentry_dart_plugin: ^2.2.0
integration_test:
sdk: flutter
flutter_test:
Expand All @@ -61,3 +61,4 @@ sentry:
commits: true
ignore_missing: true
log_level: info
symbols_path: build/symbols
9 changes: 2 additions & 7 deletions flutter/test/sentry_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,8 @@ void main() {
hasFileSystemTransport: false,
);

// Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270
// testScopeObserver(
// options: sentryFlutterOptions, expectedHasNativeScopeObserver: true);
testScopeObserver(
options: sentryFlutterOptions, expectedHasNativeScopeObserver: false);
options: sentryFlutterOptions, expectedHasNativeScopeObserver: true);

testConfiguration(
integrations: integrations,
Expand All @@ -274,9 +271,7 @@ void main() {
beforeIntegration: WidgetsFlutterBindingIntegration,
afterIntegration: OnErrorIntegration);

// Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270
// expect(SentryFlutter.native, isNotNull);
expect(SentryFlutter.native, isNull);
expect(SentryFlutter.native, isNotNull);
expect(Sentry.currentHub.profilerFactory, isNull);
}, testOn: 'vm');

Expand Down
5 changes: 1 addition & 4 deletions flutter/test/sentry_native/sentry_native_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ import 'sentry_native_test_web.dart'

// Defining main() here allows us to manually run/debug from VSCode.
// If we didn't need that, we could just `export` above.

// Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270
// void main() => actual.main();
void main() {}
void main() => actual.main();
13 changes: 4 additions & 9 deletions flutter/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@
# customers of the plugin.
cmake_minimum_required(VERSION 3.14)

# Temporarily disabled due to https://github.com/getsentry/sentry-dart-plugin/issues/270
# include("${CMAKE_CURRENT_SOURCE_DIR}/../sentry-native/sentry-native.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/../sentry-native/sentry-native.cmake")

# # Even though sentry_flutter doesn't actually provide a useful plugin, we need to accomodate the Flutter tooling.
# # sentry_flutter/sentry_flutter_plugin.h is included by the flutter-tool generated plugin registrar:
# target_include_directories(sentry INTERFACE ${CMAKE_CURRENT_LIST_DIR})

# Temp code: replace with the previous code when sentry-native is enabled
add_library(sentry_flutter_plugin temp.cpp)
target_include_directories(sentry_flutter_plugin INTERFACE ${CMAKE_CURRENT_LIST_DIR})
# Even though sentry_flutter doesn't actually provide a useful plugin, we need to accomodate the Flutter tooling.
# sentry_flutter/sentry_flutter_plugin.h is included by the flutter-tool generated plugin registrar:
target_include_directories(sentry INTERFACE ${CMAKE_CURRENT_LIST_DIR})
1 change: 0 additions & 1 deletion flutter/windows/temp.cpp

This file was deleted.

Loading