In my case, I discovered I had a recursive call in my app.
After failing to run the tests, I ran the app itself (API) and, when calling certain method, the app would just get stuck loading and sometimes crash.
It was a copy-paste oversight where some reference was pointing to itself. Not so hard to find when I figured it was a recursive reference, thanks to the answer from @asma.