ydhnwb / resepmau_mvp_flutter

This is a flutter app with mvp architecture pattern. Features : Login, Register, and CRUD, logout
https://medium.com/@ydhnwb/pendekatan-mudah-flutter-mvp-with-retrofit-492c5bb27ed1
9 stars 4 forks source link

Error Dio (Unexpected Char) #2

Open diorz38 opened 4 years ago

diorz38 commented 4 years ago

Step reproduce:

  1. clone git
  2. open in Android Studio (dan dicoba juga dgn VS Code)
  3. Get Dependencies
  4. Run debug (dgn emulator dan Device)
  5. Muncul Error yang sama:
exception = {DioError} DioError [DioErrorType.DEFAULT]: FormatException: Unexpected character (at character 1)\n<!DOCTYPE html>\n^\n
this = {Dio} 
cancelToken = null
options = {RequestOptions} 
responseBody = {ResponseBody} 
e = {FormatException} FormatException: Unexpected character (at character 1)\n<!DOCTYPE html>\n^\n
err = {DioError} DioError [DioErrorType.DEFAULT]: FormatException: Unexpected character (at character 1)\n<!DOCTYPE html>\n^\n

Flutter Doctor:

S D:\MyDocuments\flutterApps\resepmau_mvp_flutter-retrofit> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [Version 10.0.18363.720], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.43.2)
[√] Connected device (2 available)

• No issues found!

API: https://resep-mau.herokuapp.com/api It work like a charm, both web and api (tested with postman)