Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object of class GuzzleHttp\Psr7\Response could not be converted to string #2242

Closed
mplodowski opened this issue Jul 25, 2016 · 11 comments
Closed

Comments

@mplodowski
Copy link
Contributor

Expected behavior

After sending an email with Mailgun I get successfull flash message.

Actual behavior

After sending an email with Mailgun I get exception:

Object of class GuzzleHttp\Psr7\Response could not be converted to string

Reproduce steps
  1. Install October.Drivers Plugin.
  2. Configure Mail Settings to use Mailgun driver.
  3. Send test email.
October build

350, PHP 7

@daftspunk
Copy link
Member

Unable to replicate, getting error:

Client error: POST https://api.mailgun.net/v3/sdfasdf/messages.mime resulted in a 401 UNAUTHORIZED response: Forbidden

Can you confirm, with invalid details entered do you get the same error?

@mplodowski
Copy link
Contributor Author

When I change domain to rubbish I got the same response as you do.

When I return to correct credentials I got:

Object of class GuzzleHttp\Psr7\Response could not be converted to string

The mail is delivered even with this error.

Maybe what I should mention earlier, I use composer base project and I received following warning on composer update:

Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.

Both libraries are downloaded by composer.

@daftspunk
Copy link
Member

Interesting, we don't seem to include that package anywhere. Can you please email some valid credentials to sam [at] daftspunk.com for testing.

@mplodowski
Copy link
Contributor Author

After further investigation I noticed that guzzle/guzzle is downloaded from this package:

"league/flysystem-rackspace": "~1.0",

When I remove this line and run composer update guzzle/guzzle is removed. I done this in plugin directory and for the main directory but this still does not solve the issue.

I sent you credentials for testing.

@daftspunk
Copy link
Member

Thanks, will take a look soon!

@abass
Copy link

abass commented Aug 22, 2016

I have been getting this for a very long time now. Has made so many contact plugins unusable and I am very frustrated. @daftspunk thank you SO MUCH for looking into this, this is literally the ONLY frustration I have been having with October. Luckily the contact form still sends but the error pops up. My clients haven't called me out on it yet thankfully.

You're the best! (:

Here is the exact error:

IMG

@daftspunk
Copy link
Member

I'm still not getting this error, even with the Mailgun credentials provided by @mplodowski. Can you please specify what plugins you have installed? It could be creating a conflict. Also make sure you have the latest October.Drivers plugin installed (try reinstalling it).

Replication steps

  1. Open backend area
  2. Using Mailgun mail driver
  3. Navigate to Mail templates
  4. Open a template
  5. Click send test message
  6. Message has been sent successfully

@abass
Copy link

abass commented Sep 5, 2016

@daftspunk unbelievable! It was the Mail States & Logger plugin - Just disabled that and the error message went away!

What a shame, really enjoyed being able to view additional stats with the plugin. I guess this is what happens when plugins get abandoned though.

Sorry to be an inconvenience Samuel! This is the second time I have encountered a 3rd party plugin causing major errors to October where it wasn't at all apparent. Damn 😢 is there any way to make error messages like that also echo back what plugin author it is coming from? That would prevent things like this in the future?

@daftspunk
Copy link
Member

Maybe you can ask the author to update their plugin, because it uses an old version of Guzzle. It should be simple as rebuilding it, I think.

@abass
Copy link

abass commented Sep 6, 2016

I just left an issue on their repo referencing this issue. Appreciate the quick response!

@MatissJanis
Copy link
Contributor

Hello

Thank You for letting me know about this issue! It has now been fixed on my end. Here's the exact commit if You're interested.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants