You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a new plugin for a major customer, with some enhancements to support several hundred megabytes worth of response data. If I would send all of the data at once, the Java code would crash with a JSON memory error. The obvious workaround would be to send the response data in multiple parts, with multiple plugin responses as documented and supported by the API.
But if I would send too many plugin responses, it would still crash with a JSON memory error. I think the cause is that the MAX_PAYLOAD_SIZE value of 500 MB is way too large here.
I have made github:brodybits/cordova-big-android-response-payload-test as a demo which can be used to reproduce this issue. It will send the responses in 1 MB chunks, which should be no problem. It seems to work consistently stable with 20 native response chunks, memory issues with 400 native response chunks.
I tried reducing MAX_PAYLOAD_SIZE to 16 MB, and it does seem to resolve the crash. But if there are too many plugin responses, I would then see some ugly module warning messages like this:
Bug Report
Problem
I am working on a new plugin for a major customer, with some enhancements to support several hundred megabytes worth of response data. If I would send all of the data at once, the Java code would crash with a JSON memory error. The obvious workaround would be to send the response data in multiple parts, with multiple plugin responses as documented and supported by the API.
But if I would send too many plugin responses, it would still crash with a JSON memory error. I think the cause is that the MAX_PAYLOAD_SIZE value of 500 MB is way too large
here.
I have made
github:brodybits/cordova-big-android-response-payload-test
as a demo which can be used to reproduce this issue. It will send the responses in 1 MB chunks, which should be no problem. It seems to work consistently stable with 20 native response chunks, memory issues with 400 native response chunks.I tried reducing
MAX_PAYLOAD_SIZE
to 16 MB, and it does seem to resolve the crash. But if there are too many plugin responses, I would then see some ugly module warning messages like this:and if I don't use background threading, the JavaScript would not see all of the response messages.
A project colleague pointed to the some code which seems to trigger the module not found messages - here.
Here is the original thread on the mailing list.
What is expected to happen?
What does actually happen?
Information
see above
Command or Code
see above
Environment, Platform, Device
Version information
Checklist
The text was updated successfully, but these errors were encountered: