reactjs error - AJAX Failed: SyntaxError: Unexpected token < in JSON at position 0

Hi Experts,

I get the following error on the console for running the reactjs application.

   AJAX Failed: SyntaxError: Unexpected token < in JSON at position 0

Open in new window


on the developer tools console window. I got the following error.
 search-e3e9d0f9da88f042e3cb.js:446 Warning: React attempted to reuse markup in a container but the checksum was invalid. 
This generally means that you are using server rendering and the markup generated on the server was not what the client
 was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. 
 Instead, figure out why the markup being generated is different on the 
 client or server:
 (client) " data-reactid="18">Medium</div><button 
 (server) " data-reactid="18">Large</div><button s

Open in new window

It is wagtail application(it is like Django-cms), in which react module is called inside the wagtail application. The development environment is Ubuntu on aws.

Please help me in resolving this issue. I am not able to find the origin of the error.

With Many Thanks,

Bharath AK
LVL 1
Bharath A.KAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bharath A.KAuthor Commented:
Hi Experts,

I think once I fix the second error, first error would vanish.  what would be the reason for this error

Warning: React attempted to reuse markup in a container but the checksum was invalid. 
This generally means that you are using server rendering and the markup generated on the server was not what the client
 was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. 
 Instead, figure out why the markup being generated is different on the 
 client or server:

Open in new window



Any help is appreciated.

With Many Thanks,

Bharath AK
0
Bharath A.KAuthor Commented:
Hi Experts,

       Able to resolve the first error.  I was running on port number 8000 which was not set for the ajax call.  once Port number is assigned application start working.  But not able to resolve the second error. Anyway application is now working.

With Many Thanks,

Bharath AK
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bharath A.KAuthor Commented:
This is problem is now resolved.

Thanks,
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
wagtail

From novice to tech pro — start learning today.