10.❓Developer FAQ & Troubleshooting
This section includes commonly asked questions and solutions encountered during Kleber App development, setup, and testing.
🔄 “How do I reset the app?”
To reset the app:
- Simply log out — this clears all cached data except the selected theme and language.
- To fully reset app data (including preferences), uninstall and reinstall the app from your device.
🔐 “Why is authentication failing?”
Authentication may fail due to:
- Expired token (after 15 minutes of inactivity or 1 day)
- Incorrect or missing OTP during login
- API environment mismatch (e.g., using staging credentials with production URL)
✅check:
lib/utils/end_points.dart
to ensure correct base URL
📡 “How can I test API calls offline?”
Offline testing is not fully supported since all major features depend on InvestGlass APIs.
However, for UI-only testing:
- Use mock data or temporary hard-coded values in development mode.
- Implement conditional logic in services to switch between mock and live calls if needed.
⚙️ “How do I switch between staging and production?”
Open lib/utils/end_points.dart
and:
- Comment out the current
baseUrl
- Uncomment the desired environment:
- Staging:
https://staging.investglass.com/client_portal_api/
- Production:
https://app.investglass.com/client_portal_api/
- Staging:
💡only one baseUrl variable should be active at a time.
🕒 “Why does my token expire so quickly?”
The app’s access token expires:
- After 15 minutes of user inactivity
- Automatically after 24 hours, even if active
After expiry, the user will be redirected to the onboarding screen on the next API call.
🔄 “Can I clone an existing project?”
Yes. In Android Studio:
- Go to
File > New > Project from Version Control...
- Paste the GitHub repo URL
- Click Clone
After that:
- Run
flutter pub get
- Set up environment variables (if needed)
- Launch the app using
flutter run
🧯 Known Issues & Workarounds
Issue | Description | Workaround |
---|---|---|
⚠️ Token auto-expiry | User gets logged out unexpectedly | Ensure regular interaction or refresh |
📄 iOS build fails at signing | Common when Team/Bundle ID is not set | Set correct team + ID in Xcode |
📦 Pod install errors | Especially on macOS | Run pod install from ios/ and restart Xcode |
📡 No API response | Network/URL misconfigured | Verify correct baseUrl and environment |
Updated 5 days ago