Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

faxunil's avatar

Uncaught (in promise) SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at index.js:50

Dear Experts! I received this erros on the server where I deployed the project. "Uncaught (in promise) SyntaxError: Unexpected end of JSON input at JSON.parse () at index.js:50"

Php 7.4. I have the same on my dev. server. There is no error. Works the same code fine.

The error is appering after the first update of the field value by Livewire. (sending data) After it JS Error -> noting to do after.

I don't have any ide how and where to start the investigation. Thanks Gergely

0 likes
3 replies
faxunil's avatar

Hi! Thank You very mutch to care about my problem. Very kind of You.

I investigated, what occurs this problem. It was not my code, it comes from the system. (on my dev server was ok and and after copy was not anymore OK -i forgot to copy one file)

The problem is / was, that the /bootstrap/cache/livewire-components.php did'nt registered my Livewire controller. After manual registration of the controller, the problem disappered.

(It would be fine to get informed, when and how this file could be re-generated or automatized.) I'm a little bit confused. I have on Linux the project and maybe the permissions and file right are not correct (?) Br.Gergely

faxunil's avatar

The basic problem was that I have a normal php file on the Livewire controller's folder what killed the generation process. After removing this file the problem solved.

Please or to participate in this conversation.