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 v7.8.0 #1302

Merged
merged 35 commits into from
Feb 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d322122
feat(react-native): Cocoa mixed-type stacktraces
nickdowell Nov 23, 2020
24bfb8e
test(react-native): NativeStackHandledScenario in Swift
nickdowell Dec 3, 2020
3d2091c
Merge branch 'next' into nickdowell/cocoa-mixed-stacktrace
bengourley Dec 18, 2020
91bc1c9
Merge branch 'next' into nickdowell/cocoa-mixed-stacktrace
bengourley Jan 20, 2021
f984928
Merge pull request #1138 from bugsnag/nickdowell/cocoa-mixed-stacktrace
bengourley Jan 21, 2021
8252b17
feat(react-native): Upgrade Android version
bengourley Jan 21, 2021
9ad664c
Merge branch 'integration/rn-mixed-stacktraces' into bengourley/rn-mi…
bengourley Jan 21, 2021
7c9dcf9
fix(react-native): Update type cast
bengourley Jan 21, 2021
6426aae
Merge branch 'next' into integration/rn-mixed-stacktraces
bengourley Jan 25, 2021
27b0ca0
Merge branch 'integration/rn-mixed-stacktraces' into bengourley/rn-mi…
bengourley Jan 25, 2021
3adc2a1
chore(react-native-cli): Add TypeScript dependency and fix type issue
bengourley Jan 25, 2021
da5945d
test(react-native): Add Android tests for mixed stacktraces
bengourley Jan 25, 2021
c1e585f
test(react-native): Fix Handled/Unhandled assertion value
bengourley Jan 26, 2021
367c6d4
test(react-native): Make assertion work for RN 0.63
bengourley Jan 26, 2021
a3c1129
Merge pull request #1256 from bugsnag/bengourley/rn-mixed-stacktraces…
bengourley Jan 26, 2021
36825f5
test: bump bugsnag-android dep
fractalwrench Feb 2, 2021
c653402
Merge pull request #1279 from bugsnag/test-rn-mixed-stacktraces
bengourley Feb 4, 2021
f8d9749
test(node): increase integration test timeout
djskinner Feb 11, 2021
7dc296a
Tests: Update react-native-cli to use generic steps
Cawllec Feb 10, 2021
fffcdaf
Tests: Verify step changes work correctly for react-native-cli
Cawllec Feb 10, 2021
7775c1f
Tests: Update lockfile for CLI tests
Cawllec Feb 10, 2021
80c6a90
Tests: Remove image caching from CLI test image build
Cawllec Feb 12, 2021
7ed6346
Tests: Update react-native-cli step syntax
Cawllec Feb 12, 2021
6a5e7fa
Tests: Update dependencies and re-instate pipeline in full
Cawllec Feb 15, 2021
4ba6a0e
Merge pull request #1293 from bugsnag/tests/react-native-cli-mr
Cawllec Feb 15, 2021
b310678
[PLAT-5950] Store source maps in $TMPDIR during Xcode build phases (#…
nickdowell Feb 17, 2021
69c90d1
Update cocoa to 6.6.3
kstenerud Feb 18, 2021
0d365ed
Update CHANGELOG.md
kstenerud Feb 18, 2021
7da5b3b
Merge pull request #1291 from bugsnag/test-increase-timeout
djskinner Feb 19, 2021
33d0938
Merge pull request #1298 from bugsnag/cocoa-6.6.3
bengourley Feb 22, 2021
9bd8c8e
Merge branch 'next' into integration/rn-mixed-stacktraces
bengourley Feb 22, 2021
ae105ba
chore: Fix bad merge
bengourley Feb 22, 2021
e2de275
chore: Update changelog
bengourley Feb 22, 2021
3f86be1
Merge pull request #1253 from bugsnag/integration/rn-mixed-stacktraces
imjoehaines Feb 22, 2021
57f3184
Bump changelog version
imjoehaines Feb 22, 2021
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
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## v7.8.0 (2021-02-22)

### Changed

- (react-native): Update bugsnag-cocoa to v6.6.3
- Improve performance of thread recording for handled errors [bugsnag-cocoa#992](https://github.com/bugsnag/bugsnag-cocoa/pull/992)
- Stop Bugsnag unregistering other signal handlers when catching a mach exception [bugsnag-cocoa#976](https://github.com/bugsnag/bugsnag-cocoa/pull/976)/[bugsnag-cocoa#1002](https://github.com/bugsnag/bugsnag-cocoa/pull/1002)
- Fix a tvOS file permission error that was introduced in 6.5.1 [bugsnag-cocoa#996](https://github.com/bugsnag/bugsnag-cocoa/pull/996)
- Fix an analyzer warning [bugsnag-cocoa#994](https://github.com/bugsnag/bugsnag-cocoa/pull/994)

### Added

- (react-native): Capture additional native stack for native promise rejections [#1253](https://github.com/bugsnag/bugsnag-js/pull/1253)

## v7.7.0 (2021-02-15)

### Changed
Expand Down
2 changes: 1 addition & 1 deletion TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ The CLI tests target the command line interface by providing a set of responses
1. Run `npm pack packages/react-native-cli/` to pack the react-native-cli package
1. Copy the resulting package, `bugsnag-react-native-cli-{VERSION}.tgz` into the target fixture, e.g.:
```shell script
cp bugsnag-react-native-cli-*.tgz tests/react-native-cli/features/fixtures/rn0_60/
cp bugsnag-react-native-cli-*.tgz test/react-native-cli/features/fixtures/rn0_60/
```

##### Running
Expand Down
20 changes: 10 additions & 10 deletions packages/delivery-react-native/delivery.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module.exports = (client, NativeClient) => ({
sendEvent: (payload, cb = () => {}) => {
const event = payload.events[0]
// let nativeStack
// if (event.originalError) {
// if (event.originalError.nativeStackIOS) {
// nativeStack = event.originalError.nativeStackIOS
// } else if (event.originalError.nativeStackAndroid) {
// nativeStack = event.originalError.nativeStackAndroid
// }
// }
let nativeStack
if (event.originalError) {
if (event.originalError.nativeStackIOS) {
nativeStack = event.originalError.nativeStackIOS
} else if (event.originalError.nativeStackAndroid) {
nativeStack = event.originalError.nativeStackAndroid
}
}
NativeClient.dispatch({
errors: event.errors,
severity: event.severity,
Expand All @@ -22,8 +22,8 @@ module.exports = (client, NativeClient) => ({
user: event._user,
metadata: event._metadata,
groupingHash: event.groupingHash,
apiKey: event.apiKey//,
// nativeStack: nativeStack
apiKey: event.apiKey,
nativeStack: nativeStack
}).then(() => cb()).catch(cb)
},
sendSession: () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/node/test/integration/handled-unhandled.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('@bugsnag/node: handled and unhandled errors', () => {
expect(https._requests[0].body.events[0].unhandled).toBe(true)
expect(https._requests[0].body.events[0].severityReason).toEqual({ type: 'unhandledException' })
done()
}, 100)
}, 200)
})

it('should send an unhandled rejection', (done) => {
Expand All @@ -84,6 +84,6 @@ describe('@bugsnag/node: handled and unhandled errors', () => {
expect(https._requests[0].body.events[0].unhandled).toBe(true)
expect(https._requests[0].body.events[0].severityReason).toEqual({ type: 'unhandledPromiseRejection' })
done()
}, 100)
}, 200)
})
})
6 changes: 6 additions & 0 deletions packages/react-native-cli/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/react-native-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"devDependencies": {
"@types/command-line-args": "^5.0.0",
"@types/command-line-usage": "^5.0.1",
"@types/prompts": "^2.0.9"
"@types/prompts": "^2.0.9",
"typescript": "^4.1.3"
}
}
8 changes: 4 additions & 4 deletions packages/react-native-cli/src/lib/Xcode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const DOCS_LINK = 'https://docs.bugsnag.com/platforms/react-native/react-native/
const UNLOCATED_PROJ_MSG = `The Xcode project was not in the expected location and so couldn't be updated automatically.

Update the "Bundle React Native Code And Images" build phase with the following environment variables:
export EXTRA_PACKAGER_ARGS="--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map"
export EXTRA_PACKAGER_ARGS="--sourcemap-output $TMPDIR/$(md5 -qs "$CONFIGURATION_BUILD_DIR")-main.jsbundle.map""

See ${DOCS_LINK} for more information`

const EXTRA_PACKAGER_ARGS = 'export EXTRA_PACKAGER_ARGS="--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map"'
const EXTRA_PACKAGER_ARGS = 'export EXTRA_PACKAGER_ARGS="--sourcemap-output $TMPDIR/$(md5 -qs "$CONFIGURATION_BUILD_DIR")-main.jsbundle.map"'

export async function updateXcodeProject (projectRoot: string, endpoint: string|undefined, logger: Logger) {
const iosDir = path.join(projectRoot, 'ios')
Expand All @@ -25,7 +25,7 @@ export async function updateXcodeProject (projectRoot: string, endpoint: string|
const pbxProjPath = path.join(iosDir, xcodeprojDir, 'project.pbxproj')
const proj = xcode.project(pbxProjPath)

await new Promise((resolve, reject) => {
await new Promise<void>((resolve, reject) => {
proj.parse((err) => {
if (err) return reject(err)
resolve()
Expand Down Expand Up @@ -76,7 +76,7 @@ async function addUploadSourceMapsTask (
}
}

let shellScript = '../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh'
let shellScript = 'SOURCE_MAP="$TMPDIR/$(md5 -qs "$CONFIGURATION_BUILD_DIR")-main.jsbundle.map" ../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh'

if (endpoint) {
shellScript = `export ENDPOINT='${endpoint}'\\n${shellScript}`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -390,7 +390,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
3EBDF05F265B984FA826288C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -566,7 +566,7 @@
outputPaths = (
);
shellPath = /bin/sh;
shellScript = "export ENDPOINT='https://upload.example.com'\n../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh";
shellScript = "export ENDPOINT='https://upload.example.com'\nSOURCE_MAP=\"$TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\" ../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -390,7 +390,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
shellScript = "export EXTRA_PACKAGER_ARGS=\"--sourcemap-output $TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\"\nexport NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
3EBDF05F265B984FA826288C /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -566,7 +566,7 @@
outputPaths = (
);
shellPath = /bin/sh;
shellScript = "../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh";
shellScript = "SOURCE_MAP=\"$TMPDIR/$(md5 -qs \"$CONFIGURATION_BUILD_DIR\")-main.jsbundle.map\" ../node_modules/@bugsnag/react-native/bugsnag-react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
11 changes: 7 additions & 4 deletions packages/react-native/bugsnag-react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ if [ ! -f "$BUNDLE_FILE" ]; then
exit 0
fi

MAP_FILE="$BUNDLE_FILE.map"
if [ ! -f "$MAP_FILE" ]; then
echo "Error: Source map main.jsbundle.map could not be found."
if [ -z "$SOURCE_MAP" ]; then
echo "Warning: SOURCE_MAP was not specified, falling back to $BUNDLE_FILE.map"
SOURCE_MAP="$BUNDLE_FILE.map"
fi
if [ ! -f "$SOURCE_MAP" ]; then
echo "Error: SOURCE_MAP $SOURCE_MAP could not be found."
echo "Ensure the --sourcemap-output option is passed to the react-native bundle command."
exit 1
fi
Expand All @@ -39,7 +42,7 @@ ARGS=(
"--app-version" "$APP_VERSION"
"--bundle" "$BUNDLE_FILE"
"--platform" "ios"
"--source-map" "$MAP_FILE"
"--source-map" "$SOURCE_MAP"
"--project-root" "$PROJECT_ROOT"
)

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/ios/.bugsnag-cocoa-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
be6136cc119a0fdb725243859d6808102aebe1e4
e74e2b3632a43406e49304f2cf1b2221a4313401
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#import "BugsnagEvent+Private.h"
#import "BugsnagHandledState.h"
#import "BugsnagSessionTracker+Private.h"
#import "BugsnagStackframe+Private.h"
#import "BugsnagStacktrace.h"
#import "BugsnagThread+Private.h"
#import "BugsnagUser+Private.h"
Expand Down Expand Up @@ -52,23 +53,20 @@ - (BugsnagEvent *)deserializeEvent:(NSDictionary *)payload {
if (error != nil) {
event.errors[0].errorClass = error[@"errorClass"];
event.errors[0].errorMessage = error[@"errorMessage"];
[event attachCustomStacktrace:error[@"stacktrace"] withType:@"reactnativejs"];
}

id nativeStack = payload[@"nativeStack"];
if ([nativeStack isKindOfClass:[NSArray class]] &&
[nativeStack filteredArrayUsingPredicate:
[NSPredicate predicateWithFormat:@"NOT SELF isKindOfClass: %@", [NSString class]]].count == 0) {
NSArray<BugsnagStackframe *> *stackframes = [BugsnagStackframe stackframesWithCallStackSymbols:nativeStack];
if (stackframes != nil) {
BugsnagError *nativeError = [[BugsnagError alloc] initWithErrorClass:error[@"errorClass"]
errorMessage:error[@"errorMessage"]
errorType:BSGErrorTypeCocoa
stacktrace:stackframes];
event.errors = [event.errors arrayByAddingObject:nativeError];
NSArray<NSDictionary *> *stacktrace = error[@"stacktrace"];
NSArray<NSString *> *nativeStack = payload[@"nativeStack"];
if (nativeStack) {
NSMutableArray<NSDictionary *> *mixedStack = [NSMutableArray array];
for (BugsnagStackframe *frame in [BugsnagStackframe stackframesWithCallStackSymbols:nativeStack]) {
frame.type = BugsnagStackframeTypeCocoa;
[mixedStack addObject:[frame toDictionary]];
}
[mixedStack addObjectsFromArray:stacktrace];
stacktrace = mixedStack;
}
[event attachCustomStacktrace:stacktrace withType:@"reactnativejs"];
}

return event;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Bugsnag",
"version": "6.6.1",
"version": "6.6.3",
"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.6.1"
"tag": "v6.6.3"
},
"frameworks": [
"Foundation",
Expand Down
Loading