SFErrorDomain Code=3 "(null)"

I am running a Safari extension on my phone and getting this error when running browser.runtime.sendNativeMessage({...});

I am only getting this error when sending a specific message, other messages return as expected. When I run on the simulator I do not get this error.

Does anyone one what Code=3 represents?

Answered by jw732 in 692429022

This was throwing an error because I was hitting the 6mb memory limit. Example of console error posted here: https://developer.apple.com/forums/thread/687642?answerId=691678022#691678022

To add some additional clarity, the message that is failing returns an array of of dictionaries [[String: Any]]. It seems that when the array length is greater than 6 the error occurs, however if the array is less than 6 it does not occur.

Accepted Answer

This was throwing an error because I was hitting the 6mb memory limit. Example of console error posted here: https://developer.apple.com/forums/thread/687642?answerId=691678022#691678022

SFErrorDomain Code=3 "(null)"
 
 
Q