Mobile App Crashes - Quota has been exceeded

By using the SugarApp from the offical AppStore (iOS) the App went into an "internal error".
I was able to locate the problem by checking the App's Log:

[ERROR] FATAL[2019-10-10 12:16:28]: The quota has been exceeded.

The problem always occurs when adding Opportunities to the list of shown modules.
The reason is that opportunities are having a lot of app_list_string's in our system.
The transfered  lang_de_DE_mobile_ordered.json file has a size of 6MB.

Because the app is using the local storage of the mobile device and the maximum of an iOS device is 10MB, we're running into the limit.

Is there any possibility to fix this issue without reducing the app_list_strings?

Parents
  • Hi

    The best solution would be to limit labels JSON size on server side

    The other more hacky solution would be filter out unnecessary labels on client side (you will need mobile SDK for this)
    You fix would be to override 

    app.metadata.set(data, isPublic, reset) method and inside this method you can filter out unnecessary labels from incoming data argument

    Hope this helps, Eugene

  • Hey Eugene,
    first of all thanks for your answer.

    The problem in this case is that we have an interface from our ERP System to Sugar, that generates app_list_strings.
    We need those app_list_strings because the SugarACL is extended to take over a users permission from ERP Objects to Sugar.


    So the app_list_strings are all needed in the app to display ERP System values.

    Do you know if there is any other possibility to store all app_list_strings in the app?

    Best Regards

    Kevin

Reply
  • Hey Eugene,
    first of all thanks for your answer.

    The problem in this case is that we have an interface from our ERP System to Sugar, that generates app_list_strings.
    We need those app_list_strings because the SugarACL is extended to take over a users permission from ERP Objects to Sugar.


    So the app_list_strings are all needed in the app to display ERP System values.

    Do you know if there is any other possibility to store all app_list_strings in the app?

    Best Regards

    Kevin

Children
  • I don't think there is any reliable way to store such big data in websql/localstore. Correct way to store such data would be to use native SQLite storage via cordova plugin. But implementing this for app labels will take too much efforts as existing code expects labels to be stored in app.cache (which is synchronous storage). And SQLite implementation is asynchronous, so code will have to be changed quite a lot

    IMO finding a way to filter out unnecessary labels is much more feasible solution