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

Avoid Guzzle 6.5.0 #5326

Closed
bramus opened this issue Dec 11, 2019 · 7 comments
Closed

Avoid Guzzle 6.5.0 #5326

bramus opened this issue Dec 11, 2019 · 7 comments

Comments

@bramus
Copy link

bramus commented Dec 11, 2019

Description

A client of mine reported that he could no longer upload photos to an S3 bucket. The upload failed with the following message:

Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46'

I tracked the issue down to Guzzle 6.5.0 which was just released. They use the constant without checking for its existence. There's an issue on their project for this: guzzle/guzzle#2448

Awaiting a new release from them, I'd recommend Craft to downgrade the included Guzzle to 6.4.1.

Users of Craft can – for now – downgrade manually by invoking:

composer require guzzlehttp/guzzle:6.4.1

To give you an idea of the scope of this issue: all CentOS 6 servers for example are affected by this.

Steps to reproduce

  1. Upgrade to latest Craft
  2. Run it on a Centos 6 server for example (or any server with an outdated libicu library)

Additional info

  • Craft version: 3.3.18 (or maybe even earlier)
  • PHP version: any
  • Plugins & versions: libicu 4.2.1
@ambidustrious
Copy link

ambidustrious commented Dec 12, 2019

More specifically - I get this error any time I attempt to install a plugin or update craft. I'm using an Apache server.

When I try to downgrade guzzle - I get this error:

Problem 1
- The requested package craftcms/cms (locked at 3.3.17, required as 3.3.18.1) is satisfiable by craftcms/cms[3.3.17] but these conflict with your requirements or minimum-stability.

@ambidustrious
Copy link

`PHP error from log file:

[10-Dec-2019 15:11:46 UTC] PHP Warning: Use of undefined constant IDNA_NONTRANSITIONAL_TO_ASCII - assumed 'IDNA_NONTRANSITIONAL_TO_ASCII' (this will throw an Error in a future version of PHP) in /home/ambidustrious/domain.com/vendor/craftcms/cms/src/web/Request.php on line 1154
[10-Dec-2019 15:11:46 UTC] PHP Warning: Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46' (this will throw an Error in a future version of PHP) in /home/ambidustrious/domain.com/vendor/craftcms/cms/src/web/Request.php on line 1154
[10-Dec-2019 15:11:46 UTC] PHP Warning: idn_to_ascii() expects parameter 2 to be integer, string given in /home/ambidustrious/domain.com/vendor/craftcms/cms/src/web/Request.php on line 1154`

@brandonkelly
Copy link
Member

brandonkelly commented Dec 12, 2019

Looks like this only affects servers with ICU < 4.6, which is pretty old, and a fix is being worked on, so expecting this will resolve itself in the next day or so, and probably not worth a Craft release.

In the meantime if you are getting bit by this, you can force Guzzle < 6.5.0 by adding this to your composer.json:

"require": {
  "guzzlehttp/guzzle": "~6.4.0",
  "...": "..."
}

Then run composer update.

Will keep this open for now and reassess in a couple days.

@ambidustrious
Copy link

Thanks Brandon - That did the trick

@brandonkelly
Copy link
Member

Not thrilled with Guzzle’s reaction time on this, so just released Craft 3.3.18.2 which explicitly excludes Guzzle 6.5.0. The fix is slated for Guzzle 6.5.1, so I’m allowing 6.5.1+ for whenever that does get released.

@bramus
Copy link
Author

bramus commented Dec 15, 2019

Thanks for the intervention @brandonkelly!

@parvizansaryan
Copy link

Description

A client of mine reported that he could no longer upload photos to an S3 bucket. The upload failed with the following message:

Use of undefined constant INTL_IDNA_VARIANT_UTS46 - assumed 'INTL_IDNA_VARIANT_UTS46'

I tracked the issue down to Guzzle 6.5.0 which was just released. They use the constant without checking for its existence. There's an issue on their project for this: guzzle/guzzle#2448

Awaiting a new release from them, I'd recommend Craft to downgrade the included Guzzle to 6.4.1.

Users of Craft can – for now – downgrade manually by invoking:

composer require guzzlehttp/guzzle:6.4.1

To give you an idea of the scope of this issue: all CentOS 6 servers for example are affected by this.

Steps to reproduce

  1. Upgrade to latest Craft
  2. Run it on a Centos 6 server for example (or any server with an outdated libicu library)

Additional info

  • Craft version: 3.3.18 (or maybe even earlier)
  • PHP version: any
  • Plugins & versions: libicu 4.2.1

worked for me laravel 5.8.35 this 2 other downgrade:
"symfony/translation": "4.3.8"
"symfony/translation-contracts": "^1.1.6"
"guzzlehttp/guzzle": "6.4.1"

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

No branches or pull requests

4 participants