IsThereAnyDeal / IsThereAnyDeal-Issues

16 stars 0 forks source link

Waitlist Import via Form stopped working #1813

Open tfedor opened 3 years ago

tfedor commented 3 years ago

Just to be clear, this is not about the direct import via API, but import via form: https://itad.docs.apiary.io/#reference/waitlist/import-via-form

This used to work a couple of months ago, but not anymore. The example in the documentation does not work, it leads to the site displaying a 500 Internal Server Error message.

Example cURL:

curl --location --request POST 'https://isthereanydeal.com/waitlist/import/' \
--form 'file=ew0KICAgICJ2ZXJzaW9uIjogIjAyIiwNCiAgICAiZGF0YSI6IFsNCiAgICAgICAgeyJ0aXRsZSI6ICJPeHlnZW4gTm90IEluY2x1ZGVkIn0NCiAgICBdDQp9' \
--form 'upload=Import+Waitlist'

Leads to:

A while ago I created a script to upload followed games on Steam to a ITAD waitlist, which relies on this feature to work. (https://steamhunters.com/tools#steam-wishlist-exporter)

[Issue created by Rudey: 2020-08-27]

sonofevil commented 3 years ago

This still happens, but only for large backups. Reproduced with json containing 255 game entries. Not reproducible with json containing 121 entries.

sonofevil commented 3 years ago

Hmm, now I'm getting error 500 with a 98 entry json file. I now have 246 games in my collection, so perhaps the cause for the error is the resulting size of the collection (>255) rather than the size of the import. (The 255 entry json import would have pushed it to 257.)

Edit: I have 258 games in my collection and if I try importing a 10 entry file, I get error 500, but not with a 5 entry file.

Edit2: Nope, it turns out it was because one of the entries had an invalid "Type" value, and it had nothing to do with size. I could import everything without problem after fixing those entries. It looks like this issue is resolved.