Cannot connect to server
Veldriq Field
Symptom: cannot reach the company server.
Screen path: Unable to reach your company’s server — “Check your internet connection or server configuration.” Tap Retry. Native Field is not the Field PWA. Native Field does not use CORS or CSRF cookies.
Preconditions
Section titled “Preconditions”API_BASE_URL is origin only (https://fsm.example.com). Do not append /backend, /api, or /api/v1. Production refuses HTTP.
- Read the exact title. Invalid configuration is a builder rebuild (missing URL or not HTTPS).
- Confirm the device can open the origin in a browser (certificate SAN must match). A laptop click-through does not help the app.
- Android emulator:
http://10.0.2.2:8000withAPP_ENV=development. iOS Simulator:http://127.0.0.1:8000. Rebuild after the change. - Tap Retry. If you already had a session, an unreachable server does not log you out — cached jobs stay.
- If copy is This app is not compatible with the server, update app and backend together (API / sync protocol 1).
What works / does not work
Section titled “What works / does not work”| Works | Does not work | |
|---|---|---|
| Existing session offline | Cached jobs | First login without network |
| Changing origin | Rebuild dart-defines | Runtime URL screen |
| SPA cookie “fixes” | Ignore | Profile API tokens for Field |
Likely cause: bad API_BASE_URL; TLS; firewall; emulator 127.0.0.1 on Android.
If login 404s: the client already calls /api/v1/mobile/…. A path of /api is rejected — rebuild with origin only.