Finding issues when making an ajax request

What issue or error are you experiencing?

I tested my code in another server and it’s working properly. I’m getting the following error in console in localwp:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

And I’m getting the HTML code of the page where the ajax request is made from:
request.responseText = ’
!DOCTYPE html>


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

System Details

  • Local Version: Version 8.1.0+6514

  • Operating System (OS) and OS version: Windows 10 Pro 22H2

Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log) (37.6 KB)

Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @Alvaro

If you change your Router Mode to Site Domains are you able to proceed? Or did you change to Localhost to avoid some type of conflict already? Based on your log it looks like you might have a process hung up somewhere. Are you running any other Dev programs simultaneously?

Hello Nick, thank you for the answer.

It wasn’t due to local wp. It was another function that was provoking an incompatibility.


1 Like

Glad to hear it @Alvaro thank you for following up :slight_smile:

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.