Skip to content

Commit 4160098

Browse files
authored
Merge pull request #1715 from bugsnag/release/v7.16.3
Release v7.16.3
2 parents 58c0ade + 2d72317 commit 4160098

File tree

470 files changed

+66999
-12116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

470 files changed

+66999
-12116
lines changed

.buildkite/react-native-cli-pipeline.yml

Lines changed: 281 additions & 20 deletions
Large diffs are not rendered by default.

.buildkite/react-native-pipeline.yml

Lines changed: 143 additions & 68 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,39 @@
11
# Changelog
22

3-
### v7.16.2 (2022-03-09)
3+
## v7.16.3 (2022-04-05)
4+
5+
### Changed
6+
7+
- (react-native) Update bugsnag-android to v5.22.0
8+
- The number of threads reported can now be limited using `Configuration.setMaxReportedThreads` (defaulting to 200)
9+
[bugsnag-android#1607](https://github.com/bugsnag/bugsnag-android/pull/1607)
10+
- Improved the performance and stability of the NDK and ANR plugins by caching JNI references on start
11+
[bugsnag-android#1596](https://github.com/bugsnag/bugsnag-android/pull/1596)
12+
[bugsnag-android#1601](https://github.com/bugsnag/bugsnag-android/pull/1601)
13+
- Fix inconsistencies in stack trace quality for C/C++ events. Resolves a few
14+
cases where file and line number information was not resolving to the correct
15+
locations. This change may result in grouping changes to more correctly
16+
highlight the root cause of an event.
17+
[bugsnag-android#1605](https://github.com/bugsnag/bugsnag-android/pull/1605)
18+
[bugsnag-android#1606](https://github.com/bugsnag/bugsnag-android/pull/1606)
19+
- Fixed an issue where an uncaught exception on the main thread could in rare cases trigger an ANR.
20+
[bugsnag-android#1624](https://github.com/bugsnag/bugsnag-android/pull/1624)
21+
- Added `Bugsnag.isStarted()` to test whether the Bugsnag client is in the middle of initializing. This can be used to guard uses of the Bugsnag API that are either on separate threads early in the app's start-up and so not guaranteed to be executed after `Bugsnag.start` has completed, or where Bugsnag may not have been started at all due to some internal app logic.
22+
[slack-jallen](https://github.com/slack-jallen):[#1621](https://github.com/bugsnag/bugsnag-android/pull/1621)
23+
[bugsnag-android#1640](https://github.com/bugsnag/bugsnag-android/pull/1640)
24+
- Events and Sessions will be discarded if they cannot be uploaded and are older than 60 days or larger than 1MB
25+
[bugsnag-android#1633](https://github.com/bugsnag/bugsnag-android/pull/1633)
26+
- Fixed potentially [thread-unsafe access](https://github.com/bugsnag/bugsnag-android/issues/883) when invoking `Bugsnag` static methods across different threads whilst `Bugsnag.start` is still in-flight. It is now safe to call any `Bugsnag` static method once `Bugsnag.start` has _begun_ executing, as access to the client singleton is controlled by a lock, so the new `isStarted` method (see above) should only be required where it cannot be determined whether the call to `Bugsnag.start` has begun or you do not want to wait.
27+
- [bugsnag-android#1638](https://github.com/bugsnag/bugsnag-android/pull/1638)
28+
- Calling `bugsnag_event_set_context` with NULL `context` correctly clears the event context again
29+
[bugsnag-android#1637](https://github.com/bugsnag/bugsnag-android/pull/1637)
30+
31+
### Fixed
32+
33+
- (plugin-express): send the request body (if present) as `event.request.body` rather than `event.metadata.request.body` [#1702](https://github.com/bugsnag/bugsnag-js/pull/1702)
34+
- (plugin-restify): Include request body [#1701](https://github.com/bugsnag/bugsnag-js/pull/1701)
35+
36+
## v7.16.2 (2022-03-09)
437

538
### Fixed
639

@@ -10,7 +43,7 @@
1043

1144
- (plugin-react-navigation): Allow React Navigation v6 as a peer dependency [#1691](https://github.com/bugsnag/bugsnag-js/pull/1691)
1245

13-
### 7.16.1 (2022-02-02)
46+
## 7.16.1 (2022-02-02)
1447

1548
### Fixed
1649

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ services:
244244
BROWSER_STACK_USERNAME:
245245
BROWSER_STACK_ACCESS_KEY:
246246
SKIP_NAVIGATION_SCENARIOS:
247+
HERMES:
247248
networks:
248249
default:
249250
aliases:

dockerfiles/Dockerfile.android-builder-base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM openjdk:8-jdk-buster
22

33
# OS setup
4-
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
4+
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
55
RUN apt-get update && apt-get install -y gradle jq git-core build-essential openssl libssl-dev
66

77
# Android tools

examples/ts/angular/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM node:8
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY package* /usr/src/app/
6+
RUN npm install
7+
8+
COPY . /usr/src/app/
9+
CMD npm run serve -- --host 0.0.0.0

examples/ts/angular/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ docker build -t bugsnag-js-example-angular . && \
2727
docker run -p 4200:4200 -it bugsnag-js-example-angular
2828
```
2929

30-
__Note__: remember to replace `YOUR_API_KEY` in `src/lib/bugsnag.js` with your own!
30+
__Note__: remember to replace `YOUR_API_KEY` in `src/app/app.module.ts` with your own!
3131

3232
### Without docker
3333
Ensure you have a version of Node.js >=4 on your machine.

packages/plugin-express/src/express.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,11 @@ module.exports = {
7575
}
7676

7777
const getRequestAndMetadataFromReq = req => {
78-
const requestInfo = extractRequestInfo(req)
78+
const { body, ...requestInfo } = extractRequestInfo(req)
7979
return {
8080
metadata: requestInfo,
8181
request: {
82+
body,
8283
clientIp: requestInfo.clientIp,
8384
headers: requestInfo.headers,
8485
httpMethod: requestInfo.httpMethod,

packages/plugin-restify/src/restify.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ module.exports = {
2424
req.bugsnag = requestClient
2525

2626
// extract request info and pass it to the relevant bugsnag properties
27-
const { request, metadata } = getRequestAndMetadataFromReq(req)
28-
requestClient.addMetadata('request', metadata)
2927
requestClient.addOnError((event) => {
28+
const { request, metadata } = getRequestAndMetadataFromReq(req)
3029
event.request = { ...event.request, ...request }
30+
requestClient.addMetadata('request', metadata)
3131
}, true)
3232

3333
if (!client._config.autoDetectErrors) return next()
@@ -77,15 +77,16 @@ module.exports = {
7777
}
7878

7979
const getRequestAndMetadataFromReq = req => {
80-
const requestInfo = extractRequestInfo(req)
80+
const { body, ...requestInfo } = extractRequestInfo(req)
8181
return {
8282
metadata: requestInfo,
8383
request: {
84+
body,
8485
clientIp: requestInfo.clientIp,
8586
headers: requestInfo.headers,
8687
httpMethod: requestInfo.httpMethod,
8788
url: requestInfo.url,
88-
referer: requestInfo.referer
89+
referer: requestInfo.referer // Not part of the notifier spec for request but leaving for backwards compatibility
8990
}
9091
}
9192
}

packages/react-native/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ android {
3939
}
4040

4141
dependencies {
42-
api "com.bugsnag:bugsnag-android:5.19.2"
43-
api "com.bugsnag:bugsnag-plugin-react-native:5.19.2"
42+
api "com.bugsnag:bugsnag-android:5.22.0"
43+
api "com.bugsnag:bugsnag-plugin-react-native:5.22.0"
4444
implementation 'com.facebook.react:react-native:+'
4545

4646
testImplementation "junit:junit:4.12"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
version
2-
5.19.2
2+
5.22.0

test/node/features/express.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,5 @@ Scenario: adding body to request metadata
116116
And the exception "message" equals "request body"
117117
And the exception "type" equals "nodejs"
118118
And the "file" of stack frame 0 equals "scenarios/app.js"
119-
And the event "metaData.request.body.data" equals "in_request_body"
119+
And the event "request.body.data" equals "in_request_body"
120120
And the event "request.httpMethod" equals "POST"

test/node/features/fixtures/restify/scenarios/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ var server = restify.createServer()
1818

1919
server.pre(middleware.requestHandler)
2020

21+
server.use(restify.plugins.bodyParser());
22+
2123
// If the server hasn't started sending something within 2 seconds
2224
// it probably won't. So end the request and hurry the failing test
2325
// along.
@@ -79,6 +81,10 @@ server.get('/handled', function (req, res, next) {
7981
res.end('OK')
8082
})
8183

84+
server.post('/bodytest', function (req, res, next) {
85+
throw new Error('request body')
86+
})
87+
8288
server.on('restifyError', middleware.errorHandler)
8389

8490
server.listen(80)

test/node/features/restify.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,16 @@ Scenario: a handled error passed to req.bugsnag.notify()
8989
And the event "request.url" equals "http://restify/handled"
9090
And the event "request.httpMethod" equals "GET"
9191
And the event "request.clientIp" is not null
92+
93+
Scenario: adding body to request metadata
94+
When I POST the data "data=in_request_body" to the URL "http://restify/bodytest"
95+
And I wait to receive an error
96+
Then the error is valid for the error reporting API version "4" for the "Bugsnag Node" notifier
97+
And the event "unhandled" is true
98+
And the event "severity" equals "error"
99+
And the exception "errorClass" equals "Error"
100+
And the exception "message" equals "request body"
101+
And the exception "type" equals "nodejs"
102+
And the "file" of stack frame 0 equals "scenarios/app.js"
103+
And the event "request.body.data" equals "in_request_body"
104+
And the event "request.httpMethod" equals "POST"

test/react-native-cli/features/fixtures/docker-compose.yml

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ services:
4444
aliases:
4545
- maze-runner
4646

47+
rn0_63_expo_ejected:
48+
build:
49+
context: rn0_63_expo_ejected
50+
dockerfile: ../Dockerfile
51+
environment:
52+
DEBUG:
53+
networks:
54+
default:
55+
aliases:
56+
- maze-runner
57+
4758
rn0_64:
4859
build:
4960
context: rn0_64
@@ -55,9 +66,42 @@ services:
5566
aliases:
5667
- maze-runner
5768

58-
rn0_63_expo_ejected:
69+
rn0_65:
5970
build:
60-
context: rn0_63_expo_ejected
71+
context: rn0_65
72+
dockerfile: ../Dockerfile
73+
environment:
74+
DEBUG:
75+
networks:
76+
default:
77+
aliases:
78+
- maze-runner
79+
80+
rn0_66:
81+
build:
82+
context: rn0_66
83+
dockerfile: ../Dockerfile
84+
environment:
85+
DEBUG:
86+
networks:
87+
default:
88+
aliases:
89+
- maze-runner
90+
91+
rn0_67:
92+
build:
93+
context: rn0_67
94+
dockerfile: ../Dockerfile
95+
environment:
96+
DEBUG:
97+
networks:
98+
default:
99+
aliases:
100+
- maze-runner
101+
102+
rn0_67_hermes:
103+
build:
104+
context: rn0_67_hermes
61105
dockerfile: ../Dockerfile
62106
environment:
63107
DEBUG:

test/react-native-cli/features/fixtures/rn0_64_hermes/android/app/src/main/java/com/rn0_64_hermes/MainActivity.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

test/react-native-cli/features/fixtures/rn0_64_hermes/android/app/src/main/res/values/strings.xml

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/react-native-cli/features/fixtures/rn0_64_hermes/app.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)