Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 7 Materials and Homework.

Registrations still open!


question

diptesh1410_193094 avatar image
diptesh1410_193094 asked ·

Still getting authentication errors after verifying credentials in the workshop exercise

Even after entering correct credentials in the form data and uploading the secure socket bundle it is not accepting the credentials. Showing me error please verify credentials and try again.


workshop
9 comments
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hi @diptesh1410_193094,

please check in the developer console of your browser for the error with the associated POST request when you test the connection.

At this stage, there could be multiple sources of the failure to post the credentials, e.g:

- wrong credentials

- wrong base address

- CORS policy

Let us have the POST error, we want to figure it out.

Thanks!

0 Likes 0 · ·
diptesh1410_193094 avatar image diptesh1410_193094 bettina.swynnerton ♦♦ ·

can u tell me what description we have to put for the file for the post request to check the connection.?

0 Likes 0 · ·

do we have to upload the file or any link.......?


0 Likes 0 · ·
Show more comments
ynv_2006_193227 avatar image ynv_2006_193227 bettina.swynnerton ♦♦ ·

Getting below error in Chrome browser when trying to connect to Astra-UI

Access to XMLHttpRequest at 'https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io/api/credentials/test?username=KVUser&password=KVPassword&keyspace=killrvideo' from origin 'https://3000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


POST https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.w xhr.js?b50d:172 POST https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io/api/credentials/test?username=KVUser&password=KVPassword&keyspace=killrvideo net::ERR_FAILED

0 Likes 0 · ·

1 Answer

Cedrick Lunven avatar image
Cedrick Lunven answered ·

Hi @diptesh1410_193094,

Can you test again please ? We changed the code in order to make the error message appearing on screen. For you to copy-paste it or troubleshoot.

9 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Getting same error on screen "A problem occured with your credentials. Please verify and try again"
Below are details from Developer tool:

Access to XMLHttpRequest at 'https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io/api/credentials/test?username=KVUser&password=KVPassword&keyspace=killrvideo' from origin 'https://3000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.


POST https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.w xhr.js?b50d:172 POST https://5000-fb4cf1af-f975-4beb-a9ce-e885fccbd1c1.ws-eu01.gitpod.io/api/credentials/test?username=KVUser&password=KVPassword&keyspace=killrvideo net::ERR_FAILED

0 Likes 0 · ·

Hi @ynv_2006_193227,

would you use the localhost address in the .env file for the UI:

BASE_ADDRESS = http://localhost:5000/api

You will need to restart the UI after that, and refresh your browser.

No need to restart the Python backend.

See if this gets you past this CORS issue.

Thanks!

0 Likes 0 · ·
ynv_2006_193227 avatar image ynv_2006_193227 bettina.swynnerton ♦♦ ·

Does that mean like instead of this command

echo 'BASE_ADDRESS=https://<your_port>-<your_id>.<your_region>.gitpod.io/api' > .env

we have to use

echo 'BASE_ADDRESS = http://localhost:5000/api' > .env

to set the environment

1 Like 1 · ·
Show more comments