I think I encountered a case recently when main was async
main() async {
can you try to move your code out from main into another function that you then call from main
Please report the issue especially if you can provide an example that allows to reproduce the problem.