We tried using lower value of MAX_PAYOAD_SIZE and sometimes encounter an error like this in the log:
05-26 18:44:13.794 10105 10105 I chromium: [INFO:CONSOLE(82127)] "Uncaught module cordova/plugin/android/polling not found", source: file:///android_asset/www/shell/polyfills.js (82127) My colleague pointed out this line: https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/NativeToJsMessageQueue.java#L199 I should be able to make a test plugin that can help reproduce this issue. We were also wondering how Capacitor would hold up under a similar data load. On Sun, May 24, 2020 at 1:23 PM Chris Brody <chris.br...@gmail.com> wrote: > In this source: > https://github.com/apache/cordova-android/blob/master/framework/src/org/apache/cordova/NativeToJsMessageQueue.java > > the MAX_PAYLOAD_SIZE seems to be 500 MB which could be way, way too large. > I have client who reported an issue with OutOfMemoryError, looks like an > attempt to allocate 148 MB with only 25 MB free. I have already adjusted my > own plugin to send the results with maximum chunk size of 5-10 MB. > > Considering that the new major release is happening soon, is there any > chance we could get this adjusted now? > > I think it would be ideal to support a configuration parameter, if anyone > has time to work on it. > > I hope I don't have to support a custom workaround fork for too long. > > Chris > > https://www.linkedin.com/in/chrisbrody/ > >