We've set up the Livewire admin panel, and it works perfectly on our local environment. However, after deploying the code on our UAT server through AWS-Vapor, we're encountering an error. The update method is redirecting to the domain itself and the Windows Console is showing the below error.
Uncaught (in promise) SyntaxError: Unexpected token '<', "
at sendRequest (livewire.js?id=cc800bf4:4321:52)
at async RequestPool.send (livewire.js?id=cc800bf4:4041:7)
Here are some things I've tried to fix the issue:
I attempted to remove and re-add the doctype in the master blade file, but it didn’t resolve the issue. I also noticed that on inspecting the login page, it initially displays two blank lines, which might be causing the problem, but I couldn't trace the root cause in our source code.
I removed public/vendor from the .gitignore, re-published all Livewire assets, and committed them, but this didn’t help either.
We have added a reCAPTCHA on the login page, I temporarily disabled reCAPTCHA to check if that was causing the issue, but there was no improvement.