BitForger is your code online or can you post it here ?
Without seeing anything I suggest you check you're passing and getting the response through $out() and returning it ?
When you say removing it doesn't fix it, how exactly did you "remove" it ? Does it also happen with the extension disabled ?
It's possible there is an error that is not show in Flarum. Check your webserver logs when working on that kind of thing, they may contain PHP errors that aren't thrown as exceptions.