Support » Plugin: Jetpack by WordPress.com » SyntaxError: Unexpected token < in JSON at position 0

  • Every time I try to active some features in jetpack it appears SyntaxError: Unexpected token < in JSON at position 0
    I have opened the network console of the browser and when active the jetpack features it appear a red line and then if I click on it says me

    Bad Request

    Your browser sent a request that this server could not understand.

    solution?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Could you let me know what other plugins are currently active on your site?

    Could you also post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    http://jetpack.com/contact-support/

    Thanks!

    It’s a clean WordPress installation.
    The first thing I have installed was jetpack and activated it and it gives me that error.
    The site is http://www.experiencemusic.it and now there aren’t activated plugin and I have set the theme to default one

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    @nicocaldo Could you try to go to Settings > Permalinks in your dashboard and set custom permalinks there?

    Let me know if it helps.

    I can set permalinks there but the jetpack problems still eprsist

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Your permalink structure appears to be the same right now; could you try to change it to something else and let me know when it’s done, so I can take another look at your site?

    Thanks!

    Ok now I have set up the permalink with date and name option

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Interestingly your permalinks still include index.php, and your site’s REST API URL can’t be reached right now:
    http://www.experiencemusic.it/index.php/wp-json/

    This could be caused by your server configuration. Could you contact your hosting provider and ask them to enable mod_rewrite on your server?
    If they have more questions, you can direct them to this page:
    https://codex.wordpress.org/Using_Permalinks#mod_rewrite:_.22Pretty_Permalinks.22

    Let me know how it goes.

    My hosting provider said that the mod_rewrite is active on the server and I have to active it via .htaccess

    I have seen that my .htaccess haven’t any mod_rewrite rule activated so I have written

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    But the problem still persist

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    If mod_rewrite is active, could you now try to remove index.php from your permalink structure under Settings > Permalinks in your dashboard?

    Done
    No more index.php

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Excellent! Things look a lot better now.

    If you still experience issues, could you try the following:

    1. Open the dashboard page.
    2. Open your browser console
    3. Click on the Network tab
    4. Refresh the page.
    5. Try to activate a module.
    6. If you see any lines in red inside the browser console, click on them. A new panel should appear on the right.
    7. Click on the “Response” tab in that new panel.
    8. Copy the message displayed there.
    9. Paste it here.
    10. If no red lines appeared in the browser console, click on the “Console” tab of the browser console.
    11. Copy any errors displayed there, and paste them here.

    Thanks!

    I have tried to active the downtown monitoring and it appear this

    <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
    <html><head>
    <title>400 Bad Request</title>
    </head><body>
    <h1>Bad Request</h1>
    <p>Your browser sent a request that this server could not understand.<br />
    </p>
    </body></html>

    This error appear every time I try to active a module

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Could you let me know what the URL of that request that returns a 400 is?

    Thanks!

    Plugin Contributor Jeremy Herve

    (@jeherve)

    Jetpack Mechanic 🚀

    Thanks! At this point, I’d like to run more tests with you on your site, to try to understand what’s happening.

    Would you mind contacting us via this contact form, and mention this thread?

    Thanks!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘SyntaxError: Unexpected token < in JSON at position 0’ is closed to new replies.