Installed AEM locally using AEM_6.5_Quickstart.jar (success).
Started the app (success).
Ensured that CORS support is enabled as per the documentation (success).
mvn clean install -PautoInstallSinglePackage in the package root (success)
Issue: React app on localhost:9000 is just a black page, and the request to retrieve the model.json fails.
403 error on model client initialization:
class CustomModelClient extends ModelClient {
/**
* Fetches a model using the given a resource path
*
* @param {string} modelPath - Path to the model
* @return {*}
*/
fetch(modelPath) {
if (!modelPath) {
return Promise.reject(
new Error(`Fetching model rejected for path: ${modelPath}`)
)
}
const url = `${process.env.API_HOST}${modelPath}`
// Either the API host has been provided or we make an absolute request relative to the current host
return fetch(url, {
headers: {
Authorization: `Basic ${Buffer.from("admin:admin").toString("base64")}`
}
}).then(function(response) {
if (response.status >= 200 && response.status < 300) {
return response.json()
} else {
const error = new Error(
`while fetching the model for url: ${url}`,
response.statusText || response.status
)
error.response = response
return Promise.reject(error)
}
})
}
}
I've done the following:
mvn clean install -PautoInstallSinglePackage
in the package root (success)Issue: React app on localhost:9000 is just a black page, and the request to retrieve the model.json fails.
403 error on model client initialization:
Any ideas?