Ezwen / bandcamp-collection-downloader

A command-line tool to automatically download all releases purchased with a Bandcamp account. The official page of the project is https://framagit.org/Ezwen/bandcamp-collection-downloader, while here this is just a mirror hosted on Github.
GNU Affero General Public License v3.0
239 stars 23 forks source link

Could not connect to the Bandcamp API with the provided cookies. (on Mac) #48

Open dimipiraat opened 7 months ago

dimipiraat commented 7 months ago

When i try download my Bandcamp collection I get this error:

Connecting to Bandcamp…                                                                                                           
Cookies from /Users/dimitridhuyvetter/Downloads/cookies.json did not work.                                                        
ERROR: Could not connect to the Bandcamp API with the provided cookies.

I have downloaded the session cookie from the Bandcamp website while logged in, I'm using Firefox and the Cookie Quick Manager.

I assume it's the session cookie I need?

Ezwen commented 7 months ago

Hi! I haven't used the cookies file feature in a while, but if I remember right what I usually did was to export all cookies related to a given domain. Can you try that?

dimipiraat commented 7 months ago

Hi! I didn’t see an option for that on the Firefox plugin. I’ll research further to see if/how I can do that. On Mon, Dec 4, 2023 at 05:45, Ezwen @.***> wrote:
Hi! I haven't used the cookies file feature in a while, but if I remember right what I usually did was to export all cookies related to a given domain. Can you try that?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

khannajai commented 4 months ago

Facing the same issue. Was working fine until recently. Tried re-exporting the cookies file, but still fails.

Error while trying: "org.jsoup.HttpStatusException: HTTP error fetching URL. Status=429, URL=[https://bandcamp.com/api/fancollection/1/collection_items]".
Cookies from /Users/jai.khanna/cookies.json did not work.
ERROR: Could not connect to the Bandcamp API with the provided cookies.
karlreingit commented 3 weeks ago

Facing the same issue. Was working fine until recently. Tried re-exporting the cookies file, but still fails.

Error while trying: "org.jsoup.HttpStatusException: HTTP error fetching URL. Status=429, URL=[https://bandcamp.com/api/fancollection/1/collection_items]".
Cookies from /Users/jai.khanna/cookies.json did not work.
ERROR: Could not connect to the Bandcamp API with the provided cookies.

I've been seeing the 429 HTTP error shown above for about six months now. HTTP 429 is defined as "Too Many Requests".

I'm able to eventually succeed by waiting a while and then retrying. It's irritating but eventually I get through.

The strange thing here is getting an HTTP 429 on the very first request - which by definition should not be "too many", but I admit that I have not debugged into Jsoup.connect, so I don't know if there is something under the hood here that is issuing numerous requests.

I did try increasing the timeout and the time between retries but it did not seem to resolve the issue.

I suppose one possibility is that it is not user-specific and that the API is being throttled generally for everyone.

It might be interesting to check for a Retry-After header in the 429 and see what it shows.

Also, I believe this user on reddit is hitting same issue: https://www.reddit.com/r/commandline/comments/kd7m61/bulk_download_your_bandcamp_purchases_with_the_cli/kqyqy0j/

This is discouraging and frustrating and definitely affecting a few of us. I'm fairly certain the "cookies did not work" error is not the root cause but the real issue is the 429.

thegass commented 5 days ago

i have the same problem. maybe bandcamp did change something on their side.