Troubleshooting
Panduan mengatasi masalah umum dalam development MStore Mobile.🔧 Build Issues
Flutter Build Errors
Error: “Gradle build failed”
Gejala:Error: “Pod install failed”
Gejala:Error: “Native Sound Plugin not found”
Gejala:Code Generation Issues
Error: “Conflicting outputs”
Gejala:Error: “Part file doesn’t exist”
Gejala:🌐 Network Issues
API Connection Failed
Gejala:- Verify
.envfile loaded correctly - Check network connection
- Verify API server is running
- Check firewall/proxy settings
Token Refresh Failed
Gejala:MQTT Connection Failed
Gejala:- Verify MQTT broker URL and port
- Check credentials
- Ensure network allows MQTT port (usually 1883)
- Check broker is running
💾 Database Issues
Isar Database Errors
Error: “Isar instance already opened”
Gejala:Error: “Schema mismatch”
Gejala:Data Not Syncing
Debugging:- Verify network connection
- Check API endpoints
- Review sync logic in
OfflineSyncService - Clear local cache and re-sync
🎨 UI Issues
Widget Not Rebuilding
Gejala: UI tidak update setelah state berubah. Debugging:- Ensure state implements
Equatableproperly - Check
buildWhencondition - Verify BLoC is provided correctly
- Use
BlocConsumerif needed
Layout Overflow
Gejala:Performance Issues
Gejala: UI terasa lag atau jank. Debugging:- Use
constconstructors - Avoid rebuilding entire tree
- Use
ListView.builderfor long lists - Optimize images (use
cached_network_image) - Profile with Flutter DevTools
🔐 Authentication Issues
Login Failed
Gejala:- Verify email/password correct
- Check API endpoint URL
- Review backend logs
- Test with Postman/curl
Token Expired
Gejala:🖨️ Printer Issues
Bluetooth Printer Not Found
Gejala:Print Failed
Gejala: Receipt tidak tercetak. Debugging:- Verify printer is paired and connected
- Check printer has paper
- Verify receipt format
- Test with simple text first
📱 Platform-Specific Issues
iOS Issues
Error: “Signing for … requires a development team”
Solusi:- Open Xcode
- Select project → Signing & Capabilities
- Select your team
- Enable “Automatically manage signing”
Error: “Module not found”
Solusi:Android Issues
Error: “Minimum SDK version”
Gejala:Error: “MultiDex”
Solusi:🔍 Debugging Tools
Flutter DevTools
Logging
Network Inspector
🆘 Getting Help
Before Asking for Help
- ✅ Check this troubleshooting guide
- ✅ Search existing issues
- ✅ Review logs and error messages
- ✅ Try to reproduce the issue
- ✅ Prepare minimal reproduction code
Creating a Bug Report
Useful Commands
📚 Additional Resources
- Flutter Documentation
- Dart Language Tour
- BLoC Documentation
- Dio Documentation
- Firebase Documentation
Next Steps
Jika masalah masih berlanjut:
- 💬 Hubungi tim development
- 📧 Buat issue di repository
- 🔍 Review dengan senior developer