Skip to content

502 error on CI test (Check PWA reachability) on a fresh install #2852

@ibousfiha

Description

@ibousfiha

API Platform version(s) affected: 4.0.11, main

Description
When running e2e tests in GitHub Actions on a fresh install of an API Platform instance (using both the 4.0.11 tag and the main branch zip), a 502 error is returned when checking the reachability of the PWA - Error: curl: (22) The requested URL returned error: 502.

The test case that fails is the following:

      -
        name: Check PWA reachability
        run: "curl -vk --fail-with-body -H 'Accept: text/html' https://localhost"

in: .github/workflows/ci.yml

How to reproduce

  1. Download the API Platform repository (either version 4.0.11 or the current main branch).
  2. Push to a new Repository (mine was private)
  3. Check Github Actions

Possible Solution
I tried hard to find one but I didn't.

Additional Context
I checked this issue: #2694 which seems similar to mine, but the suggested solution didn't solve it.

Github error logs/summary>

You can add a header

You can add text within a collapsed section.

You can add an image or a code block, too.

Run curl -vk --fail-with-body -H 'Accept: text/html' https://localhost
  curl -vk --fail-with-body -H 'Accept: text/html' https://localhost
  shell: /usr/bin/bash -e {0}
* Host localhost:443 was resolved.
* IPv6: ::[1](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:1)
* IPv4: 127.0.0.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying [::1]:443...
* Connected to localhost (::1) port 443
* ALPN: curl offers h[2](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:2),http/1.1
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.[3](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:3) (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [15 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [927 bytes data]
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
{ [80 bytes data]
* TLSv1.3 (IN), TLS handshake, Finished (20):
{ [36 bytes data]
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.3 (OUT), TLS handshake, Finished (20):
} [36 bytes data]
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / X25519 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*  subject: [NONE]
*  start date: Feb 23 23:27:20 2025 GMT
*  expire date: Feb 2[4](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:5) 11:27:20 2025 GMT
*  issuer: CN=Caddy Local Authority - ECC Intermediate
*  SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
*   Certificate level 0: Public key type EC/prime2[5](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:6)6v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA25[6](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:7)
*   Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA256
{ [5 bytes data]
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
{ [122 bytes data]
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://localhost/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: localhost]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.5.0]
* [HTTP/2] [1] [accept: text/html]
} [5 bytes data]
> GET / HTTP/2
> Host: localhost
> User-Agent: curl/8.5.0
> Accept: text/html
> 
{ [5 bytes data]
< HTTP/2 502 
< alt-svc: h3=":443"; ma=2592000
< server: Caddy
< content-length: 0
< date: Sun, 23 Feb 2025 23:2[7](https://github.com/ibousfiha/productivity.ac/actions/runs/13487920514/job/37681504081#step:9:8):37 GMT
< 

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
* Connection #0 to host localhost left intact
curl: (22) The requested URL returned error: 502
Error: Process completed with exit code 22.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions