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.16.3 #1715

Merged
merged 29 commits into from
Apr 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6ac68ca
chore(examples): add missing Dockerfile to angular example
djskinner Mar 10, 2022
d2eeda4
dep: bump bugsnag-android dependency to v5.20.0
lemnik Mar 10, 2022
e5a4e42
chore(plugin-restify): send body in event.request
djskinner Mar 10, 2022
03f066e
chore(plugin-express): send body in event.request
djskinner Mar 10, 2022
a712937
Merge pull request #1700 from bugsnag/android-5200
lemnik Mar 11, 2022
248e5e3
Merge pull request #1701 from bugsnag/plat-6095
djskinner Mar 11, 2022
73d94e5
chore: update changelog
djskinner Mar 14, 2022
07d5963
Merge pull request #1699 from bugsnag/plat-7811
djskinner Mar 14, 2022
f21fab8
Merge branch 'next' into plat-6094
djskinner Mar 14, 2022
0488922
Merge pull request #1702 from bugsnag/plat-6094
djskinner Mar 14, 2022
98cf0de
RN fixture update: Add rn0.67 test fixture
Cawllec Mar 16, 2022
62a9c54
RN fixture update: Add rn0.65 & rn0.66 test fixtures
Cawllec Mar 16, 2022
28a4728
RN fixture update: Disable hermes in 0.64 and enable in 0.67
Cawllec Mar 16, 2022
ea8d5af
RN fixture update: Remove older fixtures and test runs
Cawllec Mar 21, 2022
2c84b58
RN fixture update: Build tools and fixture updates
Cawllec Mar 22, 2022
7e7b1f7
RN fixture update: Disable certain scenarios in hermes until PLAT-8236
Cawllec Mar 23, 2022
49a5fbf
RN fixture update: Update the iOS instructions to add required files/…
Cawllec Mar 28, 2022
af4eb17
Merge pull request #1708 from bugsnag/testing/rn-version-update
Cawllec Mar 30, 2022
6234441
React native CLI version update: Add 0.65 test fixture
Cawllec Mar 29, 2022
2fa8fa8
React native CLI version update: Add 0.66 test fixture
Cawllec Mar 29, 2022
d3f0ba1
React native CLI version update: Add 0.67 test fixture
Cawllec Mar 29, 2022
bca5155
React native CLI version update: Add 0.67 hermes test fixture
Cawllec Mar 29, 2022
877aac7
React native CLI version update: Remove 0.64 hermes test fixture
Cawllec Mar 29, 2022
5336da4
React native CLI version update: Update shared and pipeline files
Cawllec Mar 29, 2022
db6620d
React native CLI version update: Fix typo in docker-compose file
Cawllec Mar 31, 2022
7e0eeb4
dep: bump bugsnag-android dependency to v5.22.0
lemnik Apr 1, 2022
59e4de9
Merge pull request #1710 from bugsnag/testing/rn-cli-version-update
Cawllec Apr 1, 2022
8bae662
Merge pull request #1711 from bugsnag/android-5220
lemnik Apr 4, 2022
2d72317
Add version & date to changelog
imjoehaines Apr 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
301 changes: 281 additions & 20 deletions .buildkite/react-native-cli-pipeline.yml

Large diffs are not rendered by default.

211 changes: 143 additions & 68 deletions .buildkite/react-native-pipeline.yml

Large diffs are not rendered by default.

37 changes: 35 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
# Changelog

### v7.16.2 (2022-03-09)
## v7.16.3 (2022-04-05)

### Changed

