Closed ekinhbayar closed 7 years ago
@ekinhbayar Probably, yes, see https://github.com/amphp/amp/blob/bb1db1609fb1a07bbb621e944dd4c170af3319e7/lib/MultiReasonException.php#L22-L24.
If I catch the MultiReasonException and call for getReasons() I end up with this dump ... @kelunik. Also I found out, if I disable OPcache and rerun it again, I get
[2017-06-30 20:13:03] gitamp.ERROR: Failed to send GET request to API endpoint {"exception":"[object] (Amp\Artax\DnsException(code: 0): Resolving the specified domain failed: 'api.github.com:443' at /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/artax/lib/BasicClient.php:351, Amp\Dns\NoRecordException(code: 0): No records returned for api.github.com at /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/dns/lib/BasicResolver.php:247)"} [] [2017-06-30 20:13:03] critical Amp\Dns\NoRecordException: No records returned for api.github.com in /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/dns/lib/BasicResolver.php:247
first.
I really don't get why it's failing with
string(235) "Argument 1 passed to Amp\Dns\BasicResolver::assertAcceptableResponse() must be an instance of LibDNS\Messages\Message, array given, called in /home/ekinhb/PhpstormProjects/gitampLatest/vendor/amphp/dns/lib/BasicResolver.php on line 212"
As far as I can see from the trace, it's a Message
object and no array. Could you try dumping the result inside BasicResolver
?
This gist have both cases @kelunik, with and without OPcache enabled here.
Err... Edit: Sorry, I pasted it in reverse order...I updated the gist now. If I have OPcache enabled it is an empty array.
There's definitely a bug in OPCache.
Yes, that's what I believe as well.
See amphp/dns#58.
BTW, these are what I see when I run amphp/dns tests on my end @kelunik.
Yes, looks pretty much like that here, too. Works fine without OPCache.
Looking at this bit made me worried about my own dev environment as I still have Errors: 9, Failures: 1
.
Edit: It was indeed my own dns issue.
May I keep this issue open for issues and questions that come up when debugging/rewriting gitamp for amp v2 @kelunik, @trowski, everyone?
To start with, here is what I look at when I try to run it on v2_rewrite branch.
If I try to get the previous exception in BasicClient,
var_dump($dnsException->getPrevious()->getMessage());
It shows mestring(27) "Multiple errors encountered"
, which is also on above gist. Btw, getReasons() is undefined, @kelunik. Am I doing something wrong here?