From 8f8aaa9a1b3888f015836c967c73ae5dde4a05a6 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Mon, 24 Jul 2023 13:24:24 +0300 Subject: [PATCH 01/11] [MOB-12516] Fix zone mismatch issue (#376) * fix(initialization): fix zone mismatch issue in initialization code * fix(initilization): fix the PR comments --- README.md | 29 ++++++++++++++++------------- example/lib/main.dart | 26 ++++++++++++++------------ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 16804193a..88080febd 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,6 @@ A Flutter plugin for [Instabug](https://instabug.com/). ### Installation - 1. Add Instabug to your `pubspec.yaml` file. ```yaml @@ -65,18 +64,23 @@ Instabug automatically captures every crash of your app and sends relevant detai ```dart void main() { - WidgetsFlutterBinding.ensureInitialized(); - - Instabug.init( - token: 'APP_TOKEN', - invocationEvents: [InvocationEvent.floatingButton], + runZonedGuarded( + () { + WidgetsFlutterBinding.ensureInitialized(); + + Instabug.init( + token: 'APP_TOKEN', + invocationEvents: [InvocationEvent.shake], + ); + + FlutterError.onError = (FlutterErrorDetails details) { + Zone.current.handleUncaughtError(details.exception, details.stack!); + }; + + runApp(MyApp()); + }, + CrashReporting.reportCrash, ); - - FlutterError.onError = (FlutterErrorDetails details) { - Zone.current.handleUncaughtError(details.exception, details.stack!); - }; - - runZonedGuarded(() => runApp(MyApp()), CrashReporting.reportCrash); } ``` @@ -90,7 +94,6 @@ Repro Steps list all of the actions an app user took before reporting a bug or c )); ``` - ## Network Logging You can choose to attach all your network requests to the reports being sent to the dashboard. To enable the feature when using the `dart:io` package `HttpClient`, please refer to the [Instabug Dart IO Http Client](https://github.com/Instabug/instabug-dart-io-http-client) repository. diff --git a/example/lib/main.dart b/example/lib/main.dart index b42390e9d..3f31fec80 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -4,21 +4,23 @@ import 'package:flutter/material.dart'; import 'package:instabug_flutter/instabug_flutter.dart'; void main() { - WidgetsFlutterBinding.ensureInitialized(); + runZonedGuarded( + () { + WidgetsFlutterBinding.ensureInitialized(); - Instabug.init( - token: 'ed6f659591566da19b67857e1b9d40ab', - invocationEvents: [InvocationEvent.floatingButton], - debugLogsLevel: LogLevel.verbose, - ); - - Instabug.setWelcomeMessageMode(WelcomeMessageMode.disabled); + Instabug.init( + token: 'ed6f659591566da19b67857e1b9d40ab', + invocationEvents: [InvocationEvent.floatingButton], + ); - FlutterError.onError = (FlutterErrorDetails details) { - Zone.current.handleUncaughtError(details.exception, details.stack!); - }; + FlutterError.onError = (FlutterErrorDetails details) { + Zone.current.handleUncaughtError(details.exception, details.stack!); + }; - runZonedGuarded(() => runApp(MyApp()), CrashReporting.reportCrash); + runApp(MyApp()); + }, + CrashReporting.reportCrash, + ); } class MyApp extends StatelessWidget { From 3035850c036e65ba4783030beeb8fec34d86bc19 Mon Sep 17 00:00:00 2001 From: Abdelhamid Nasser <38096011+abdelhamid-f-nasser@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:25:58 +0300 Subject: [PATCH 02/11] [MOB-12700] Remove danger ruby package (#379) Remove danger ruby package to resolve dependabot git security vulnerability issue. --- Gemfile | 2 -- Gemfile.lock | 73 ---------------------------------------------------- 2 files changed, 75 deletions(-) diff --git a/Gemfile b/Gemfile index 09a8c1e13..19b2c91d4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1 @@ source "https://rubygems.org" - -gem 'danger', '~> 8.6', '>= 8.6.1' diff --git a/Gemfile.lock b/Gemfile.lock index 982ec2834..3c10ae234 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,84 +1,11 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - claide (1.1.0) - claide-plugins (0.9.2) - cork - nap - open4 (~> 1.3) - colored2 (3.1.2) - cork (0.3.0) - colored2 (~> 3.1) - danger (8.6.1) - claide (~> 1.0) - claide-plugins (>= 0.9.2) - colored2 (~> 3.1) - cork (~> 0.1) - faraday (>= 0.9.0, < 2.0) - faraday-http-cache (~> 2.0) - git (~> 1.7) - kramdown (~> 2.3) - kramdown-parser-gfm (~> 1.0) - no_proxy_fix - octokit (~> 4.7) - terminal-table (>= 1, < 4) - faraday (1.10.2) - faraday-em_http (~> 1.0) - faraday-em_synchrony (~> 1.0) - faraday-excon (~> 1.1) - faraday-httpclient (~> 1.0) - faraday-multipart (~> 1.0) - faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.0) - faraday-patron (~> 1.0) - faraday-rack (~> 1.0) - faraday-retry (~> 1.0) - ruby2_keywords (>= 0.0.4) - faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) - faraday-excon (1.1.0) - faraday-http-cache (2.4.1) - faraday (>= 0.8) - faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) - faraday-net_http_persistent (1.2.0) - faraday-patron (1.0.0) - faraday-rack (1.0.0) - faraday-retry (1.0.3) - git (1.12.0) - addressable (~> 2.8) - rchardet (~> 1.8) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - multipart-post (2.2.3) - nap (1.1.0) - no_proxy_fix (0.1.2) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) - open4 (1.3.4) - public_suffix (5.0.0) - rchardet (1.8.0) - rexml (3.2.5) - ruby2_keywords (0.0.5) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - terminal-table (3.0.2) - unicode-display_width (>= 1.1.1, < 3) - unicode-display_width (2.3.0) PLATFORMS ruby DEPENDENCIES - danger (~> 8.6, >= 8.6.1) BUNDLED WITH 1.17.2 From ef14f74f4d9d90641e92df142c0fa4a27627d360 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Wed, 9 Aug 2023 10:51:25 +0300 Subject: [PATCH 03/11] [MOB-12513] Fix Mockito and Pigeon Dependency Conflict (#377) * Unrestrict a specific Pigeon version * Unrestrict a specific Mockito version * Upgrade Flutter CI version with Mockito and Pigeon * Remove ask question button in example --------- Co-authored-by: Ahmed Mahmoud --- .circleci/config.yml | 2 +- example/lib/main.dart | 9 --------- ios/Classes/Modules/BugReportingApi.m | 4 ++-- ios/Classes/Modules/RepliesApi.m | 2 +- ios/Classes/Modules/SurveysApi.m | 4 ++-- pubspec.yaml | 10 ++++++---- 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b4f66035d..4d6087b56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ commands: setup_flutter: steps: - flutter/install_sdk_and_pub: - flutter_version: 3.3.0 + flutter_version: 3.10.5 - run: name: Generate Pigeons command: sh ./scripts/pigeon.sh diff --git a/example/lib/main.dart b/example/lib/main.dart index 3f31fec80..31705db25 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -162,11 +162,6 @@ class _MyHomePageState extends State { ReportType.feedback, [InvocationOption.emailFieldOptional]); } - void askQuestion() { - BugReporting.show( - ReportType.question, [InvocationOption.emailFieldOptional]); - } - void showNpsSurvey() { Surveys.showSurvey('pcV_mE2ttqHxT1iqvBxL0w'); } @@ -333,10 +328,6 @@ class _MyHomePageState extends State { onPressed: sendFeedback, text: 'Send Feedback', ), - InstabugButton( - onPressed: askQuestion, - text: 'Ask a Question', - ), InstabugButton( onPressed: showNpsSurvey, text: 'Show NPS Survey', diff --git a/ios/Classes/Modules/BugReportingApi.m b/ios/Classes/Modules/BugReportingApi.m index 80c4e79e9..3c914b789 100644 --- a/ios/Classes/Modules/BugReportingApi.m +++ b/ios/Classes/Modules/BugReportingApi.m @@ -112,7 +112,7 @@ - (void)setEnabledAttachmentTypesScreenshot:(NSNumber *)screenshot extraScreensh - (void)bindOnInvokeCallbackWithError:(FlutterError *_Nullable *_Nonnull)error { IBGBugReporting.willInvokeHandler = ^{ - [self->_flutterApi onSdkInvokeWithCompletion:^(NSError *_Nullable _){ + [self->_flutterApi onSdkInvokeWithCompletion:^(FlutterError *_Nullable _){ }]; }; } @@ -141,7 +141,7 @@ - (void)bindOnDismissCallbackWithError:(FlutterError *_Nullable *_Nonnull)error [self->_flutterApi onSdkDismissDismissType:dismissTypeString reportType:reportTypeString - completion:^(NSError *_Nullable _){ + completion:^(FlutterError *_Nullable _){ }]; }; } diff --git a/ios/Classes/Modules/RepliesApi.m b/ios/Classes/Modules/RepliesApi.m index 799fe6f34..636040181 100644 --- a/ios/Classes/Modules/RepliesApi.m +++ b/ios/Classes/Modules/RepliesApi.m @@ -43,7 +43,7 @@ - (void)hasChatsWithCompletion:(nonnull void (^)(NSNumber * _Nullable, FlutterEr - (void)bindOnNewReplyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error { IBGReplies.didReceiveReplyHandler = ^{ - [self->_flutterApi onNewReplyWithCompletion:^(NSError *_Nullable _){ + [self->_flutterApi onNewReplyWithCompletion:^(FlutterError *_Nullable _){ }]; }; } diff --git a/ios/Classes/Modules/SurveysApi.m b/ios/Classes/Modules/SurveysApi.m index 5cb0b2076..fb6ee9fa4 100644 --- a/ios/Classes/Modules/SurveysApi.m +++ b/ios/Classes/Modules/SurveysApi.m @@ -65,14 +65,14 @@ - (void)getAvailableSurveysWithCompletion:(void (^)(NSArray *_Nullab - (void)bindOnShowSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error { IBGSurveys.willShowSurveyHandler = ^{ - [self->_flutterApi onShowSurveyWithCompletion:^(NSError *_Nullable _){ + [self->_flutterApi onShowSurveyWithCompletion:^(FlutterError *_Nullable _){ }]; }; } - (void)bindOnDismissSurveyCallbackWithError:(FlutterError *_Nullable *_Nonnull)error { IBGSurveys.didDismissSurveyHandler = ^{ - [self->_flutterApi onDismissSurveyWithCompletion:^(NSError *_Nullable _){ + [self->_flutterApi onDismissSurveyWithCompletion:^(FlutterError *_Nullable _){ }]; }; } diff --git a/pubspec.yaml b/pubspec.yaml index 5e5dfef36..6bc8d47d9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: instabug_flutter version: 11.13.0 description: >- - Instabug empowers mobile teams to monitor, prioritize, and debug - performance and stability issues throughout the app development lifecycle. + Instabug empowers mobile teams to monitor, prioritize, and debug + performance and stability issues throughout the app development lifecycle. homepage: https://www.instabug.com/platforms/flutter repository: https://github.com/Instabug/Instabug-Flutter documentation: https://docs.instabug.com/docs/flutter-overview @@ -18,9 +18,11 @@ dev_dependencies: flutter_test: sdk: flutter lint: ^1.0.0 - mockito: 5.2.0 + # mockito v5.2.0 is needed for running Flutter 2 tests on CI + mockito: '>=5.2.0 <=5.4.2' pana: ^0.21.0 - pigeon: ^3.0.0 + # pigeon v3.0.0 is needed for running Flutter 2 tests on CI + pigeon: '>=3.0.0 <=10.1.5' flutter: plugin: From 08f88b02654ddef613c02addb2f465413a8a0da2 Mon Sep 17 00:00:00 2001 From: Ahmed Mahmoud <68241710+a7medev@users.noreply.github.com> Date: Sun, 10 Sep 2023 14:54:59 +0300 Subject: [PATCH 04/11] test: update captain config (#386) Jira ID: MOB-13002 --- .circleci/config.yml | 6 +++--- e2e/Utils/CaptainTest.cs | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d6087b56..e209a3b62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ commands: steps: - run: name: Install Appium - command: npm install -g appium@next + command: npm install -g appium - when: condition: equal: @@ -42,7 +42,7 @@ commands: steps: - run: name: Install XCUITest Driver - command: appium driver install xcuitest + command: appium driver install xcuitest@4.35.0 - when: condition: equal: @@ -51,7 +51,7 @@ commands: steps: - run: name: Install UIAutomator2 Driver - command: appium driver install uiautomator2 + command: appium driver install uiautomator2@2.29.5 - run: name: Launch Appium # Enable --relaxed-security for `mobile: shell` command that Captain uses internally. diff --git a/e2e/Utils/CaptainTest.cs b/e2e/Utils/CaptainTest.cs index 5c0abfb13..d73f37e3c 100644 --- a/e2e/Utils/CaptainTest.cs +++ b/e2e/Utils/CaptainTest.cs @@ -8,9 +8,12 @@ public class CaptainTest : IDisposable private static readonly CaptainConfig _config = new() { AndroidApp = Path.GetFullPath("../../../../example/build/app/outputs/flutter-apk/app-debug.apk"), + AndroidAppId = "com.instabug.flutter.example", AndroidVersion = "11", IosApp = Path.GetFullPath("../../../../example/build/ios/iphonesimulator/Runner.app"), - IosVersion = "15.5" + IosAppId = "com.instabug.InstabugSample", + IosVersion = "15.5", + IosDevice = "iPhone 13 Pro Max" }; protected static readonly Captain captain = new(_config); From c6cfe37ecb3c21bb31ee74516c76ff44fc1a9281 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Mon, 11 Sep 2023 02:53:27 +0300 Subject: [PATCH 05/11] feat(sdkVersion): add passing SDK version to the native support --- .../main/java/com/instabug/flutter/modules/InstabugApi.java | 4 ++-- .../src/test/java/com/instabug/flutter/InstabugApiTest.java | 4 ++-- .../src/test/java/com/instabug/flutter/util/GlobalMocks.java | 4 ++-- .../test/java/com/instabug/flutter/util/MockReflected.java | 2 +- example/ios/InstabugTests/InstabugApiTests.m | 2 +- example/ios/InstabugTests/Util/Instabug+Test.h | 2 +- ios/Classes/Modules/InstabugApi.m | 5 ++++- 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java b/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java index a9bc50346..7e4c04c1e 100644 --- a/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java +++ b/android/src/main/java/com/instabug/flutter/modules/InstabugApi.java @@ -61,9 +61,9 @@ public InstabugApi(Context context, Callable screenshotProvider) { @VisibleForTesting public void setCurrentPlatform() { try { - Method method = Reflection.getMethod(Class.forName("com.instabug.library.Instabug"), "setCurrentPlatform", int.class); + Method method = Reflection.getMethod(Class.forName("com.instabug.library.Instabug"), "setCurrentPlatform", int.class, String.class); if (method != null) { - method.invoke(null, Platform.FLUTTER); + method.invoke(null, Platform.FLUTTER, "11.13.0"); } else { Log.e(TAG, "setCurrentPlatform was not found by reflection"); } diff --git a/android/src/test/java/com/instabug/flutter/InstabugApiTest.java b/android/src/test/java/com/instabug/flutter/InstabugApiTest.java index 35d871406..44a1d9e85 100644 --- a/android/src/test/java/com/instabug/flutter/InstabugApiTest.java +++ b/android/src/test/java/com/instabug/flutter/InstabugApiTest.java @@ -97,7 +97,7 @@ public void testInit() { public void testSetCurrentPlatform() { api.setCurrentPlatform(); - reflected.verify(() -> MockReflected.setCurrentPlatform(Platform.FLUTTER)); + reflected.verify(() -> MockReflected.setCurrentPlatform(Platform.FLUTTER, "11.13.0")); } @Test @@ -132,7 +132,7 @@ public void testSdkInit() { mInstabug.verify(() -> Instabug.setScreenshotProvider(screenshotProvider)); // Sets current platform - reflected.verify(() -> MockReflected.setCurrentPlatform(Platform.FLUTTER)); + reflected.verify(() -> MockReflected.setCurrentPlatform(Platform.FLUTTER, "11.13.0")); } @Test diff --git a/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java b/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java index 8a37d3ba1..1aa6f811d 100644 --- a/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java +++ b/android/src/test/java/com/instabug/flutter/util/GlobalMocks.java @@ -56,10 +56,10 @@ public static void setUp() throws NoSuchMethodException { Bitmap.class, Bitmap.class)) .thenReturn(mSetCustomBrandingImage); - Method mSetCurrentPlatform = MockReflected.class.getDeclaredMethod("setCurrentPlatform", int.class); + Method mSetCurrentPlatform = MockReflected.class.getDeclaredMethod("setCurrentPlatform", int.class, String.class); mSetCurrentPlatform.setAccessible(true); reflection - .when(() -> Reflection.getMethod(Class.forName("com.instabug.library.Instabug"), "setCurrentPlatform", int.class)) + .when(() -> Reflection.getMethod(Class.forName("com.instabug.library.Instabug"), "setCurrentPlatform", int.class, String.class)) .thenReturn(mSetCurrentPlatform); Method mAPMNetworkLog = MockReflected.class.getDeclaredMethod("apmNetworkLog", long.class, long.class, String.class, String.class, long.class, String.class, String.class, String.class, String.class, String.class, long.class, int.class, String.class, String.class, String.class, String.class); diff --git a/android/src/test/java/com/instabug/flutter/util/MockReflected.java b/android/src/test/java/com/instabug/flutter/util/MockReflected.java index cb81c4f1c..550b03b10 100644 --- a/android/src/test/java/com/instabug/flutter/util/MockReflected.java +++ b/android/src/test/java/com/instabug/flutter/util/MockReflected.java @@ -25,7 +25,7 @@ public static void setCustomBrandingImage(Bitmap light, Bitmap dark) {} /** * Instabug.setCurrentPlatform */ - public static void setCurrentPlatform(int platform) {} + public static void setCurrentPlatform(int platform, String cpSDKVersion) {} /** * APMNetworkLogger.log diff --git a/example/ios/InstabugTests/InstabugApiTests.m b/example/ios/InstabugTests/InstabugApiTests.m index 22e958b79..66d08e799 100644 --- a/example/ios/InstabugTests/InstabugApiTests.m +++ b/example/ios/InstabugTests/InstabugApiTests.m @@ -42,7 +42,7 @@ - (void)testInit { [self.api initToken:token invocationEvents:invocationEvents debugLogsLevel:logLevel error:&error]; - OCMVerify([self.mInstabug setCurrentPlatform:IBGPlatformFlutter]); + OCMVerify([self.mInstabug setCurrentPlatform:IBGPlatformFlutter cpSDKVersion:@"11.13.0"]); OCMVerify([self.mInstabug setSdkDebugLogsLevel:IBGSDKDebugLogsLevelError]); OCMVerify([self.mInstabug startWithToken:token invocationEvents:(IBGInvocationEventFloatingButton | IBGInvocationEventScreenshot)]); } diff --git a/example/ios/InstabugTests/Util/Instabug+Test.h b/example/ios/InstabugTests/Util/Instabug+Test.h index d86927c5b..737bb207b 100644 --- a/example/ios/InstabugTests/Util/Instabug+Test.h +++ b/example/ios/InstabugTests/Util/Instabug+Test.h @@ -3,6 +3,6 @@ #import @interface Instabug (Test) -+ (void)setCurrentPlatform:(IBGPlatform)platform; ++ (void)setCurrentPlatform:(IBGPlatform)platform cpSDKVersion:(NSString *)cpSDKVersion; + (void)reportCrashWithStackTrace:(NSDictionary*)stackTrace handled:(NSNumber*)handled; @end diff --git a/ios/Classes/Modules/InstabugApi.m b/ios/Classes/Modules/InstabugApi.m index 8762682d3..5422122e6 100644 --- a/ios/Classes/Modules/InstabugApi.m +++ b/ios/Classes/Modules/InstabugApi.m @@ -19,13 +19,16 @@ - (void)setEnabledIsEnabled:(NSNumber *)isEnabled error:(FlutterError *_Nullable } - (void)initToken:(NSString *)token invocationEvents:(NSArray *)invocationEvents debugLogsLevel:(NSString *)debugLogsLevel error:(FlutterError *_Nullable *_Nonnull)error { - SEL setPrivateApiSEL = NSSelectorFromString(@"setCurrentPlatform:"); + SEL setPrivateApiSEL = NSSelectorFromString(@"setCurrentPlatform:cpSDKVersion:"); if ([[Instabug class] respondsToSelector:setPrivateApiSEL]) { NSInteger *platformID = IBGPlatformFlutter; + NSString *cpSDKVersion = @"11.13.0"; NSInvocation *inv = [NSInvocation invocationWithMethodSignature:[[Instabug class] methodSignatureForSelector:setPrivateApiSEL]]; [inv setSelector:setPrivateApiSEL]; [inv setTarget:[Instabug class]]; [inv setArgument:&(platformID) atIndex:2]; + [inv setArgument:&(cpSDKVersion) atIndex:3]; + [inv invoke]; } From 844cfff6a278326082a062fe28679ced47ad5820 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Mon, 11 Sep 2023 03:43:01 +0300 Subject: [PATCH 06/11] fix(sdkVersion): update pubspec.lock file --- example/pubspec.lock | 66 ++++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/example/pubspec.lock b/example/pubspec.lock index 10a0273a0..21d8a0dc0 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,14 +1,22 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + archive: + dependency: transitive + description: + name: archive + sha256: "80e5141fafcb3361653ce308776cfd7d45e6e9fbb429e14eec571382c0c5fecb" + url: "https://pub.dev" + source: hosted + version: "3.3.2" async: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.10.0" boolean_selector: dependency: transitive description: @@ -21,10 +29,10 @@ packages: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.2.1" clock: dependency: transitive description: @@ -37,10 +45,18 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" + source: hosted + version: "1.17.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "3.0.2" espresso: dependency: "direct dev" description: @@ -96,18 +112,18 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.6.5" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.13" material_color_utilities: dependency: transitive description: @@ -120,18 +136,18 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.8.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.8.2" platform: dependency: transitive description: @@ -205,10 +221,18 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.3.1" vector_math: dependency: transitive description: @@ -221,18 +245,18 @@ packages: dependency: transitive description: name: vm_service - sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe + sha256: e7fb6c2282f7631712b69c19d1bff82f3767eea33a2321c14fa59ad67ea391c7 url: "https://pub.dev" source: hosted - version: "11.3.0" + version: "9.4.0" webdriver: dependency: transitive description: name: webdriver - sha256: "3c923e918918feeb90c4c9fdf1fe39220fa4c0e8e2c0fffaded174498ef86c49" + sha256: ef67178f0cc7e32c1494645b11639dd1335f1d18814aa8435113a92e9ef9d841 url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.1" sdks: - dart: ">=3.0.0-0 <4.0.0" + dart: ">=2.18.0 <4.0.0" flutter: ">=2.10.0" From 0f04a5910c2a1de0c72333025264cfe542fc6c17 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Mon, 11 Sep 2023 17:48:32 +0300 Subject: [PATCH 07/11] fix(tests): fix Android repro steps failing test --- e2e/BugReportingTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/BugReportingTests.cs b/e2e/BugReportingTests.cs index d951ae902..a4bdca0a8 100644 --- a/e2e/BugReportingTests.cs +++ b/e2e/BugReportingTests.cs @@ -127,7 +127,7 @@ public void MultipleScreenshotsInReproSteps() android: "ib_bug_repro_step_screenshot", ios: "IBGReproStepsTableCellViewAccessibilityIdentifier" ); - Assert.Equal(2, reproSteps.Count); + Assert.Equal(3, reproSteps.Count); } [Fact] From 6dcf2fa4eccd22146fdecb5e6ae7661be3fa8a18 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Wed, 13 Sep 2023 03:05:51 +0300 Subject: [PATCH 08/11] fix(sdkVersions): fix ci failing tests --- e2e/BugReportingTests.cs | 2 +- example/ios/InstabugTests/InstabugApiTests.m | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/BugReportingTests.cs b/e2e/BugReportingTests.cs index a4bdca0a8..d951ae902 100644 --- a/e2e/BugReportingTests.cs +++ b/e2e/BugReportingTests.cs @@ -127,7 +127,7 @@ public void MultipleScreenshotsInReproSteps() android: "ib_bug_repro_step_screenshot", ios: "IBGReproStepsTableCellViewAccessibilityIdentifier" ); - Assert.Equal(3, reproSteps.Count); + Assert.Equal(2, reproSteps.Count); } [Fact] diff --git a/example/ios/InstabugTests/InstabugApiTests.m b/example/ios/InstabugTests/InstabugApiTests.m index 66d08e799..bc1b9104e 100644 --- a/example/ios/InstabugTests/InstabugApiTests.m +++ b/example/ios/InstabugTests/InstabugApiTests.m @@ -39,10 +39,12 @@ - (void)testInit { NSArray *invocationEvents = @[@"InvocationEvent.floatingButton", @"InvocationEvent.screenshot"]; NSString *logLevel = @"LogLevel.error"; FlutterError *error; + + NSString *cpSDKVersion = @"11.13.0"; [self.api initToken:token invocationEvents:invocationEvents debugLogsLevel:logLevel error:&error]; - OCMVerify([self.mInstabug setCurrentPlatform:IBGPlatformFlutter cpSDKVersion:@"11.13.0"]); + OCMVerify([self.mInstabug setCurrentPlatform:IBGPlatformFlutter cpSDKVersion:cpSDKVersion]); OCMVerify([self.mInstabug setSdkDebugLogsLevel:IBGSDKDebugLogsLevelError]); OCMVerify([self.mInstabug startWithToken:token invocationEvents:(IBGInvocationEventFloatingButton | IBGInvocationEventScreenshot)]); } From 6fb9cfc0339f4fd060a4bd124dd2f6400fe0bcbc Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Sun, 17 Sep 2023 11:32:44 +0300 Subject: [PATCH 09/11] fix(tests): fix failing tests due to the native changes (iOS) --- example/ios/Podfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/example/ios/Podfile b/example/ios/Podfile index 3a216ba41..b43a3dff9 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -10,6 +10,8 @@ project 'Runner', { 'Release' => :release, } +pod 'Instabug', :podspec => 'https://ios-releases.instabug.com/custom/feature-cp-versions/12.0.0/Instabug.podspec' + def flutter_root generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) unless File.exist?(generated_xcode_build_settings_path) From 852a5f19d71804f3244637c85190c5c96c1a0d7e Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Sun, 17 Sep 2023 11:32:58 +0300 Subject: [PATCH 10/11] fix(tests): fix failing tests due to the native changes (iOS) --- ios/instabug_flutter.podspec | 1 - 1 file changed, 1 deletion(-) diff --git a/ios/instabug_flutter.podspec b/ios/instabug_flutter.podspec index a8265b75a..9c286cb78 100644 --- a/ios/instabug_flutter.podspec +++ b/ios/instabug_flutter.podspec @@ -17,6 +17,5 @@ Pod::Spec.new do |s| s.pod_target_xcconfig = { 'OTHER_LDFLAGS' => '-framework "Flutter" -framework "Instabug"'} s.dependency 'Flutter' - s.dependency 'Instabug', '11.13.3' end From 4ac926095858b4140e8ce5b6593052e2132c4642 Mon Sep 17 00:00:00 2001 From: Ahmed Sami Date: Sun, 17 Sep 2023 11:41:22 +0300 Subject: [PATCH 11/11] fix(tests): fix iOS Pofile changes --- example/ios/Podfile.lock | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index dabcb7368..ace8f4657 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1,33 +1,34 @@ PODS: - Flutter (1.0.0) - - Instabug (11.13.3) + - Instabug (12.0.0) - instabug_flutter (11.13.0): - Flutter - - Instabug (= 11.13.3) - OCMock (3.6) DEPENDENCIES: - Flutter (from `Flutter`) + - Instabug (from `https://ios-releases.instabug.com/custom/feature-cp-versions/12.0.0/Instabug.podspec`) - instabug_flutter (from `.symlinks/plugins/instabug_flutter/ios`) - OCMock (= 3.6) SPEC REPOS: trunk: - - Instabug - OCMock EXTERNAL SOURCES: Flutter: :path: Flutter + Instabug: + :podspec: https://ios-releases.instabug.com/custom/feature-cp-versions/12.0.0/Instabug.podspec instabug_flutter: :path: ".symlinks/plugins/instabug_flutter/ios" SPEC CHECKSUMS: Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - Instabug: f7c3880823873cff9ee70307d373e8266c9ea0f8 - instabug_flutter: e935f80f03127586ebb4fc61c6b891d87a978ee3 + Instabug: 2890cfbab52331d4aeab143a579347a545ac822f + instabug_flutter: 51643ee0f0cf2a1d884798b6e6b3f40490790d19 OCMock: 5ea90566be239f179ba766fd9fbae5885040b992 -PODFILE CHECKSUM: 637e800c0a0982493b68adb612d2dd60c15c8e5c +PODFILE CHECKSUM: 1d5a0d539bfb3f5a39d16888e7e07034697aa2f4 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.1