🚀 Join the waitlist now! waitlist.floot.dev
LogoFlootdocs

Troubleshooting

A guide to resolving common development problems.

Android

Emulator is not reaching the backend

Connection refused - errno 101

SocketException: Connection failed (OS Error: Network is unreachable, errno = 101)…

Fix

Turn the Wi-Fi off on emulator.

Connection refused - errno 111

SocketException: Connection refused (OS Error: Connection refused, errno = 111)…

This occurs because the Android emulator does not recognize localhost as the host machine. Instead, you should use the IP address 10.0.2.2.

.env*
SUPABASE_URL=http://10.0.2.2:5432

Flutter

Widget Testing

Pending timers

When running widget tests, you might encounter the following error:

The following assertion was thrown running a test: A Timer is still pending even after the widget tree was disposed.

…'!timersPending’

This typically occurs when an animation or asynchronous operation hasn't completed. Below are two approaches to resolve this using tester.runAsync.

Run the pump and settle in that function.

await tester.runAsync(() async => tester.pumpAndSettle());

Run the whole widget pump in that function.

await tester.runAsync(() async => tester.pumpWidget(...));

Cocoapods

This issue can occur when launching your app, often after upgrading Flutter or updating pub dependencies.

Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies. To update the CocoaPods specs, run:

pod repo update

Error running pod install

Follow these steps to resolve the issue:

Note

If you are encountering this issue for your Mac app, replace every occurrence of the ios path with macos in the steps below.

Fix

Run flutter clean to remove build artifacts.

Delete the ios/Pods directory to clear existing CocoaPods dependencies.

Delete the ios/Podfile.lock file to reset the Podfile lock state.

Run flutter pub get to fetch Dart dependencies.

Navigate to the ios directory and run pod install to reinstall CocoaPods dependencies.

Run flutter run to build and launch the app.