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

Fatal error: Uncaught League\Uri\PublicSuffix\Exception #15

Closed
erichuang2015 opened this issue Jan 9, 2019 · 8 comments
Closed

Fatal error: Uncaught League\Uri\PublicSuffix\Exception #15

erichuang2015 opened this issue Jan 9, 2019 · 8 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@erichuang2015
Copy link

#13 #8

I think this issue is related to the league/uri-components version.

When command composer require mallardduck/whois-client , it will get the version 1.8.2, but actually the lower version 1.7.1 works well.

so could you please fix this version from composer ?

@mallardduck
Copy link
Owner

I recall we discussed this already in #13 as well, however when I provided you with debugging steps I didn't get any feedback. If you can find a solution for this I'd be more than happy to accept a PR that fixes this.

At this point though I believe this is not an issue I can resolve because a) it's in an upstream dependency, b) I have never been able to recreate it to debug it myself, and c) it could also be a system environment issue.

@mallardduck mallardduck added the duplicate This issue or pull request already exists label Jan 9, 2019
@erichuang2015
Copy link
Author

could you please kindly tell me your current os and php version to work well with this whois-client, I try many times online with my centos 7 and php7.2, these errors reproduce for me

@mallardduck
Copy link
Owner

I have successfully used this in the following setups:

  • Arch Linux
    • PHP 5.6 (no longer supported tho)
    • PHP 7.0 (same)
    • PHP 7.1
    • PHP 7.2
    • PHP 7.3
  • Ubuntu
    • PHP 7.1
    • PHP 7.2
  • CentOS 7 (WHM & cPanel)
    • PHP 7.0 (no longer supported)
    • PHP 7.1
    • PHP 7.2

@mallardduck
Copy link
Owner

Also, the repo has automated testing running on Ubuntu Trusty with 7.1 and 7.2 and includes full code coverage. You can review the commit history and dive into Scrutinizer, Coveralls, or even Codecov.

@mallardduck
Copy link
Owner

@erichuang2015 Have you made any progress in debugging the issue on your end?

If you do believe the issue is related to the version change for league/uri-components, then it's likely that if there is a bug then it's in that package (or one of it's dependencies).

However, the specific package throwing the Exception you're seeing is actually thephpleague/uri-hostname-parser, who's version used doesn't change at all in uri-components from 1.7.1 to 1.8.1 - so I find it highly unlikely that the issue is related to this version change.

@mallardduck
Copy link
Owner

Closing due to inactivity.

@Ascerta
Copy link

Ascerta commented Jun 3, 2019

For reference I believe this is a permissions problem. thephpleague/uri-hostname-parser tries to write a cache file in your vendor directory. Specifically uri-hostname-parser/data by default. When it can't write to the directory it throws the misleading exception about not being able to get the SuffixList.

@mallardduck
Copy link
Owner

@Ascerta Thank you for the insight - that certainly seems to be a reasonable explanation. Looking over things further that makes a lot more sense too. Maybe someone can push a PR to thephpleague to update the Exception message to be more clear.

It should really say 'unable to refresh', instead of 'unable to load' - as the Exception will be thrown due to network errors, disk errors, and permission errors. Or even better maybe instead of returning false on permission issues their FileCache could throw an exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants