Skip to content

feat(monorepo): create ndk crashes package #606

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

Draft
wants to merge 83 commits into
base: refactor/monorepo
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
773d1ae
feat: gestures & UI elements detection
kholood-ea Dec 2, 2024
76a0b47
testing
ahmedAlaaInstabug Dec 19, 2024
5bc5444
testing
ahmedAlaaInstabug Dec 22, 2024
911497b
testing
ahmedAlaaInstabug Dec 22, 2024
0c62f92
chore: update ios snapshot
ahmedAlaaInstabug Dec 24, 2024
b2a9659
Merge branch 'refs/heads/refactor/monorepo-private-view-package' into…
ahmedAlaaInstabug Dec 24, 2024
dac3899
format
ahmedAlaaInstabug Dec 24, 2024
a56c39f
format
ahmedAlaaInstabug Dec 26, 2024
8322d24
format
ahmedAlaaInstabug Dec 26, 2024
69e233f
chore(android): integrate with android snapshot
kholood-ea Jan 19, 2025
fce0c5e
chore(ios): integrate with ios custom build
kholood-ea Jan 19, 2025
34c5907
fix(android): passed required params to log user steps
kholood-ea Jan 19, 2025
3f7269c
fix(ios): add double tap event
kholood-ea Jan 19, 2025
59eca4b
feat(ios): add native user steps switch
kholood-ea Jan 19, 2025
41b8031
fix(ios): pass flutter view name
kholood-ea Jan 19, 2025
e22199c
feat(example): add private view test
kholood-ea Jan 19, 2025
a3a3e0e
fix: user steps parameters
kholood-ea Jan 19, 2025
be6a07c
chore(android): integrate private views snapshot
kholood-ea Feb 4, 2025
c40b304
chore: cleanup unused params
kholood-ea Feb 4, 2025
f7f6a47
Merge remote-tracking branch 'origin/refactor/monorepo' into feat/use…
kholood-ea Feb 4, 2025
6cf5876
fix(example): clean up imports
kholood-ea Feb 4, 2025
b264f73
fix: update test cases
kholood-ea Feb 4, 2025
cbebbf8
chore: update deps
kholood-ea Feb 4, 2025
f48c1e8
fix(ios): update log user steps test case
kholood-ea Feb 4, 2025
2394241
fix: linters issues
kholood-ea Feb 4, 2025
df65353
fix(android): update test case
kholood-ea Feb 4, 2025
30306cb
chore(android): activate commented code
kholood-ea Feb 5, 2025
877573d
chore(android): activate android test case
kholood-ea Feb 5, 2025
88d5bb7
fix(ios): add double tap to test case
kholood-ea Feb 5, 2025
5c23138
chore(ios): restore cocoapods version
kholood-ea Feb 5, 2025
8dabcdb
chore(example): revert old app token
kholood-ea Feb 5, 2025
4e89b3f
test
ahmedAlaaInstabug Feb 5, 2025
d74dc65
Merge remote-tracking branch 'origin/feat/user-step' into feat/user-step
ahmedAlaaInstabug Feb 5, 2025
d425b52
test
ahmedAlaaInstabug Feb 6, 2025
d4b49d4
test
ahmedAlaaInstabug Feb 6, 2025
ca50dc2
test
ahmedAlaaInstabug Feb 6, 2025
da04866
test
ahmedAlaaInstabug Feb 6, 2025
028f846
test
ahmedAlaaInstabug Feb 6, 2025
a9f7500
chore(android): add descriptive comment
kholood-ea Feb 10, 2025
d9886d1
chore(android): update snapshot
kholood-ea Feb 11, 2025
b5b2744
fix: PR comments
ahmedAlaaInstabug Feb 17, 2025
02e968a
fix: PR comments
ahmedAlaaInstabug Feb 17, 2025
8b2f003
fix: ios CI
ahmedAlaaInstabug Feb 17, 2025
586013b
fix: ios CI
ahmedAlaaInstabug Feb 17, 2025
0aeeb93
fix: ios CI
ahmedAlaaInstabug Feb 17, 2025
502d030
fix: ios CI
ahmedAlaaInstabug Feb 18, 2025
2f26610
fix: ios CI
ahmedAlaaInstabug Feb 18, 2025
43ee727
fix: android CI
ahmedAlaaInstabug Feb 18, 2025
b07202f
fix: android CI
ahmedAlaaInstabug Feb 18, 2025
80c7bcd
Update config.yml
ahmedAlaaInstabug Feb 18, 2025
5c4652a
fix: android CI
ahmedAlaaInstabug Feb 19, 2025
3b7071a
Merge remote-tracking branch 'origin/ci/fix-user-step' into ci/fix-us…
ahmedAlaaInstabug Feb 19, 2025
11405ea
fix: android CI
ahmedAlaaInstabug Feb 19, 2025
9d2f01f
Merge pull request #549 from Instabug/ci/fix-user-step
ahmedAlaaInstabug Feb 19, 2025
8f20790
fix: fix private view app
ahmedAlaaInstabug Feb 23, 2025
5ac4306
fix: extra space in message
ahmedAlaaInstabug Feb 23, 2025
cfc6f6b
chore(android): upgrade to latest snapshot
ahmedAlaaInstabug Feb 24, 2025
47caf61
fix: trim message
ahmedAlaaInstabug Feb 24, 2025
dc26141
feat: enhance private view mechanism
ahmedAlaaInstabug Feb 26, 2025
7b7f9e3
fix: e2e test
ahmedAlaaInstabug Feb 27, 2025
94ddeb6
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
6772146
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
b648f8f
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
af5276d
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
54d4655
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
e5cf53f
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
3d7d43c
fix test 2.10.0
ahmedAlaaInstabug Mar 1, 2025
b683920
feat: enhance private view
ahmedAlaaInstabug Mar 2, 2025
7898cc6
fix test
ahmedAlaaInstabug Mar 2, 2025
e234e81
fix test
ahmedAlaaInstabug Mar 2, 2025
1300399
fix test
ahmedAlaaInstabug Mar 2, 2025
0110653
fix test
ahmedAlaaInstabug Mar 2, 2025
2f1b94f
fix test
ahmedAlaaInstabug Mar 5, 2025
4bef406
fix: PR comments
ahmedAlaaInstabug Mar 5, 2025
5055d6b
chore: update example app
ahmedAlaaInstabug Jul 13, 2025
88736cd
fix: masking sliver view
ahmedAlaaInstabug Jul 14, 2025
b13f9c4
fix: masking sliver view
ahmedAlaaInstabug Jul 14, 2025
a4210b4
fix: masking sliver view
ahmedAlaaInstabug Jul 14, 2025
be05c4f
fix: masking sliver view
ahmedAlaaInstabug Jul 14, 2025
b418a54
fix: flutter format
ahmedAlaaInstabug Jul 14, 2025
3e4e087
initial commit
MoKamall Jul 17, 2025
26274d2
chore: add native.gradle for Instabug NDK integration
MoKamall Jul 17, 2025
1e075d6
refactor: simplify InstabugFlutterNdkPlugin to pure dependency, remov…
MoKamall Jul 20, 2025
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ jobs:
- setup_flutter
- android/start-emulator-and-run-tests:
run-tests-working-directory: e2e
additional-avd-args: --device 3
additional-avd-args: --device 25
system-image: system-images;android-33;default;x86_64
post-emulator-launch-assemble-command: cd packages/instabug_flutter/example && flutter build apk --debug
test-command: dotnet test
Expand Down Expand Up @@ -278,7 +278,7 @@ jobs:
command: flutter build ios --simulator
- run:
name: Run E2E Tests
no_output_timeout: 30m
no_output_timeout: 20m
working_directory: e2e
command: dotnet test

