401 Unauthorized error

Hi. We are downloading a dataset by Gen3. Everything was fine until the problem happened a week ago, and we could not solve it.

Here is the command we used for the download:

gen3-client configure --profile=AnVIL --cred=E:credentials.json --apiendpoint=https://gen3.theanvil.io

Profile 'AnVIL' has been configured successfully.

gen3-client download-multiple --profile=AnVIL --manifest="E:manifest_Heart [PART1].json" --download-path=E: --protocol=s3`

Here is the log info:

2023/01/16 17:19:41 Error occurred when getting download URL for object dg.ANV0/5188d593-cbdb-429d-b292-eed3d83fefd1
 Details of error: 401 Unauthorized error has occurred! Something went wrong during authentication, please check your configuration and/or credentials
2023/01/16 17:19:41 Error occurred when getting download URL for object dg.ANV0/429c19de-8d48-4d03-8093-008690ad6346
 Details of error: 401 Unauthorized error has occurred! Something went wrong during authentication, please check your configuration and/or credentials
2023/01/16 17:19:41 Error occurred when getting download URL for object dg.ANV0/d61ba1ac-942e-40eb-a3a6-a9dd30084708
 Details of error: 401 Unauthorized error has occurred! Something went wrong during authentication, please check your configuration and/or credentials
2023/01/16 17:19:41 Error occurred when getting download URL for object dg.ANV0/49217fc9-2a41-42a7-94b7-b475e9d2af5c
 Details of error: 401 Unauthorized error has occurred! Something went wrong during authentication, please check your configuration and/or credentials

We are sure that the credential is the newest. How can we solve this problem? Thanks.

Hi, Dawn,

Thanks for reaching out. I have a couple questions to help troubleshoot your problem.

  1. You said that you are sure your credential is "the newest." Did you check specifically to make sure it was unexpired? They often expire after a month.

  2. You said that everything was fine until about a week ago. Do you mean you have used this credential recently to download other datasets successfully, and something suddenly changed about a week ago? If so -- how recently did you successfully download from AnVIL?

Thanks!
-- Sara

Hi Sara,

Thanks for your reply. Here are the answers to the questions:

  1. Yes, I know the credentials expire after a month. When the problem occurred, we checked the credential we used at that time, but it had not expired. To exclude that it was the credential which led to the problem, we then created a new one. However, the problem still exists.

  2. It was about on 10th Jan that I started downloading the dataset, and the error occurred two or three days later, so a part of my manifest was not downloaded successfully. At that time, I thought it could be due to my computer, the server, or something else, so I did not pay attention to the issue. However, on 15th Jan, When my colleague tried to download a manifest, she found that she could not even download anything successfully on several machines, and the error shown on her computer was the same as mine. We realized the error did not disappear. Then we checked the credentials and updated a new one, but this did not change the situation. So we come here for help. Thanks.

Update:

The problem has been solved. The issue could be closed. Thanks.

1 Like

Hi, I have the same issue. My credential is updated. Could you please explain how you solved it?

Hi, the reason is that we missed an email from dbgap a month ago which remind us of the annual renewal for the account (regardless of whether your dataset expires or not), so our account could be suspended. Hope this could be helpful for you.

1 Like

@Sara_Volk_de_Garcia
Dear Sara,
I got the same error "401 Unauthorized error has occurred!". My credential is updated, I generated a new one to see if the error could be gone. But it doesn't help. I believe the downloading worked successfully about 2 weeks ago.

For some reason, our account is suspended too. I will update on this thread.

Thanks a lot!

Hi, Xiaofei!
I'm sorry to hear you're having this trouble! It sounds like you have checked that the API key is not the problem. Since the error is indicating it's an access issue, and since you report that your account is suspended, I strongly suspect your eRA login credentials have expired -- these expire annually. You can go to Commons | Home - if you try to log in and you get "Login Failed", go back to Commons | Home and click the Forgot Password/Unlock Account? link to reset your password (and possibly un-suspend your account.

If that doesn't work. you can also reach out to the dbGaP helpdesk for assistance at dbGaP: Authorized Access: dbGaP Report Form.

If none of this helps, please reach out again, either on this forum or at support@datacommons.io, and we can assist further.

Thanks!
-- Sara

Hi @Sara_Volk_de_Garcia ,

Our account is back. Now, it works well. The reason is same as @dawnyipingzou , our account was suspended for some reason.

Thank a lot!
Best,
Xiaofei