Troubleshooting
Common issues when developing and running the Expo Mobile Template.
Cannot reach the API / network errors
Symptoms: Error messages mentioning Cannot reach the API at … or Network request failed.
Checks:
- Confirm the FastAPI backend is running.
- Use the correct URL for your environment — see Configuration.
- Android emulator: use
http://10.0.2.2:8000, notlocalhost. - Physical device: use your computer's LAN IP; device and computer must be on the same network.
- Test
http://<api-url>/api/v1/checkDBConnectionfrom a browser on the device network.
Invalid email or password (but credentials are correct)
- Ensure the backend database is seeded / user exists.
- Check you are not using an
adminorsuperaccount — this app rejects those roles.
expo-constants Kotlin compile error
Cause: Wrong expo-constants major version for SDK 54.
Fix:
npx expo install expo-constants
Use ~18.x on Expo SDK 54. Do not install expo-constants@55.
Gradle autolinking warning
Message: Autolinking is not set up in settings.gradle
Fix:
- Run
npx expo prebuildto regenerate Android project files. - Ensure
android/settings.gradleincludes Expo autolinking. - Configure Node path for Android Studio — see Native builds.
useExpoModules() not found
Use the Expo SDK 54 template pattern: expoAutolinking.useExpoModules() in settings.gradle, or the legacy apply from autolinking script from expo/scripts/autolinking.gradle.
Regenerate with npx expo prebuild --clean if the project was created with an older template.
Date picker: dismiss of undefined (Android)
Cause: DateTimePicker with mode="datetime" is not supported on Android.
Fix: Already implemented — Android uses DateTimePickerAndroid with separate date and time steps. Do not use mode="datetime" on Android.
Expo package version mismatches
Always align native modules with your SDK:
npx expo install <package-name>
Check the Expo doctor:
npx expo-doctor
Documentation site won't build
From website/:
npm install
npm run build
Broken internal links fail the build (onBrokenLinks: 'throw'). Fix any moved doc paths referenced in markdown.
Metro cache issues
npx expo start --clear
Still stuck?
- Compare your
openapi.jsonwith the running backend OpenAPI docs. - Regenerate the client:
npm run generate-api. - Review backend logs for 4xx/5xx responses during the failing action.