I have noticed that in some of my environments, I sometimes get stuck waiting forever for the registry of blocks to go through. After some debugging, I have noticed that this happens when the heartbeat triggers after page load, meaning that while the timeout is cancelled, the registration step never starts. This seems to happen on low-end systems or otherwise slow environments such as my testing rig. Unfortunately, I don't have a foolproof way of reproducing as it seems to be very environment-dependent.
But I can fix the issue by adding an extra page load dispatch in my Gutenberg build or simply modifying the plugin in the admin.js file like so:
I have noticed that in some of my environments, I sometimes get stuck waiting forever for the registry of blocks to go through. After some debugging, I have noticed that this happens when the heartbeat triggers after page load, meaning that while the timeout is cancelled, the registration step never starts. This seems to happen on low-end systems or otherwise slow environments such as my testing rig. Unfortunately, I don't have a foolproof way of reproducing as it seems to be very environment-dependent.
But I can fix the issue by adding an extra page load dispatch in my Gutenberg build or simply modifying the plugin in the admin.js file like so:
It could also have to do with the load order of my environment, but I have not been able to find a way of fixing this issue in this way yet.