'Request failed with status code 302' when creating trackedEntityInstance to dhis2

The following error occurred when creating trackedEntityInstance to dhis2

data: ‘–REDACTED–’
},
error: ‘Request failed with status code 302’,
response: ‘\r\n’ +
‘302 Found\r\n’ +
‘\r\n’ +

302 Found

\r\n’ +

nginx\r\n’ +
‘\r\n’ +
‘\r\n’
}
[CLI] ✘ Error: runtime exception

the state.json is as follows

{
“configuration”: {
“hostUrl”: “DHIS 2 Demo - Sierra Leone”,
“username”: “admin”,
“password”: “district”
},

Hey Ashenafi, a 302 is a redirect… can you check the base url of the DHIS2 demo site? Could be still pointing to an old build that isn’t being served anymore.

here is my state.json is there any problem with that
{
“configuration”: {
“hostUrl”: “DHIS 2 Demo - Sierra Leone”,
“username”: “admin”,
“password”: “district”
},

Try changing https://play.dhis2.org/2.39.0.1 to https://play.dhis2.org/2.39.1

I’d want to see one of the versions (and corresponding URLs) listed here:

Thanks Taylor, Finally successfully works perfectly.

Best Regards,

So glad to hear it! Thanks for engaging and welcome to the community!

While you’re here… it sounds like this may happen from time to time with that auto-generated DHIS2 demo credential. What do you think we could do to keep this from happening in the future? Maybe use that /dev server rather than the version-specific one so that the URL doesn’t drift? I suppose the downside is that the dev server could be less stable.