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

Tests failing in master #34

Closed
michielbdejong opened this issue Nov 27, 2020 · 6 comments
Closed

Tests failing in master #34

michielbdejong opened this issue Nov 27, 2020 · 6 comments

Comments

@michielbdejong
Copy link
Member

Here's what I did to investigate the 500 error:

$ docker run --network=testnet -it --env-file ./env-vars-for-test-image.list webid-provider-tests /bin/bash
root@140b5858e892:/app# curl -kv https://server
* Rebuilt URL to: https://server/
*   Trying 172.22.0.2...
* TCP_NODELAY set
* Connected to server (172.22.0.2) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=RO; ST=Bucharest; L=Bucharest; O=IT; CN=www.example.ro
*  start date: Nov 27 09:37:10 2020 GMT
*  expire date: Nov 27 09:37:10 2021 GMT
*  issuer: C=RO; ST=Bucharest; L=Bucharest; O=IT; CN=www.example.ro
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET / HTTP/1.1
> Host: server
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 500 Internal Server Error
< Date: Fri, 27 Nov 2020 10:07:12 GMT
< Server: Apache/2.4.38 (Debian)
< X-Powered-By: PHP/7.2.34
< Content-Length: 230
< Connection: close
< Content-Type: text/html; charset=UTF-8
< 
<br />
<b>Fatal error</b>:  Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.34. in <b>/app/vendor/composer/platform_check.php</b> on line <b>24</b><br />
* Curl_http_done: called premature == 0
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
root@140b5858e892:/app# exit
exit

Hoping it will be fixed by using FROM php:7.3-apache in the Dockerfile.

@Potherca
Copy link
Member

Switching to php:7.3 should work.

From what I can see, the issue might be related to require in composer.json for PHP being set to 7.1 but platform being set to 7.3.

In general, I think we might be better of just removing the platform section in the composer.json file.

@michielbdejong
Copy link
Member Author

Next error:

<b>Fatal error</b>:  Uncaught Error: Class 'Pdsinterop\Rdf\Formats' not found in /app/web/index.php:76

Trying with latest flysystem-rdf now.

@michielbdejong
Copy link
Member Author

Previous error fixed.
Now running into:

 console.log
      <br />
      <b>Deprecated</b>:  Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken(). in <b>/app/vendor/lcobucci/jwt/src/Builder.php</b> on line <b>506</b><br />
      <br />
      <b>Fatal error</b>:  Uncaught Laminas\HttpHandlerRunner\Exception\EmitterException: Unable to emit response; headers already sent in /app/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php:19
      Stack trace:
      #0 /app/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitterTrait.php(36): Laminas\HttpHandlerRunner\Exception\EmitterException::forHeadersSent()
      #1 /app/vendor/laminas/laminas-httphandlerrunner/src/Emitter/SapiEmitter.php(27): Laminas\HttpHandlerRunner\Emitter\SapiEmitter-&gt;assertNoPreviousOutput()
      #2 /app/web/index.php(230): Laminas\HttpHandlerRunner\Emitter\SapiEmitter-&gt;emit(Object(Laminas\Diactoros\Response\JsonResponse))
      #3 {main}
        thrown in <b>/app/vendor/laminas/laminas-httphandlerrunner/src/Exception/EmitterException.php</b> on line <b>19</b><br />

@Potherca
Copy link
Member

Ah. This seems to be a recent development: tymondesigns/jwt-auth#2059

@Potherca
Copy link
Member

tymondesigns/jwt-auth#2059 (comment)

In the meantime for those like me who uses lcobucci/jwt as a dependency of leage/league/oauth2-server or laravel/passport you can explicitly require the version 3.3.3 of the lcobucci/jwt package (until a better solution comes up) by executing:

composer require lcobucci/jwt:3.3.3 && composer update

@michielbdejong
Copy link
Member Author

That did the trick, thanks!
Master is green again now.

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

2 participants