Danbooru

[DeviantArt] Error when batch uploading

Posted under Bugs & Features

I can't upload art from deviantart. When I click in "fetch" I get this error:

"
failed to fetch page (got code 403)

Details
RuntimeError exception raised
app/logical/sources/strategies/deviant_art.rb:277:in `page'
app/logical/sources/strategies/deviant_art.rb:285:in `uuid'
app/logical/sources/strategies/deviant_art.rb:308:in `api_deviation'
app/logical/sources/strategies/deviant_art.rb:107:in `image_url'
app/logical/sources/strategies/deviant_art.rb:102:in `image_urls'
app/views/uploads/batch.html.erb:15
app/controllers/application_controller.rb:42:in `respond_with'
app/controllers/uploads_controller.rb:18:in `batch'
"

It only occurs on Deviantart as I can still make batch uploads from other sources like Twitter and Pixiv just fine.

Updated by evazion

Their developer page contain basic information only.

403 Errors
If you recieve 403 errors that contain an HTML response rather than JSON, please ensure your client is sending a User Agent header and using HTTP compression for the request, we reject any requests not meeting this requirement.

https://www.deviantart.com/developers/errors

If the blocking is not related to this, then it is worth considering temporarily disabling the processing of requests to this site.

"Similar" button requests with status 500
var klass = "RuntimeError";
var message = "failed to fetch page (got code 403)";
var backtrace = ["app/logical/sources/strategies/deviant_art.rb:277:in `page'","app/logical/sources/strategies/deviant_art.rb:285:in `uuid'","app/logical/sources/strategies/deviant_art.rb:308:in `api_deviation'","app/logical/sources/strategies/deviant_art.rb:107:in `image_url'","app/logical/sources/strategies/base.rb:346:in `to_h'","app/controllers/sources_controller.rb:7:in `show'"];

  console.error(klass, message, backtrace);
  Danbooru.Utility.error(message);
var klass = "RuntimeError";
var message = "failed to fetch page (got code 403)";
var backtrace = ["app/logical/sources/strategies/deviant_art.rb:277:in `page'","app/logical/sources/strategies/deviant_art.rb:285:in `uuid'","app/logical/sources/strategies/deviant_art.rb:308:in `api_deviation'","app/logical/sources/strategies/deviant_art.rb:107:in `image_url'","app/logical/sources/strategies/deviant_art.rb:102:in `image_urls'","app/logical/sources/strategies/base.rb:151:in `preview_urls'","app/logical/sources/strategies/base.rb:155:in `preview_url'","app/logical/iqdb_proxy.rb:16:in `download'","app/logical/iqdb_proxy.rb:30:in `search'","app/controllers/iqdb_queries_controller.rb:8:in `show'"];

  console.error(klass, message, backtrace);
  Danbooru.Utility.error(message);

Looks like it's working again. The problem was that they were blocking pretty much all cloud server IPs for a period of time, so we couldn't fetch posts without using a residential proxy to hide our IP address.

Dolmatov said:

Their developer page contain basic information only.

https://www.deviantart.com/developers/errors

If the blocking is not related to this, then it is worth considering temporarily disabling the processing of requests to this site.

The problem was to make an API call like this:

We have to fetch this first:

To get the post's UUID (56428A64-ACDF-EFE1-9D79-5C0F551F2990). But fetching that URL returned a 403 error when using a cloud server IP, so we couldn't get the UUID to make the API call.

1