Getting error while adding product in Cart using AEM version 6.5

Avatar

Avatar
Validate 1
Level 2
jadhavni3
Level 2

Likes

6 likes

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 2
jadhavni3
Level 2

Likes

6 likes

Total Posts

45 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
jadhavni3
Level 2

29-10-2020

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

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

154 likes

Total Posts

167 posts

Correct reply

55 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

154 likes

Total Posts

167 posts

Correct reply

55 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile
Umesh_Thakur
MVP

29-10-2020

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

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

275 likes

Total Posts

320 posts

Correct reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

29-10-2020

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