Expand Down
82 changes: 59 additions & 23 deletions e2e/BugReportingTests.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using System.Drawing;
using E2E.Utils;
using Xunit;
using Instabug.Captain;

using NoSuchElementException = OpenQA.Selenium.NoSuchElementException;
using System.Drawing;

namespace E2E;

Expand Down Expand Up @@ -46,6 +46,9 @@ public void ReportABug()
[Fact]
public void FloatingButtonInvocationEvent()
{

Console.WriteLine("FloatingButtonInvocationEvent");

captain.FindById(
android: "instabug_floating_button",
ios: "IBGFloatingButtonAccessibilityIdentifier"
Expand All @@ -57,9 +60,13 @@ public void FloatingButtonInvocationEvent()
[Fact]
public void ShakeInvocationEvent()
{

Console.WriteLine("ShakeInvocationEvent");

if (!Platform.IsIOS) return;

captain.FindByText("Shake").Tap();

captain.FindByTextScroll("Shake").Tap();

captain.Shake();

Expand All @@ -69,8 +76,12 @@ public void ShakeInvocationEvent()
[Fact]
public void TwoFingersSwipeLeftInvocationEvent()
{
ScrollUp();
captain.FindByText("Two Fingers Swipe Left").Tap();

Console.WriteLine("TwoFingersSwipeLeftInvocationEvent");



captain.FindByTextScroll("Two Fingers Swipe Left").Tap();

Thread.Sleep(500);

Expand All @@ -89,7 +100,11 @@ public void TwoFingersSwipeLeftInvocationEvent()
[Fact]
public void NoneInvocationEvent()
{
captain.FindByText("None").Tap();

Console.WriteLine("NoneInvocationEvent");


captain.FindByTextScroll("None").Tap();

captain.WaitForAssertion(() =>
Assert.Throws<NoSuchElementException>(() =>
Expand All @@ -105,22 +120,38 @@ public void NoneInvocationEvent()
[Fact]
public void ManualInvocation()
{
captain.FindByText("Invoke").Tap();


Console.WriteLine("ManualInvocation");



captain.FindByTextScroll("Invoke").Tap();

AssertOptionsPromptIsDisplayed();
}

[Fact]
public void MultipleScreenshotsInReproSteps()
{
ScrollDownLittle();

captain.FindByText("Enter screen name").Tap();

Console.WriteLine("MultipleScreenshotsInReproSteps");




captain.FindByTextScroll("Enter screen name").Tap();
captain.Type("My Screen");
captain.HideKeyboard();

captain.FindByText("Report Screen Change").Tap();
captain.FindByText("Send Bug Report").Tap();
captain.HideKeyboard();
Thread.Sleep(500);

captain.FindByTextScroll("Report Screen Change")?.Tap();
Thread.Sleep(500);
captain.FindByTextScroll("Send Bug Report")?.Tap();

captain.FindById(
android: "instabug_text_view_repro_steps_disclaimer",
ios: "IBGBugVCReproStepsDisclaimerAccessibilityIdentifier"
Expand All @@ -136,27 +167,30 @@ public void MultipleScreenshotsInReproSteps()
[Fact(Skip = "The test is flaky on iOS so we're skipping it to unblock the v13.2.0 release")]
public void ChangeReportTypes()
{
ScrollUp();
captain.FindByText("Bug", exact: true).Tap();

Console.WriteLine("ChangeReportTypes");


captain.FindByTextScroll("Bug", exact: true).Tap();

if (Platform.IsAndroid)
{
captain.FindByText("Invoke").Tap();
captain.FindByTextScroll("Invoke").Tap();

// Shows bug reporting screen
Assert.True(captain.FindById("ib_bug_scroll_view").Displayed);

// Close bug reporting screen
captain.GoBack();
captain.FindByText("DISCARD").Tap();
captain.FindByTextScroll("DISCARD").Tap();

Thread.Sleep(500);

}

captain.FindByText("Feedback").Tap();
captain.FindByTextScroll("Feedback").Tap();

captain.FindByText("Invoke").Tap();
captain.FindByTextScroll("Invoke").Tap();

// Shows both bug reporting and feature requests in prompt options
AssertOptionsPromptIsDisplayed();
Expand All @@ -169,10 +203,12 @@ public void ChangeReportTypes()
[Fact]
public void ChangeFloatingButtonEdge()
{
ScrollDown();
captain.FindByText("Move Floating Button to Left").Tap();

Thread.Sleep(500);
Console.WriteLine("ChangeFloatingButtonEdge");


captain.FindByTextScroll("Move Floating Button to Left",false,false)?.Tap();


captain.WaitForAssertion(() =>
{
Expand All @@ -189,16 +225,16 @@ public void ChangeFloatingButtonEdge()
[Fact]
public void OnDismissCallbackIsCalled()
{
ScrollDownLittle();

captain.FindByText("Set On Dismiss Callback").Tap();
captain.FindByText("Invoke").Tap();
captain.FindByTextScroll("Set On Dismiss Callback",false,false).Tap();
captain.FindByTextScroll("Invoke",false,false).Tap();

AssertOptionsPromptIsDisplayed();

captain.FindByText("Cancel").Tap();
captain.FindByTextScroll("Cancel").Tap();

var popUpText = captain.FindByText("onDismiss callback called with DismissType.cancel and ReportType.other");
Assert.True(popUpText.Displayed);

}
}
6 changes: 3 additions & 3 deletions e2e/FeatureRequestsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ public class FeatureRequestsTests : CaptainTest
[Fact]
public void ShowFeatureRequetsScreen()
{
ScrollDown();
ScrollDown();

captain.FindByText("Show Feature Requests").Tap();
Console.WriteLine("ShowFeatureRequetsScreen");

captain.FindByTextScroll("Show Feature Requests",false,false).Tap();

var screenTitle = captain.FindById(
android: "ib_fr_toolbar_main",
Expand Down
6 changes: 4 additions & 2 deletions e2e/InstabugTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ public class InstabugTests : CaptainTest
[Fact]
public void ChangePrimaryColor()
{
Console.WriteLine("ChangePrimaryColor");

var color = "#FF0000";
var expected = Color.FromArgb(255, 0, 0);

captain.FindByText("Enter primary color").Tap();
captain.FindByTextScroll("Enter primary color").Tap();
captain.Type(color);
captain.HideKeyboard();

captain.FindByText("Change Primary Color").Tap();
captain.FindByTextScroll("Change Primary Color").Tap();

captain.WaitForAssertion(() =>
{
Expand Down
5 changes: 3 additions & 2 deletions e2e/SurveysTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ public class SurveysTests : CaptainTest
[Fact]
public void ShowManualSurvey()
{
ScrollDownLittle();
captain.FindByText("Show Manual Survey").Tap();
Console.WriteLine("ShowManualSurvey");

captain.FindByTextScroll("Show Manual Survey",false,false).Tap();

captain.WaitForAssertion(() =>
{
Expand Down
26 changes: 3 additions & 23 deletions e2e/Utils/CaptainTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Drawing;
using Instabug.Captain;
using OpenQA.Selenium;
using OpenQA.Selenium.Appium.MultiTouch;

namespace E2E.Utils;

Expand All @@ -10,6 +12,7 @@ public class CaptainTest : IDisposable
AndroidApp = Path.GetFullPath("../../../../packages/instabug_flutter/example/build/app/outputs/flutter-apk/app-debug.apk"),
AndroidAppId = "com.instabug.flutter.example",
AndroidVersion = "13",

IosApp = Path.GetFullPath("../../../../packages/instabug_flutter/example/build/ios/iphonesimulator/Runner.app"),
IosAppId = "com.instabug.InstabugSample",
IosVersion = "17.2",
Expand All @@ -28,28 +31,5 @@ public void Dispose()
captain.RestartApp();
}

protected void ScrollDown()
{
captain.Swipe(
start: new Point(captain.Window.Size.Width / 2, captain.Window.Size.Height - 200),
end: new Point(captain.Window.Size.Width / 2, 250)
);
}


protected void ScrollDownLittle()
{
captain.Swipe(
start: new Point(captain.Window.Size.Width / 2, captain.Window.Size.Height - 200),
end: new Point(captain.Window.Size.Width / 2, captain.Window.Size.Height - 220)
);
}

protected void ScrollUp()
{
captain.Swipe(
start: new Point(captain.Window.Size.Width / 2, 250),
end: new Point(captain.Window.Size.Width / 2, captain.Window.Size.Height - 200)
);
}
}
30 changes: 15 additions & 15 deletions packages/instabug_dio_interceptor/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.0"
cupertino_icons:
dependency: "direct main"
description:
Expand Down Expand Up @@ -117,18 +117,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
Expand Down Expand Up @@ -181,7 +181,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
Expand All @@ -194,10 +194,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
Expand All @@ -210,10 +210,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.3.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -226,10 +226,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.7.3"
typed_data:
dependency: transitive
description:
Expand All @@ -250,10 +250,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "14.3.0"
web:
dependency: transitive
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class InstabugDioInterceptor extends Interceptor {
if (responseHeaders.containsKey('content-length')) {
// ignore: avoid_dynamic_calls
responseBodySize =
// ignore: avoid_dynamic_calls
int.parse((responseHeaders['content-length'][0]) ?? '0');
} else if (response.data != null) {
responseBodySize = response.data.toString().length;
Expand Down
Loading