- (react-native) Update bugsnag-android to v5.22.0
- The number of threads reported can now be limited using `Configuration.setMaxReportedThreads` (defaulting to 200)
[bugsnag-android#1607](https://github.com/bugsnag/bugsnag-android/pull/1607)
- Improved the performance and stability of the NDK and ANR plugins by caching JNI references on start
[bugsnag-android#1596](https://github.com/bugsnag/bugsnag-android/pull/1596)
[bugsnag-android#1601](https://github.com/bugsnag/bugsnag-android/pull/1601)
- Fix inconsistencies in stack trace quality for C/C++ events. Resolves a few
cases where file and line number information was not resolving to the correct
locations. This change may result in grouping changes to more correctly
highlight the root cause of an event.
[bugsnag-android#1605](https://github.com/bugsnag/bugsnag-android/pull/1605)
[bugsnag-android#1606](https://github.com/bugsnag/bugsnag-android/pull/1606)
- Fixed an issue where an uncaught exception on the main thread could in rare cases trigger an ANR.
[bugsnag-android#1624](https://github.com/bugsnag/bugsnag-android/pull/1624)
- 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.
[slack-jallen](https://github.com/slack-jallen):[#1621](https://github.com/bugsnag/bugsnag-android/pull/1621)
[bugsnag-android#1640](https://github.com/bugsnag/bugsnag-android/pull/1640)
- Events and Sessions will be discarded if they cannot be uploaded and are older than 60 days or larger than 1MB
[bugsnag-android#1633](https://github.com/bugsnag/bugsnag-android/pull/1633)
- 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.
- [bugsnag-android#1638](https://github.com/bugsnag/bugsnag-android/pull/1638)
- Calling `bugsnag_event_set_context` with NULL `context` correctly clears the event context again
[bugsnag-android#1637](https://github.com/bugsnag/bugsnag-android/pull/1637)

### Fixed

- (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)
- (plugin-restify): Include request body [#1701](https://github.com/bugsnag/bugsnag-js/pull/1701)

## v7.16.2 (2022-03-09)

### Fixed

Expand All @@ -10,7 +43,7 @@

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

### 7.16.1 (2022-02-02)
## 7.16.1 (2022-02-02)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ services:
BROWSER_STACK_USERNAME:
BROWSER_STACK_ACCESS_KEY:
SKIP_NAVIGATION_SCENARIOS:
HERMES:
networks:
default:
aliases:
Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.android-builder-base
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM openjdk:8-jdk-buster

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

# Android tools
Expand Down
9 changes: 9 additions & 0 deletions examples/ts/angular/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:8

WORKDIR /usr/src/app

COPY package* /usr/src/app/
RUN npm install

COPY . /usr/src/app/
CMD npm run serve -- --host 0.0.0.0
2 changes: 1 addition & 1 deletion examples/ts/angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker build -t bugsnag-js-example-angular . && \
docker run -p 4200:4200 -it bugsnag-js-example-angular
```

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

### Without docker
Ensure you have a version of Node.js >=4 on your machine.
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-express/src/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ module.exports = {
}

const getRequestAndMetadataFromReq = req => {
const requestInfo = extractRequestInfo(req)
const { body, ...requestInfo } = extractRequestInfo(req)
return {
metadata: requestInfo,
request: {
body,
clientIp: requestInfo.clientIp,
headers: requestInfo.headers,
httpMethod: requestInfo.httpMethod,
Expand Down
9 changes: 5 additions & 4 deletions packages/plugin-restify/src/restify.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ module.exports = {
req.bugsnag = requestClient

// extract request info and pass it to the relevant bugsnag properties
const { request, metadata } = getRequestAndMetadataFromReq(req)
requestClient.addMetadata('request', metadata)
requestClient.addOnError((event) => {
const { request, metadata } = getRequestAndMetadataFromReq(req)
event.request = { ...event.request, ...request }
requestClient.addMetadata('request', metadata)
}, true)

if (!client._config.autoDetectErrors) return next()
Expand Down Expand Up @@ -77,15 +77,16 @@ module.exports = {
}

const getRequestAndMetadataFromReq = req => {
const requestInfo = extractRequestInfo(req)
const { body, ...requestInfo } = extractRequestInfo(req)
return {
metadata: requestInfo,
request: {
body,
clientIp: requestInfo.clientIp,
headers: requestInfo.headers,
httpMethod: requestInfo.httpMethod,
url: requestInfo.url,
referer: requestInfo.referer
referer: requestInfo.referer // Not part of the notifier spec for request but leaving for backwards compatibility
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/react-native/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ android {
}

dependencies {
api "com.bugsnag:bugsnag-android:5.19.2"
api "com.bugsnag:bugsnag-plugin-react-native:5.19.2"
api "com.bugsnag:bugsnag-android:5.22.0"
api "com.bugsnag:bugsnag-plugin-react-native:5.22.0"
implementation 'com.facebook.react:react-native:+'

testImplementation "junit:junit:4.12"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/prepare-android-vendor.config
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version
5.19.2
5.22.0
2 changes: 1 addition & 1 deletion test/node/features/express.feature
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,5 @@ Scenario: adding body to request metadata
And the exception "message" equals "request body"
And the exception "type" equals "nodejs"
And the "file" of stack frame 0 equals "scenarios/app.js"
And the event "metaData.request.body.data" equals "in_request_body"
And the event "request.body.data" equals "in_request_body"
And the event "request.httpMethod" equals "POST"
6 changes: 6 additions & 0 deletions test/node/features/fixtures/restify/scenarios/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ var server = restify.createServer()

server.pre(middleware.requestHandler)

server.use(restify.plugins.bodyParser());

// If the server hasn't started sending something within 2 seconds
// it probably won't. So end the request and hurry the failing test
// along.
Expand Down Expand Up @@ -79,6 +81,10 @@ server.get('/handled', function (req, res, next) {
res.end('OK')
})

server.post('/bodytest', function (req, res, next) {
throw new Error('request body')
})

server.on('restifyError', middleware.errorHandler)

server.listen(80)
13 changes: 13 additions & 0 deletions test/node/features/restify.feature
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,16 @@ Scenario: a handled error passed to req.bugsnag.notify()
And the event "request.url" equals "http://restify/handled"
And the event "request.httpMethod" equals "GET"
And the event "request.clientIp" is not null

Scenario: adding body to request metadata
When I POST the data "data=in_request_body" to the URL "http://restify/bodytest"
And I wait to receive an error
Then the error is valid for the error reporting API version "4" for the "Bugsnag Node" notifier
And the event "unhandled" is true
And the event "severity" equals "error"
And the exception "errorClass" equals "Error"
And the exception "message" equals "request body"
And the exception "type" equals "nodejs"
And the "file" of stack frame 0 equals "scenarios/app.js"
And the event "request.body.data" equals "in_request_body"
And the event "request.httpMethod" equals "POST"
48 changes: 46 additions & 2 deletions test/react-native-cli/features/fixtures/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ services:
aliases:
- maze-runner

rn0_63_expo_ejected:
build:
context: rn0_63_expo_ejected
dockerfile: ../Dockerfile
environment:
DEBUG:
networks:
default:
aliases:
- maze-runner

rn0_64:
build:
context: rn0_64
Expand All @@ -55,9 +66,42 @@ services:
aliases:
- maze-runner

rn0_63_expo_ejected:
rn0_65:
build:
context: rn0_63_expo_ejected
context: rn0_65
dockerfile: ../Dockerfile
environment:
DEBUG:
networks:
default:
aliases:
- maze-runner

rn0_66:
build:
context: rn0_66
dockerfile: ../Dockerfile
environment:
DEBUG:
networks:
default:
aliases:
- maze-runner

rn0_67:
build:
context: rn0_67
dockerfile: ../Dockerfile
environment:
DEBUG:
networks:
default:
aliases:
- maze-runner

rn0_67_hermes:
build:
context: rn0_67_hermes
dockerfile: ../Dockerfile
environment:
DEBUG:
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading