mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.96k stars 975 forks source link

DeviantArt Invaild Error, part 3 #6485

Open Jay123210599 opened 3 days ago

Jay123210599 commented 3 days ago

I'm still stuck on this problem. Anyone found a solution yet.

Here is my verbose log:

Command used: gallery-dl -o group=0 https://www.deviantart.com/axel-rosered

gallery-dl: Version 1.27.7 - Executable (stable/windows)
gallery-dl: Python 3.8.10 - Windows-10-10.0.26100
gallery-dl: requests 2.32.3 - urllib3 2.2.3
gallery-dl: Configuration Files ['%USERPROFILE%\\gallery-dl.conf', 'C:\\Users\\Jalen\\Downloads\\gallery-dl.conf']
gallery-dl: Starting DownloadJob for 'https://www.deviantart.com/axel-rosered'
deviantart: Using DeviantartUserExtractor for 'https://www.deviantart.com/axel-rosered'
deviantart: Sleeping 1.00 seconds (extractor)
deviantart: Using DeviantartGalleryExtractor for 'https://www.deviantart.com/axel-rosered/gallery'
deviantart: Using custom API credentials (client-id 40463)
deviantart: Sleeping 1.00 seconds (extractor)
deviantart: Requesting public access token
urllib3.connectionpool: Starting new HTTPS connection (1): www.deviantart.com:443
urllib3.connectionpool: https://www.deviantart.com:443 "POST /oauth2/token HTTP/11" 200 128
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/user/profile/axel-rosered HTTP/11" 200 1379
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/gallery/all?username=Axel-Rosered&offset=0&limit=24&mature_content=true HTTP/11" 200 None
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/metadata?deviationids%5B0%5D=0C9F416F-0816-9341-7C1E-D6C18476940F&deviationids%5B1%5D=DDCED93D-D4DD-F3EC-62F6-6C53A823ED4E&deviationids%5B2%5D=A48437DC-6B91-DAB6-16E0-3940B3EE565F&deviationids%5B3%5D=FB704F85-D9A6-06A4-7D6A-76145D219AD6&deviationids%5B4%5D=87920E57-8B6E-2F5E-5E18-93A136A7FA4D&deviationids%5B5%5D=D6AF8602-2BA1-A2E6-824F-5B46FB3A5EA1&deviationids%5B6%5D=F1E44689-6750-ECA5-243D-23934B223ABB&deviationids%5B7%5D=FAA236C9-5EE7-E1BC-6D0B-FD753137282E&deviationids%5B8%5D=8DC8FF2A-004B-6D5D-1195-E64FD18C6B6E&deviationids%5B9%5D=9C118CE4-BD6F-A51F-90D5-48515936D87B&deviationids%5B10%5D=56381C8E-16DB-CD60-0F95-93D3F2F383B8&deviationids%5B11%5D=7FC6D3F4-6172-7669-E404-177B3B3739BF&deviationids%5B12%5D=DFEC95B9-FBC7-3185-1677-69FAC82645D1&deviationids%5B13%5D=D88FC6E3-3580-B17D-12F7-65E54C2A5484&deviationids%5B14%5D=C4B48E5E-39A8-0CD7-57A5-CCAF538E749A&deviationids%5B15%5D=4BEB83FC-4E5B-1D4D-347B-1EB09AABD956&deviationids%5B16%5D=905490B8-C7BB-B5EF-A7CF-7AB3520F6F39&deviationids%5B17%5D=C3CFCC7A-E42B-558D-5000-355F29C213D7&deviationids%5B18%5D=C57CECBD-8F2E-A779-1E85-E9ED9C626BB0&deviationids%5B19%5D=54CCE0F5-8976-C663-ED76-012D0C61F44C&deviationids%5B20%5D=14B74F8C-7300-6FEE-B9C1-1443EBDD501D&deviationids%5B21%5D=A5D98B64-5A2A-7381-72B6-5A1A0E126454&deviationids%5B22%5D=D6A04E66-7CAB-4A42-B493-54FD133EE1A1&deviationids%5B23%5D=0DA5D3DD-49CE-4A09-DEB3-94C8286A8AD0&mature_content=true HTTP/11" 200 4262
deviantart: Using download archive 'C:\Users\Jalen/gallery-dl/archive.sqlite3'
deviantart: Active postprocessor modules: [MetadataPP]
deviantart: Sleeping 0.99 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/0C9F416F-0816-9341-7C1E-D6C18476940F?mature_content=true HTTP/11" 200 617
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\deviantart_1121338024_Pack Preview - Totally Stuffed (1).png
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/DDCED93D-D4DD-F3EC-62F6-6C53A823ED4E?mature_content=true HTTP/11" 200 620
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\deviantart_1121332984_Last Week on Patreon - November 4-9, 2024.png
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/A48437DC-6B91-DAB6-16E0-3940B3EE565F?mature_content=true HTTP/11" 200 604
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\deviantart_1118177931_Go Outside and Play.png
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/FB704F85-D9A6-06A4-7D6A-76145D219AD6?mature_content=true HTTP/11" 200 603
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\deviantart_1119762885_Totally Stuffed!.png
deviantart: Refreshing private access token
deviantart: Sleeping 0.99 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "POST /oauth2/token HTTP/11" 400 97
deviantart: Server response: {'error': 'invalid_request', 'error_description': 'The refresh_token is invalid.', 'status': 'error'}
deviantart: AuthenticationError: "The refresh_token is invalid." (invalid_request)
deviantart:
Traceback (most recent call last):
  File "gallery_dl\job.pyc", line 151, in run
  File "gallery_dl\extractor\deviantart.pyc", line 152, in items
  File "gallery_dl\extractor\deviantart.pyc", line 698, in _fetch_premium
  File "gallery_dl\extractor\deviantart.pyc", line 1416, in deviation
  File "gallery_dl\extractor\deviantart.pyc", line 1582, in _call
  File "gallery_dl\extractor\deviantart.pyc", line 1542, in authenticate
  File "gallery_dl\cache.pyc", line 115, in __call__
  File "gallery_dl\extractor\deviantart.pyc", line 1563, in _authenticate_impl
gallery_dl.exception.AuthenticationError: "The refresh_token is invalid." (invalid_request)
deviantart: Using DeviantartScrapsExtractor for 'https://www.deviantart.com/axel-rosered/gallery/scraps'
deviantart: Using custom API credentials (client-id 40463)
deviantart: Sleeping 1.00 seconds (extractor)
urllib3.connectionpool: https://www.deviantart.com:443 "GET / HTTP/11" 200 None
deviantart: Sleeping 1.99 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /_puppy/dashared/gallection/contents?username=Axel-Rosered&type=gallery&offset=0&limit=24&scraps_folder=true&csrf_token=c1SvzZ84HaHoDl_1.smvhme.0V2PdMCQQ_I6zSm0Lwc1XqZN0g_ZvCLemMc2PIZIduE HTTP/11" 200 None
deviantart: Sleeping 2.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /_puppy/dadeviation/init?deviationid=393457731&username=Axel-Rosered&type=art&include_session=false&expand=deviation.related&da_minor_version=20230710&csrf_token=c1SvzZ84HaHoDl_1.smvhme.0V2PdMCQQ_I6zSm0Lwc1XqZN0g_ZvCLemMc2PIZIduE HTTP/11" 200 None
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/B3ACC99E-90E2-35F0-DD54-D89111AFD3D4 HTTP/11" 200 1076
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/metadata?deviationids%5B0%5D=B3ACC99E-90E2-35F0-DD54-D89111AFD3D4&mature_content=true HTTP/11" 200 722
deviantart: Using download archive 'C:\Users\Jalen/gallery-dl/archive.sqlite3'
deviantart: Active postprocessor modules: [MetadataPP]
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/B3ACC99E-90E2-35F0-DD54-D89111AFD3D4?mature_content=true HTTP/11" 200 607
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\Scraps\deviantart_393457731_Old vs New Popful Mail.png
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /_puppy/dadeviation/init?deviationid=392945935&username=Axel-Rosered&type=art&include_session=false&expand=deviation.related&da_minor_version=20230710&csrf_token=c1SvzZ84HaHoDl_1.smvhme.0V2PdMCQQ_I6zSm0Lwc1XqZN0g_ZvCLemMc2PIZIduE HTTP/11" 200 None
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/FC72525C-B9A5-7868-15FD-83F9D8A0C3CC HTTP/11" 200 1222
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/metadata?deviationids%5B0%5D=FC72525C-B9A5-7868-15FD-83F9D8A0C3CC&mature_content=true HTTP/11" 200 768
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/download/FC72525C-B9A5-7868-15FD-83F9D8A0C3CC?mature_content=true HTTP/11" 200 602
C:\Users\Jalen\gallery-dl\deviantart\Axel-Rosered\Scraps\deviantart_392945935_Old vs new Mii.png
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /_puppy/dadeviation/init?deviationid=312859903&username=Axel-Rosered&type=art&include_session=false&expand=deviation.related&da_minor_version=20230710&csrf_token=c1SvzZ84HaHoDl_1.smvhme.0V2PdMCQQ_I6zSm0Lwc1XqZN0g_ZvCLemMc2PIZIduE HTTP/11" 200 None
deviantart: Sleeping 0.99 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "GET /api/v1/oauth2/deviation/E5A685BB-79B5-63F3-14FC-E7211FF403FF HTTP/11" 200 1225
deviantart: Refreshing private access token
deviantart: Sleeping 1.00 seconds (request)
urllib3.connectionpool: https://www.deviantart.com:443 "POST /oauth2/token HTTP/11" 400 97
deviantart: Server response: {'error': 'invalid_request', 'error_description': 'The refresh_token is invalid.', 'status': 'error'}
deviantart: AuthenticationError: "The refresh_token is invalid." (invalid_request)
deviantart:
Traceback (most recent call last):
  File "gallery_dl\job.pyc", line 151, in run
  File "gallery_dl\extractor\deviantart.pyc", line 132, in items
  File "gallery_dl\extractor\deviantart.pyc", line 761, in _eclipse_to_oauth
  File "gallery_dl\extractor\deviantart.pyc", line 1419, in deviation
  File "gallery_dl\extractor\deviantart.pyc", line 1582, in _call
  File "gallery_dl\extractor\deviantart.pyc", line 1542, in authenticate
  File "gallery_dl\cache.pyc", line 115, in __call__
  File "gallery_dl\extractor\deviantart.pyc", line 1563, in _authenticate_impl
gallery_dl.exception.AuthenticationError: "The refresh_token is invalid." (invalid_request)
Hrxn commented 2 days ago

Okay, this is a useful log.. But I don't get why you open a new issue for this, this is still the same error as in #6450, no?

First of all, you could always try if the error also appears with the latest dev version (gallery-dl --update-to dev should to the trick if you're using the standalone binary), but I can't think of anything related to dA between this release version and now..

There's nothing that would spring to my mind immediately in your log here, because it's basically working, and then it's suddenly not anymore (you get a HTTP 400 Bad Request), alleging some issue with the refresh token, but at the beginning of extraction the token seems to work, though. I don't get it yet.

mikf commented 2 days ago

Get a new refresh token with gallery-dl oauth:deviantart since your current one has become invalid.


alleging some issue with the refresh token, but at the beginning of extraction the token seems to work, though. I don't get it yet.

It is using a public token in the beginning. The error occurs only when it attempts the "Refreshing private access token" step, which needs a valid refresh token.

Jay123210599 commented 2 days ago

Get a new refresh token with gallery-dl oauth:deviantart since your current one has become invalid.

I already tried that, it doesn't work.

MalchiorDagon commented 1 day ago

As someone that had this issue, what I did was:

  1. Delete my current deviantart auth application
  2. Create a new one
  3. Cleared my access tokens with gallery-dl --clear-cache deviantart
  4. gallery-dl oauth:deviantart
  5. At that point, it told me to put that in my config file under extractor.deviantart.refresh-token, so that was the biggest new thing I had to add, before it was just refresh-token
Jay123210599 commented 23 hours ago

I did steps 1-3, but when I did step 4, it uses my old application with my old client_id and client_secret instead of my new ones.

Hrxn commented 23 hours ago

Please check the output of gallery-dl --config-status, something seems messed up with your config.

Jay123210599 commented 18 hours ago

The config.json is not present. How do I fix that?

Hrxn commented 16 hours ago

gallery-dl --config-create

Jay123210599 commented 12 hours ago

It said config: There is already a configuration file at 'C:\Users\User\gallery-dl.conf'