awesomemotive / WP-Mail-SMTP

The most popular WordPress SMTP and PHP Mailer plugin. Trusted by over 3 million sites.
https://wordpress.org/plugins/wp-mail-smtp/
GNU General Public License v3.0
55 stars 34 forks source link

Authorization header format is invalid #135

Open crossmr opened 2 months ago

crossmr commented 2 months ago

Expected Behavior

I expect the WP Mail SMTP plugin to connect to my google account.

Current Behavior

After clicking authorise, it does not connect. I select the google account, click allow and am immediately presented with an empty white screen that says " Authorization header format is invalid" it is unclear if this error is because of an issue coming from google or an issue with the way the plugin is processing the response.

Steps to Reproduce

  1. I had a default install of WP Mail SMTP included in the template I have. It appears to have a default configuration
  2. I followed the instructions for setting up gmail connection, I verified both the text and video example
  3. after getting to the point of connecting to the gmail account press the button and hit allow

Screenshots

https://i.imgur.com/gqPtRf7.png

crossmr commented 2 months ago

As an aside, I just tried completely deleting the plugin and reinstalling it. Same behaviour. This is version 4.0.1 Wordpress 6.4.4

capuderg commented 2 months ago

Hi @crossmr,

are you trying to set up our "One-Click Setup" approach for the Gmail mailer (available in our Pro plugin), or did you create your own Gmail App and inputted the "Client ID" and "Client Secret" in our plugin settings?

Judging from the screenshot, I think another plugin that also handles Google authorization is interfering and causing issues. Could you please try to disable other plugins that have that feature and try the authorization process again?

crossmr commented 2 months ago

Hello,

I've created my own app. I don't believe we're using another plugin that handles Google Authorization. We are using a plugin to connect our Login to AWS Cognito. We have 17 active plugins could you let me know if you recognise any that WP Mail SMTP might conflict with:

Activity Log Advanced Custom Fields PRO Contact Form 7 Elementor Elementor Pro Jetpack OAuthClient Loing for Wordpress OAuth Single Sign on - SSO (OAuth Client) Payment Plugins for Stripe WooCommerce Sales Report for WooCommerce Tinja Toolkit WooCommerce WooCommerce Shipping & Tax WooPayments WP Fil Manager (mndpsing287) WP Super Cache (Automattic)

capuderg commented 2 months ago

The two that stand out and could be the culprits are:

OAuthClient Loing for Wordpress OAuth Single Sign on - SSO (OAuth Client)

If you can temporary disable them and try the Gmail auth in our plugin again. If it goes through, you can re-enable them and them send a test email just to be sure it works OK.

Let me know how it goes.

crossmr commented 2 months ago

Apparently I can't disable the first. Every time I do, it claims the site has encountered a critical error and then the plugin stays enabled. I will contact the creator of that plugin. If this turns out to be the issue, I'll report back and this information can be included in your troubleshooting documentation.

capuderg commented 2 months ago

OK, thank you!

Please share any updates about this issue when you can.