Troubleshooting
Flutter App & APIs
Flutter App Connects to EasyManage APIs from Web (Chrome) but not Android device
For Flutter App web - build and run, default apiURL IP Address of 127.0.0.1
works, where-as for android device - build and run, will push app to your Android Phone (which is a separate device with different IP Address), so you need to provide correct IP Address of desktop where APIs are running. More info on API settings in Flutter Deploy & Run
Flutter Code updated API settings in em_global.dart
file but still not connecting to EasyManage APIs
Probably Flutter hot reload is not pushing those changes to all screens/widgets, Try Restart, Click Green half-circle icon, for action 'Restart (Ctrl+Shift+F5)'.
Flutter App Connects to EasyManage APIs from Android device but not Web (Chrome)
Try disabling security for Chrome browser, via setting --disable-web-security
command line flag. Refer to instructions via Google search: 'How to disable web security for chrome browser' or '--disable-web-security'. Refer to solution on stackoverflow page.
EasyManage APIs For Create/Edit Give Error if primitive field types (Columns) from Frontend are not provided values, are null or are ommitted
EasyManage APIs are built on Java, Spring stack. Null is a reference, and because primitive data types in Java are not Objects, and are not reference types. They require all primitive types to be non-null.
To workaound this error:
- Use dummy values assignments to them, e.g. in case you have hidden those fields from frontend, but API models have them. e.g.
productNoVar: 0,
- In API models, customize and, You can always use one of the wrapper classes to have an Object.
- Reference: Primitive types and wrapper Classes:
byte: java.lang.Byte, short: java.lang.Short, int: java.lang.Integer, long: java.lang.Long, float: java.lang.Float, double: java.lang.Double, boolean: java.lang.Boolean, char java.lang.Character
Known Issues
Code Generation, Compiling
Generated Code is missing some tables from build selection
Tables will be missing/excluded when below conditions happen -
- There are no fields defined for a table. e.g. Table was imported without FIELDS.
Generated Code has compile issues, When
Similar names tables Used
When there are 2 tables with similar names and converting them to PascalCase causes conflict, then there will be issues.
- e.g.
aok_knowledge_base_categories
aok_knowledgebase_categories
will map to folder nameaokknowledgebasecategories
and cause conflict. There will be compile errors/other issues for frontend and backend for such tables. - Workaround: Create database views on such tables with distinct names and use them instead of original tables.
When using a table with 1st key column name as id
but whose EasyManage data type is not NUMBER (java type: long)
Gives Error e.g.: deleteById(java.lang.String) in emrest.spring.AccountsRepository clashes with deleteById(ID) in org.springframework.data.repository.CrudRepository This is because Spring Repository has internal ID column of long type.
Workaround: Create a database view on such table with renaming column id
as idvar
. Use the created view for generating code in place of the original table.
When using a table name or columns name which are reserved words for frontend or backend programming languages, or EasyManage.
Workaround: Create a database view on such table and rename columns to non-reserved words, and use such view.
EasyManage reserved keyword (table name): "appComp"
Java reserved keywords (column names): some examples: "transient", "public", "private", "default", "char", "float", "int", "boolean", "date", "datetime", "time".