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

Release v6.9.7 #1131

Merged
merged 17 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
24 changes: 24 additions & 0 deletions .buildkite/pipeline.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,30 @@ steps:
--fail-fast
--order=random

# TODO: Skip penmding PLAT-6822
- label: 'ARM macOS 11.0 E2E tests'
skip: Pending PLAT-6822
depends_on:
- cocoa_fixture
timeout_in_minutes: 60
agents:
queue: opensource-m1-mac-cocoa-11
plugins:
artifacts#v1.3.0:
download: ["features/fixtures/macos/output/macOSTestApp.zip"]
upload: ["macOSTestApp.log", "appium_server.log"]
commands:
- bundle config set --local path 'vendor/bundle'
- bundle install
- bundle exec maze-runner
--farm=local
--os=macos
--os-version=11
--app=macOSTestApp
--tags='not @skip_macos'
--fail-fast
--order=random

- label: 'macOS 10.13 E2E tests'
depends_on:
- cocoa_fixture
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/pipeline.quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ steps:
concurrency: 3
concurrency_group: cocoa-unit-tests
commands:
- ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=13.3
- ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=13.4
artifact_paths:
- logs/*

Expand Down
38 changes: 36 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ steps:
# Unit tests
#

- label: ARM macOS 11 unit tests
timeout_in_minutes: 10
agents:
queue: opensource-m1-mac-cocoa-11
commands:
- ./scripts/run-unit-tests.sh PLATFORM=macOS
artifact_paths:
- logs/*

- label: macOS 10.15 unit tests
timeout_in_minutes: 10
agents:
Expand All @@ -82,7 +91,7 @@ steps:
agents:
queue: opensource-mac-cocoa-11
commands:
- ./scripts/run-unit-tests.sh PLATFORM=iOS OS=14.3
- ./scripts/run-unit-tests.sh PLATFORM=iOS OS=14.4
artifact_paths:
- logs/*

Expand All @@ -100,7 +109,7 @@ steps:
agents:
queue: opensource-mac-cocoa-11
commands:
- ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=14.3
- ./scripts/run-unit-tests.sh PLATFORM=tvOS OS=14.4
artifact_paths:
- logs/*

Expand Down Expand Up @@ -193,6 +202,31 @@ steps:
--fail-fast
--order=random

# TODO: Skip pending PLAT-6822
- label: 'ARM macOS 11 barebones E2E tests'
skip: Pending PLAT-6822
depends_on:
- cocoa_fixture
timeout_in_minutes: 10
agents:
queue: opensource-m1-mac-cocoa-11
plugins:
artifacts#v1.3.0:
download: ["features/fixtures/macos/output/macOSTestApp.zip"]
upload: ["macOSTestApp.log", "appium_server.log"]
commands:
- bundle config set --local path 'vendor/bundle'
- bundle install
- bundle exec maze-runner
features/barebone_tests.feature
--farm=local
--os=macos
--os-version=11
--app=macOSTestApp
--tags='not @skip_macos'
--fail-fast
--order=random

- label: 'macOS 10.15 stress test'
timeout_in_minutes: 3
agents:
Expand Down
4 changes: 2 additions & 2 deletions .jazzy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ author_url: "https://www.bugsnag.com"
author: "Bugsnag Inc"
clean: false # avoid deleting docs/.git
framework_root: "Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.9.6/Bugsnag"
github_file_prefix: "https://github.com/bugsnag/bugsnag-cocoa/tree/v6.9.7/Bugsnag"
github_url: "https://github.com/bugsnag/bugsnag-cocoa"
hide_documentation_coverage: true
module: "Bugsnag"
module_version: "6.9.6"
module_version: "6.9.7"
objc: true
output: "docs"
readme: "README.md"
Expand Down
4 changes: 2 additions & 2 deletions Bugsnag.podspec.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bugsnag",
"version": "6.9.6",
"version": "6.9.7",
"summary": "The Bugsnag crash reporting framework for Apple platforms.",
"homepage": "https://bugsnag.com",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
},
"source": {
"git": "https://github.com/bugsnag/bugsnag-cocoa.git",
"tag": "v6.9.6"
"tag": "v6.9.7"
},
"frameworks": [
"Foundation",
Expand Down
4 changes: 3 additions & 1 deletion Bugsnag/Client/BugsnagClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,9 @@ - (void)appHangDetectedAtDate:(NSDate *)date withThreads:(NSArray<BugsnagThread
session:self.sessionTracker.runningSession];

self.appHangEvent.context = self.context;


[self.appHangEvent symbolicateIfNeeded];

NSError *writeError = nil;
NSDictionary *json = [self.appHangEvent toJsonWithRedactedKeys:self.configuration.redactedKeys];
if (![BSGJSONSerialization writeJSONObject:json toFile:BSGFileLocations.current.appHangEvent options:0 error:&writeError]) {
Expand Down
28 changes: 19 additions & 9 deletions Bugsnag/Delivery/BSGEventUploadKSCrashReportOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,30 @@
#import "BugsnagLogger.h"


static void ReportInternalError(NSString *errorClass, NSString *message, NSDictionary *diagnostics) {
//
// NSJSONSerialization deserialization errors unhelpfully all have the same error domain & code - NSCocoaErrorDomain 3840.
// Therefore it's more useful to group based on the error description - but some of the descriptions contain character
// offsets which would lead to some types of errors not being grouped at all; e.g.
// - "Invalid value around character 229194."
// - "No string key for value in object around character 94208."
// - "Unable to convert data to string around character 158259."
// - "Unterminated string around character 22568."
//
NSString *groupingMessage = [message componentsSeparatedByString:@" around character "].firstObject;
NSString *groupingHash = [NSString stringWithFormat:@"BSGEventUploadKSCrashReportOperation.m: %@: %@", errorClass, groupingMessage];
[BSGInternalErrorReporter.sharedInstance reportErrorWithClass:errorClass message:message diagnostics:diagnostics groupingHash:groupingHash];
}


@implementation BSGEventUploadKSCrashReportOperation

- (BugsnagEvent *)loadEventAndReturnError:(NSError * __autoreleasing *)errorPtr {
NSError *error = nil;

NSData *data = [NSData dataWithContentsOfFile:self.file options:0 error:&error];
if (!data) {
[BSGInternalErrorReporter.sharedInstance reportErrorWithClass:@"File reading error"
message:BSGErrorDescription(error)
diagnostics:error.userInfo];
ReportInternalError(@"File reading error", BSGErrorDescription(error), error.userInfo);
if (errorPtr) {
*errorPtr = error;
}
Expand All @@ -40,9 +54,7 @@ - (BugsnagEvent *)loadEventAndReturnError:(NSError * __autoreleasing *)errorPtr
if (!json) {
NSMutableDictionary *diagnostics = [NSMutableDictionary dictionary];
diagnostics[@"data"] = [data base64EncodedStringWithOptions:0];
[BSGInternalErrorReporter.sharedInstance reportErrorWithClass:@"JSON parsing error"
message:BSGErrorDescription(error)
diagnostics:diagnostics];
ReportInternalError(@"JSON parsing error", BSGErrorDescription(error), diagnostics);
if (errorPtr) {
*errorPtr = error;
}
Expand All @@ -51,9 +63,7 @@ - (BugsnagEvent *)loadEventAndReturnError:(NSError * __autoreleasing *)errorPtr

NSDictionary *crashReport = [self fixupCrashReport:json];
if (!crashReport) {
[BSGInternalErrorReporter.sharedInstance reportErrorWithClass:@"Unexpected JSON payload"
message:@"-fixupCrashReport: returned nil"
diagnostics:@{@"json": json}];
ReportInternalError(@"Unexpected JSON payload", @"-fixupCrashReport: returned nil", @{@"json": json});
return nil;
}

Expand Down
2 changes: 2 additions & 0 deletions Bugsnag/Helpers/BSGAppHangDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ NS_ASSUME_NONNULL_BEGIN

- (void)startWithDelegate:(id<BSGAppHangDetectorDelegate>)delegate;

- (void)stop;

@end


Expand Down
Loading