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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Cookie not passed to request of react.model.json

Avatar

Level 1

Hi,

Trying to get the sample SPA app (we.retail.journal) running. I face an issue with the react.model.json

The cookie is not passed in the request, so i get redirected to the loging page.

This prevents the site being properly loaded.

Any Idea how I can make AEM send the cookie along with the request?

Below you find the headers.

General:

  1. Request URL: http://localhost:4502/content/we-retail-journal/react.model.json
  2. Request Method: GET
  3. Status Code: 302 Found
  4. Remote Address: [::1]:4502
  5. Referrer Policy: no-referrer-when-downgrade

Request Header:

  1. Accept: */*
  2. Accept-Encoding: gzip, deflate, br
  3. Accept-Language: de-DE,de;q=0.9,en-US;q=0.8,en;q=0.7
  4. Cache-Control: no-cache
  5. Connection: keep-alive
  6. Host: localhost:4502
  7. Pragma: no-cache
  8. Referer: http://localhost:4502/content/we-retail-journal/react.html
  9. User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36

Response Header:

HTTP/1.1 302 Found Date: Wed, 17 Oct 2018 11:43:27 GMT Location: http://localhost:4502/libs/granite/core/content/login.html?resource=%2Fcontent%2Fwe-retail-journal%2... Content-Length: 0

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi aquavento,

Are you logged into AEM in the browser and navigating to: http://localhost:4502/content/we-retail-journal/react/home.html  ?

It shouldn't prompt you to authenticate the ajax request. Also what version of AEM and We.Retail journal app are you using?

It is designed for AEM 6.4 + SP2. You can find the latest version of the We.Retail Journal here: GitHub - adobe/aem-sample-we-retail-journal: We.Retail Journal is a sample showcasing SPA Editing ca...

View solution in original post

0 Replies

Avatar

Correct answer by
Employee Advisor

Hi aquavento,

Are you logged into AEM in the browser and navigating to: http://localhost:4502/content/we-retail-journal/react/home.html  ?

It shouldn't prompt you to authenticate the ajax request. Also what version of AEM and We.Retail journal app are you using?

It is designed for AEM 6.4 + SP2. You can find the latest version of the We.Retail Journal here: GitHub - adobe/aem-sample-we-retail-journal: We.Retail Journal is a sample showcasing SPA Editing ca...

Avatar

Level 10

Excellent answer Danial. The new WKDN doc will help many AEM DEV interested in SPA!

In addition - keep you eye out soon for an AEM Ask the Community Experts session on AEM And SPA - looks like this will be scheduled for Jan 2019.

Avatar

Level 1

Hi, thanks for your feedback.

Yes I'm logged in. I can see how the cookies are passed in other request before and after the particular call to the react.model.json.

I face the same issue when trying to get Adobe Experience Manager Help | Getting Started with the AEM SPA Editor - Chapter 0 running.

Running AEM 6.4

1602115_pastedImage_2.png

And Service Pack 2 is installed: 1602114_pastedImage_1.png

Any Idea what could cause this problem?

Avatar

Level 1

adding

{
  credentials: 'include' 
}

to the fetch() which retreives the react.model.json in the cq-spa-page-model-manager forces the credentials to be sent with the request.

Avatar

Level 4

Are you able to resolve this issue . Because am facing the same problem in 6.4 . Please help me here