Jdhaimson / smilealways

Chrome Extension to redirect www.amazon.com to smile.amazon.com
www.smilealways.io
GNU General Public License v2.0
146 stars 32 forks source link

Chrome displays error if HTTPS Anywhere redirects first #27

Closed drewbrew closed 7 years ago

drewbrew commented 8 years ago

Scenario

Chrome Stable (51.0.2704.106 (64-bit)) on El Capitan (mid-2014 MacBook Pro) HTTPS Everywhere and SmileAlways both installed.

Action

Click on http://www.amazon.com/gp/goldbox/?ie=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=hombrefin-20 (from http://www.homebrewfinds.com/2016/07/enrose-corkscrew-and-bottle-opener-coming-up-on-lightning-deals.html).

Expected behavior

Get redirected to smile.amazon.com loading the proper page.

Actual behavior

The redirect still works, but the hamburger menu in Chrome turns orange, and the prompt reads 'Extension error'. Scrolling down the list reveals this pink error box in the SmileAlways entry:

Warning:
This extension failed to redirect a network request to http://smile.amazon.com/gp/goldbox/?ie=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=hombrefin-20&sa-no-redirect=1 because another extension (HTTPS Everywhere) redirected it to https://www.amazon.com/gp/goldbox/?ie=UTF8&camp=1789&creative=390957&linkCode=ur2&tag=hombrefin-20.

The redirect still works, so it's not terrible, but this edge case shouldn't be an error.

davidstrauss commented 8 years ago

This is affecting me, too. The solution is to have Smile Always become Smile HTTPS Always. ;-) More seriously, it just needs to redirect to the https://smile.amazon.com/ URL, even if the original URL was http://.

mikeyroy commented 8 years ago

It's unfortunate that Chrome has started to surface this conflict even though everything still works as expected.

I think it is desirable to have the default behavior be to redirect to https as the standard behavior.

I created a PR that enables this behavior. If the original dev chooses to accept it, great, if not you can always get the code from my forked version of this repo and load the extension up as an unpacked developer extension.

mikeyroy commented 8 years ago

The problem still exists with this change, albeit much less frequently.

To fix this permanently, disable the Smile extension then navigate to http://www.amazon.com then left click on the HTTPS Everywhere icon and uncheck the box for Amazon.com to be force-encrypted. Amazon.com redirects itself to https. Then re-enable the Smile extension and this issue should go away.

bbodenmiller commented 7 years ago

I've implemented a fix at https://github.com/Jdhaimson/smilealways/issues/30 but I'm not sure when this extensions author may get a chance to merge and publish.