Skip to content

Commit 4802864

Browse files
Merge remote-tracking branch 'origin/dev' into feat/network-spans-feature-flags
# Conflicts: # examples/default/ios/Podfile.lock
2 parents 6021e0a + 4752078 commit 4802864

File tree

9 files changed

+54
-25
lines changed

9 files changed

+54
-25
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/Instabug/Instabug-React-Native/compare/v13.3.0...dev)
3+
## [13.4.0](https://github.com/Instabug/Instabug-React-Native/compare/v13.3.0...v13.4.0) (October 2, 2024)
44

55
### Added
66

77
- Add support for Expo Router navigation tracking ([#1270](https://github.com/Instabug/Instabug-React-Native/pull/1270)).
88
- Enhance the network interceptor to capture more client error messages ([#1257](https://github.com/Instabug/Instabug-React-Native/pull/1257)).
99

10-
### Fixed
10+
### Changed
1111

12-
- Drop non-error objects reported as crashes since they don't have a stack trace ([#1279](https://github.com/Instabug/Instabug-React-Native/pull/1279)).
13-
- Fix APM network logging on iOS when the response body is missing or empty. ([#1273](https://github.com/Instabug/Instabug-React-Native/pull/1273)).
12+
- Bump Instabug iOS SDK to v13.4.2 ([#1285](https://github.com/Instabug/Instabug-React-Native/pull/1285)). See release notes for [13.4.0](https://github.com/Instabug/Instabug-iOS/releases/tag/13.4.0), [13.4.1](https://github.com/Instabug/Instabug-iOS/releases/tag/13.4.1) and [13.4.2](https://github.com/Instabug/Instabug-iOS/releases/tag/13.4.2).
13+
- Bump Instabug Android SDK to v13.4.1 ([#1285](https://github.com/Instabug/Instabug-React-Native/pull/1285)). See release notes for [13.4.0](https://github.com/Instabug/Instabug-Android/releases/tag/v13.4.0) and [13.4.1](https://github.com/Instabug/Instabug-Android/releases/tag/v13.4.1).
1414

1515
### Fixed
1616

17+
- Fix an issue with JavaScript fatal crashes on iOS causing them to be reported as native iOS crashes instead. ([#1290](https://github.com/Instabug/Instabug-React-Native/pull/1290)).
1718
- Correctly resolve the flavor path when uploading sourcemaps on Android. ([#1225](https://github.com/Instabug/Instabug-React-Native/pull/1225)).
19+
- Drop non-error objects reported as crashes since they don't have a stack trace ([#1279](https://github.com/Instabug/Instabug-React-Native/pull/1279)).
20+
- Fix APM network logging on iOS when the response body is missing or empty. ([#1273](https://github.com/Instabug/Instabug-React-Native/pull/1273)).
1821

1922
## [13.3.0](https://github.com/Instabug/Instabug-React-Native/compare/v13.2.0...v13.3.0) (August 4, 2024)
2023

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ android {
5757
minSdkVersion getExtOrDefault('minSdkVersion').toInteger()
5858
targetSdkVersion getExtOrDefault('targetSdkVersion').toInteger()
5959
versionCode 1
60-
versionName "13.3.0"
60+
versionName "13.4.0"
6161
multiDexEnabled true
6262
ndk {
6363
abiFilters "armeabi-v7a", "x86"

android/native.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
project.ext.instabug = [
2-
version: '13.3.0'
2+
version: '13.4.1'
33
]
44

55
dependencies {

examples/default/ios/InstabugTests/InstabugCrashReportingTests.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ - (void)testSetEnabled {
2626
XCTAssertFalse(IBGCrashReporting.enabled);
2727
}
2828

29+
- (void)testSendJSCrash {
30+
NSDictionary *stackTrace = @{};
31+
32+
XCTestExpectation *expectation = [self expectationWithDescription:@"Expected resolve to be called."];
33+
34+
RCTPromiseResolveBlock resolve = ^(id result) {
35+
[expectation fulfill];
36+
};
37+
RCTPromiseRejectBlock reject = ^(NSString *code, NSString *message, NSError *error) {};
38+
39+
[self.bridge sendJSCrash:stackTrace resolver:resolve rejecter:reject];
40+
41+
[self waitForExpectations:@[expectation] timeout:1];
42+
OCMVerify([self.mCrashReporting cp_reportFatalCrashWithStackTrace:stackTrace]);
43+
}
44+
2945
- (void)testSendNonFatalErrorJsonCrash {
3046
NSDictionary<NSString *,NSString * > *jsonCrash = @{};
3147
NSString *fingerPrint = @"fingerprint";

examples/default/ios/InstabugTests/InstabugSampleTests.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,12 @@ - (void)testNetworkLogIOS {
365365
startTime:startTime * 1000
366366
duration:duration * 1000
367367
gqlQueryName:gqlQueryName
368-
serverErrorMessage:serverErrorMessage]);
368+
serverErrorMessage:serverErrorMessage
369+
isW3cCaughted:nil
370+
partialID:nil
371+
timestamp:nil
372+
generatedW3CTraceparent:nil
373+
caughtedW3CTraceparent:nil]);
369374
}
370375

371376
- (void)testSetFileAttachment {

ios/RNInstabug/InstabugCrashReportingBridge.m

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@ + (BOOL)requiresMainQueueSetup
2929
RCT_EXPORT_METHOD(sendJSCrash:(NSDictionary *)stackTrace
3030
resolver:(RCTPromiseResolveBlock)resolve
3131
rejecter:(RCTPromiseRejectBlock)reject) {
32-
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
32+
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0ul);
3333
dispatch_async(queue, ^{
34-
SEL reportCrashWithStackTraceSEL = NSSelectorFromString(@"reportCrashWithStackTrace:handled:");
35-
if ([[Instabug class] respondsToSelector:reportCrashWithStackTraceSEL]) {
36-
[[Instabug class] performSelector:reportCrashWithStackTraceSEL withObject:stackTrace withObject:@(NO)];
37-
}
34+
[IBGCrashReporting cp_reportFatalCrashWithStackTrace:stackTrace];
3835
resolve([NSNull null]);
3936
});
4037
}
@@ -45,8 +42,6 @@ + (BOOL)requiresMainQueueSetup
4542
rejecter:(RCTPromiseRejectBlock)reject) {
4643
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0ul);
4744
dispatch_async(queue, ^{
48-
49-
5045
[IBGCrashReporting cp_reportNonFatalCrashWithStackTrace:stackTrace level:nonFatalExceptionLevel groupingString:fingerprint userAttributes:userAttributes];
5146

5247
resolve([NSNull null]);

ios/RNInstabug/InstabugReactBridge.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,12 @@ - (dispatch_queue_t)methodQueue {
314314
startTime:startTime * 1000
315315
duration:duration * 1000
316316
gqlQueryName:gqlQueryName
317-
serverErrorMessage:serverErrorMessage];
317+
serverErrorMessage:serverErrorMessage
318+
isW3cCaughted:nil
319+
partialID:nil
320+
timestamp:nil
321+
generatedW3CTraceparent:nil
322+
caughtedW3CTraceparent:nil];
318323
}
319324

320325
RCT_EXPORT_METHOD(addPrivateView: (nonnull NSNumber *)reactTag) {

ios/RNInstabug/Util/IBGNetworkLogger+CP.h

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,27 @@ NS_ASSUME_NONNULL_BEGIN
99
@property (class, atomic, assign) BOOL isNativeNetworkInterceptionFeatureEnabled;
1010

1111
+ (void)disableAutomaticCapturingOfNetworkLogs;
12-
+ (void)addNetworkLogWithUrl:(NSString *)url
13-
method:(NSString *)method
14-
requestBody:(NSString *)request
12+
+ (void)addNetworkLogWithUrl:(NSString *_Nonnull)url
13+
method:(NSString *_Nonnull)method
14+
requestBody:(NSString *_Nonnull)request
1515
requestBodySize:(int64_t)requestBodySize
16-
responseBody:(NSString *)response
16+
responseBody:(NSString *_Nonnull)response
1717
responseBodySize:(int64_t)responseBodySize
1818
responseCode:(int32_t)code
19-
requestHeaders:(NSDictionary *)requestHeaders
20-
responseHeaders:(NSDictionary *)responseHeaders
21-
contentType:(NSString *)contentType
22-
errorDomain:(NSString *)errorDomain
19+
requestHeaders:(NSDictionary *_Nonnull)requestHeaders
20+
responseHeaders:(NSDictionary *_Nonnull)responseHeaders
21+
contentType:(NSString *_Nonnull)contentType
22+
errorDomain:(NSString *_Nullable)errorDomain
2323
errorCode:(int32_t)errorCode
2424
startTime:(int64_t)startTime
2525
duration:(int64_t) duration
2626
gqlQueryName:(NSString * _Nullable)gqlQueryName
27-
serverErrorMessage:(NSString * _Nullable)serverErrorMessage;
27+
serverErrorMessage:(NSString * _Nullable)serverErrorMessage
28+
isW3cCaughted:(NSNumber * _Nullable)isW3cCaughted
29+
partialID:(NSNumber * _Nullable)partialID
30+
timestamp:(NSNumber * _Nullable)timestamp
31+
generatedW3CTraceparent:(NSString * _Nullable)generatedW3CTraceparent
32+
caughtedW3CTraceparent:(NSString * _Nullable)caughtedW3CTraceparent;
2833

2934
@end
3035

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "instabug-reactnative",
33
"description": "React Native plugin for integrating the Instabug SDK",
4-
"version": "13.3.0",
4+
"version": "13.4.0",
55
"author": "Instabug (https://instabug.com)",
66
"repository": "github:Instabug/Instabug-React-Native",
77
"homepage": "https://www.instabug.com/platforms/react-native",

0 commit comments

Comments
 (0)