Well this error can occur due to various reasons such as improper handling of asynchronous tasks or closing the event loop prematurely.
To resolve this you make sure that all asynchronous tasks are properly awaited and handled and check for any code that might be closing the event loop unexpectedly. And consider debugging your application to identify the specific cause of the event loop closure and address it accordingly.