mcdamo / tab-image-saver

Firefox addon to save images from open tabs
https://addons.mozilla.org/firefox/addon/tab-image-saver/
Mozilla Public License 2.0
39 stars 14 forks source link

Tracking Protection blocks downloads #48

Open 3ship opened 4 years ago

3ship commented 4 years ago

When pictures with the suffix :large are opened in separate tabs, the extension doesn't recognize them as pictures. This URL format is used for images uploaded to Twitter and shows them in their original dimensions. Removing the suffix throws out a compressed image with a max. size of 1200px

mcdamo commented 4 years ago

I do not see any problem saving twitter images, whether :large, :orig or otherwise. Please give example links where this is failing for you.

NNBR1 commented 4 years ago

Literally any picture link, with :large, or with :orig. I disabled all my addons, and the problem persists.

The URL structure is https://pbs.twimg.com/media/[filename].jpg:orig. Any URL using this will fail consistently. FF72.0.2 on Win10 x64.

mcdamo commented 4 years ago

I cannot replicate this using current tab-image-saver v2.5.6 with default addon settings.

.jpg:large or .jpg:orig images are saved with *.jpg filenames.

NNBR1 commented 4 years ago

I am using 2.5.6 with default settings (delete/reinstall addon). Immediately, I get a "Failed downloads: 1".

I was using this random picture as a test, refreshing all tabs inbetween attempts. https://pbs.twimg.com/media/EQdGtfmWsAM6KwW.jpg:orig Any other non-twitter picture seems to work. Same behaviour in a clean profile.

Anotación 2020-02-11 030648 Anotación 2020-02-11 030632

What can I do to provide you a log or see any kind of error, or anything I could do to give some sort of report? I'm unable to find what can I do to give any more info on this error.

mcdamo commented 4 years ago

@NNBR1 the debug console might have some useful information.

  1. Go to Firefox > Addons menu
  2. Next to Manage Your Extensions click the Cog button and select Debug addons
  3. Scroll down to Tab Image Saver and click Inspect This will open the debug console.

Now run the addon on your image and the output might be something like:

> GET https://pbs.twimg.com/media/EQdGtfmWsAM6KwW.jpg:orig   [HTTP/1.1 200 Connection established 6208ms]

imagesFailed > Map { "https://pbs.twimg.com/media/EQdGtfmWsAM6KwW.jpg:orig" → "EQdGtfmWsAM6KwW.jpg" }

If the GET did not succeed then there may be more information by expanding it down.

eduard93 commented 4 years ago

Got the same issue, turned out it's because of the tracking protection: image

Disabled tracking protection: image

And the extension now works.

Is it possible to catch that from extension? A more user-friendly error message (please disable tracking protection) could help.

mcdamo commented 4 years ago

Yes, setting tracking protection to Strict I can get this error.

The error returned to the extension appears as general network failure so it can't detect when this issue is the cause of download failures.

I will add some info to the extension for users reduce or disable the level of tracking protection.

mcdamo commented 4 years ago

Unfortunately it appears Firefox is not planning to provide any solution for this, other extensions are having the same problem:

NNBR1 commented 4 years ago

Weeeeell. At least the culprit has been found, and if it's up to Firefox to (not) solve, then I guess case closed. In case someone else finds this error, maybe a warning on the configuration page of the addon, like "try disabling tracking protection if some downloads, like Twitter, fail" would be fine, and that's about as much as can be done about it.