Are you using an up to date firmware? This was definitely an issue in the past, but as @DrAzzy said I fixed that bug a while back and haven't seen any issues since.
If you can strip the code back to something you're willing to share that exhibits the problem reliably, that'd be a huge help - then I can hopefully figure out what the issue is.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Are you using an up to date firmware? This was definitely an issue in the past, but as @DrAzzy said I fixed that bug a while back and haven't seen any issues since.
If you can strip the code back to something you're willing to share that exhibits the problem reliably, that'd be a huge help - then I can hopefully figure out what the issue is.