Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Getting error while adding product in Cart using AEM version 6.5

jadhavni3
Level 3
Level 3

Hi,

I'm trying to added product in Cart but getting error as "Error: Network error: Unexpected token < in JSON at position 0" and unable to see Product images on web page. I have tried it using IIS server(v10.0) with Dispatcher(v4.3.3) but getting same error. For reference please find attached screenshot.


Could anyone help me on this issue ? 

 

 

Thank you.
Nitin.

 

 

jadhavni3_0-1604029975879.png

 

1 Accepted Solution
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

Hi @jadhavni3 ,

It seems like either your api is not responding or not responding with the correct JSON format that you are using in React. 

This thing you can validate in ARC or Postman then modify your API accordingly. but for sure it is not generic to AEM this purely you code or configuration issue.

I think we should avoid such kind of questions here.

Umesh Thakur

View solution in original post

2 Replies
Umesh_Thakur
Correct answer by
Community Advisor
Community Advisor

Hi @jadhavni3 ,

It seems like either your api is not responding or not responding with the correct JSON format that you are using in React. 

This thing you can validate in ARC or Postman then modify your API accordingly. but for sure it is not generic to AEM this purely you code or configuration issue.

I think we should avoid such kind of questions here.

Umesh Thakur

View solution in original post

Anudeep_Garnepudi
Community Advisor
Community Advisor

Hi @jadhavni3 

Response to your request is not JSON it seems, it is returning either HTML or XML. Please check the response type JSON or not. If it is JSON then that is a invalid JSON.

AG