Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,7 @@ workflows:
name: test_flutter-2.10.5
version: 2.10.5
app-dir: "~/project/packages/instabug_flutter/"
- e2e_android_captain
- test_ios
- e2e_ios_captain
- format_flutter
- lint_flutter:
requires:
Expand Down
6 changes: 6 additions & 0 deletions packages/instabug_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [16.0.4](https://github.com/Instabug/Instabug-Flutter/compare/v16.0.2...dev) (Nov 16, 2025)

### Fixed

- Guard LuciqNavigatorObserver pending-step removal to eliminate the race that could crash apps or produce incorrect screenshots during rapid route transitions. ([#637](https://github.com/Instabug/Instabug-Flutter/pull/637))

## [16.0.3](https://github.com/Instabug/Instabug-Flutter/compare/v16.0.2...dev) (Sep 9, 2025)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/instabug_flutter/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'com.instabug.flutter'
version '16.0.2'
version '16.0.4'

buildscript {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions packages/instabug_flutter/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- Flutter (1.0.0)
- Instabug (16.0.3)
- instabug_flutter (16.0.2):
- instabug_flutter (16.0.4):
- Flutter
- Instabug (= 16.0.3)
- OCMock (3.6)
Expand Down Expand Up @@ -31,7 +31,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
Instabug: b6290ceceb5d98966aa6f10fbd7970026a916f65
instabug_flutter: 967085aa6daf0cd13a20e469aad38847e8421eb3
instabug_flutter: 462e49dc4106bbe6c04c10c733b38d959f28bd40
OCMock: 5ea90566be239f179ba766fd9fbae5885040b992
video_player_avfoundation: 2cef49524dd1f16c5300b9cd6efd9611ce03639b

Expand Down
2 changes: 1 addition & 1 deletion packages/instabug_flutter/ios/instabug_flutter.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'instabug_flutter'
s.version = '16.0.2'
s.version = '16.0.4'
s.summary = 'Flutter plugin for integrating the Instabug SDK.'
s.author = 'Instabug'
s.homepage = 'https://www.instabug.com/platforms/flutter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import 'package:instabug_flutter/src/utils/screen_loading/screen_loading_manager
import 'package:instabug_flutter/src/utils/screen_name_masker.dart';

class InstabugNavigatorObserver extends NavigatorObserver {
InstabugNavigatorObserver({Duration? screenReportDelay})
: _screenReportDelay =
screenReportDelay ?? const Duration(milliseconds: 100);

final Duration _screenReportDelay;
final List<InstabugRoute> _steps = [];

void screenChanged(Route newRoute) {
Expand All @@ -24,22 +29,29 @@ class InstabugNavigatorObserver extends NavigatorObserver {
);
//ignore: invalid_null_aware_operator
WidgetsBinding.instance?.addPostFrameCallback((_) async {
// Starts a the new UI trace which is exclusive to screen loading
ScreenLoadingManager.I.startUiTrace(maskedScreenName, screenName);
// If there is a step that hasn't been pushed yet
if (_steps.isNotEmpty) {
await reportScreenChange(_steps.last.name);
// Report the last step and remove it from the list
_steps.removeLast();
}
try {
// Starts a the new UI trace which is exclusive to screen loading
ScreenLoadingManager.I.startUiTrace(maskedScreenName, screenName);
// If there is a step that hasn't been pushed yet
final pendingStep = _steps.isNotEmpty ? _steps.last : null;
if (pendingStep != null) {
await reportScreenChange(pendingStep.name);
// Remove the specific pending step regardless of current ordering
_steps.remove(pendingStep);
}

// Add the new step to the list
_steps.add(route);
// Add the new step to the list
_steps.add(route);

// If this route is in the array, report it and remove it from the list
if (_steps.contains(route)) {
await reportScreenChange(route.name);
_steps.remove(route);
// If this route is in the array, report it and remove it from the list
if (_steps.contains(route)) {
await reportScreenChange(route.name);
_steps.remove(route);
}
} catch (e) {
InstabugLogger.I
.e('Reporting screen change failed:', tag: Instabug.tag);
InstabugLogger.I.e(e.toString(), tag: Instabug.tag);
}
});
} catch (e) {
Expand All @@ -50,7 +62,7 @@ class InstabugNavigatorObserver extends NavigatorObserver {

Future<void> reportScreenChange(String name) async {
// Wait for the animation to complete
await Future.delayed(const Duration(milliseconds: 100));
await Future.delayed(_screenReportDelay);

Instabug.reportScreenChange(name);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/instabug_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: instabug_flutter
version: 16.0.3
version: 16.0.4
description: >-
Instabug empowers mobile teams to monitor, prioritize, and debug
performance and stability issues throughout the app development lifecycle.
Expand Down