gatsby-plugin-mailchimp icon indicating copy to clipboard operation
gatsby-plugin-mailchimp copied to clipboard

Submission error in Brave browser

Open fengtality opened this issue 6 years ago • 11 comments

When testing the v2 example in the Brave browser (https://brave.com/), the plugin throws an error upon submission rather than returning the Mailchimp response:

err Error: Timeout
    at index.js:63 

index.js is /node_modules/jsonp/index.js

fengtality avatar Mar 13 '19 01:03 fengtality

this is usually the result of:

  • invalid or missing mailchimp endpoint
  • captcha enabled
  • ad blockers

can you confirm it's non of the above? thx

benjaminhoffman avatar May 01 '19 22:05 benjaminhoffman

This is definitely an issue with the Brave browser, which aggressively blocks external API calls as part of their ad blocking. Others have reported similar issues. https://community.brave.com/t/mailchimp-website-widget-unresponsive-to-submit-button/12788

We added some (hacky) JS to detect when the error occurs and tell users to change their Brave browser setting:

      if (err.message === 'Timeout') {
        this.setState({
          braveWarning: 'Looks like you are using Brave browser - please click the shield icon and toggle off "Ads and trackers blocked", then re-submit your email.'
        })
      }
Screen Shot 2019-05-01 at 4 10 25 PM

fengtality avatar May 01 '19 23:05 fengtality

This issue happens with firefox too, but if you embed the mailchimp form it doesnt have the issue

ghost avatar Aug 08 '19 01:08 ghost

I've consolidated a few issues, including this one, into #48. If someone wants to open a PR of @mifeng's (temporary) solution, that would be helpful! If not, I'm happy to do so within a month or so.

benjaminhoffman avatar Aug 31 '19 20:08 benjaminhoffman

This is definitely an issue with the Brave browser, which aggressively blocks external API calls as part of their ad blocking. Others have reported similar issues. https://community.brave.com/t/mailchimp-website-widget-unresponsive-to-submit-button/12788

We added some (hacky) JS to detect when the error occurs and tell users to change their Brave browser setting:

      if (err.message === 'Timeout') {
        this.setState({
          braveWarning: 'Looks like you are using Brave browser - please click the shield icon and toggle off "Ads and trackers blocked", then re-submit your email.'
        })
      }
Screen Shot 2019-05-01 at 4 10 25 PM

Hey @mifeng,

Where did you add this?

This could be easily changed into something generic like

      if (err.message === 'Timeout') {
        this.setState({
          warning: 'Looks like your browser is blocking this. Try to disable any tracker-blocking feature and resubmit.'
        })
      }

I feel this would be doing the trick for most of the users out there and avoid people leaving because it appears broken?

Thanks for your help!

jpvalery avatar Sep 05 '19 01:09 jpvalery

@benjaminhoffman is this still on your radar?

jpvalery avatar Jan 18 '20 15:01 jpvalery

yes! so sorry. just been super swamped. let me see if i can get to it this weekend, but at worst, i will do before feb.

benjaminhoffman avatar Jan 18 '20 19:01 benjaminhoffman

No worries, totally understand :) Let me know if I can be of any help

jpvalery avatar Jan 20 '20 13:01 jpvalery

@benjaminhoffman did you check the calendar? :P

ghost avatar Feb 02 '20 06:02 ghost

@LittleHamster fastest way to get this solved is by opening a PR! :) will do my best to get to it but got a million other things going on too.

benjaminhoffman avatar Feb 02 '20 17:02 benjaminhoffman

@benjaminhoffman yeah no worries, just wanted to follow up. I am not sure how I can help except the info I shared here https://github.com/benjaminhoffman/gatsby-plugin-mailchimp/issues/45

right now I am just embeding the code directly

ghost avatar Feb 02 '20 18:02 ghost