You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 18, 2025. It is now read-only.
The Isar Inspector fails to connect when running an app on a physical Android device. The flutter run command prints the "ISAR CONNECT STARTED" message, suggesting the local proxy server has started. However, the web UI fails to connect, and direct connection tests on the host machine confirm that nothing is listening on the specified port, resulting in a Connection refused error.
This strongly suggests the local proxy server is crashing silently or failing to bind correctly, likely due to a compatibility issue with the latest Flutter 3.32.8 release.
Steps to Reproduce
Create a new Flutter project and add the Isar dependencies as shown in the code sample below.
Use the provided main.dart code, which enables the inspector.
Run the app on a physical Android device using flutter run.
The console will print the Isar Inspector URL (e.g., https://inspect.isar-community.dev/3.1.8/#/<port>/<auth> ).
Open this URL in a browser.
Expected: The Inspector connects.
Actual: The Inspector UI hangs on "Connecting...", and the browser's developer console shows a WebSocket connection error: main.dart.js:8029 WebSocket connection to 'ws://127.0.0.1:<port>/...' failed:.
On the host machine (macOS), running websocat -v ws://127.0.0.1:<port> fails with Connection refused (os error 61).
Code sample
pubspec.yaml:
# Using YAML anchors for version consistency, as seen in the user's project.isar_version: &isar_version 3.1.8dependencies:
flutter:
sdk: flutterpath_provider: ^2.0.11 # Required for Isar initializationisar:
version: *isar_versionhosted: https://pub.isar-community.dev/isar_flutter_libs:
version: *isar_versionhosted: https://pub.isar-community.dev/dev_dependencies:
flutter_test:
sdk: flutterisar_generator:
version: *isar_versionhosted: https://pub.isar-community.dev/build_runner: any
lib/main.dart (Simplified from user's project for reproducibility):
import'package:flutter/material.dart';
import'package:isar/isar.dart';
import'package:path_provider/path_provider.dart';
// A simple schema is required to open Isar@collectionclassDummySchema {
Id id =Isar.autoIncrement;
}
// This service class mirrors the user's project structure// where Isar is initialized and held.classDatabaseService {
latefinalFuture<Isar> _isar;
DatabaseService() {
_isar =_init();
}
Future<Isar> get isar => _isar;
Future<Isar> _init() async {
final dir =awaitgetApplicationDocumentsDirectory();
// The inspector is enabled here, which is the key part.returnIsar.open(
[DummySchemaSchema],
directory: dir.path,
inspector:true,
);
}
}
finalDatabaseService _databaseService =DatabaseService();
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initialize the database before running the appawait _databaseService.isar;
runApp(constMyApp());
}
classMyAppextendsStatelessWidget {
constMyApp({super.key});
@overrideWidgetbuild(BuildContext context) {
returnconstMaterialApp(
home:Scaffold(
body:Center(
child:Text('Isar Inspector Test on Flutter 3.32.8'),
),
),
);
}
}
Description
The Isar Inspector fails to connect when running an app on a physical Android device. The
flutter runcommand prints the "ISAR CONNECT STARTED" message, suggesting the local proxy server has started. However, the web UI fails to connect, and direct connection tests on the host machine confirm that nothing is listening on the specified port, resulting in aConnection refusederror.This strongly suggests the local proxy server is crashing silently or failing to bind correctly, likely due to a compatibility issue with the latest Flutter 3.32.8 release.
Steps to Reproduce
main.dartcode, which enables the inspector.flutter run.https://inspect.isar-community.dev/3.1.8/#/<port>/<auth>).main.dart.js:8029 WebSocket connection to 'ws://127.0.0.1:<port>/...' failed:.websocat -v ws://127.0.0.1:<port>fails withConnection refused (os error 61).Code sample
pubspec.yaml:lib/main.dart(Simplified from user's project for reproducibility):Details
15.53.32.8isar: 3.1.8isar_flutter_libs: 3.1.8isar_generator: 3.1.8