Skip to content

Custom Development Server Live Preview stays stuck on connecting in Phoenix Code 5.2.5 on Windows #3166

Description

@petargeorgiev

Describe the bug

Environment:

  • Phoenix Code 5.2.5 build 23920
  • Windows 10
  • Custom server: Nginx 1.30.4 via Laragon

Problem:
Live Preview works normally when using Phoenix Code's built-in server.

When "Use Custom Development Server for This Project" is enabled,
Live Preview stays indefinitely in the half-yellow "connecting" state
and shows "Getting preview from your custom server".

Custom server settings:

The Nginx document root maps 1:1 to the Phoenix project root.

Minimal reproduction:
I created a minimal file in the Phoenix project root:

phoenix-test.html

Content:

<!doctype html>

<title>Phoenix Test</title>

Phoenix custom server test

The file is accessible normally in an external browser:

http://invena-preview.test/phoenix-test.html

Result:
HTTP 200
Content-Type: text/html; charset=utf-8

CSS, JavaScript, images and HTML files served by the same Nginx host
also return HTTP 200.

Steps to reproduce:

  1. Open the project in Phoenix Code.
  2. Enable:
    "Use Custom Development Server for This Project".
  3. Set:
    Server URL = http://invena-preview.test/
    Serving Folder in Project = /
    Server Framework = Custom
    Hot reload = Off
  4. Open phoenix-test.html.
  5. Start Live Preview.

Expected:
Phoenix should open the current file through:

http://invena-preview.test/phoenix-test.html

Actual:
Phoenix remains at:
"Getting preview from your custom server"

The lightning icon stays half yellow indefinitely and no visual preview appears.

Additional note:
The same Phoenix installation successfully previews HTML when using
the built-in server, so the issue appears specific to Custom Development Server mode.

Reproduction

  1. Open a local project in Phoenix Code.

  2. Configure Live Preview Settings:

    • Use Custom Development Server for This Project: ON
    • Server URL: http://invena-preview.test/
    • Serving Folder in Project: /
    • Server Framework: Custom
    • Server supports hot reload: OFF
  3. The custom Nginx server document root maps 1:1 to the Phoenix Code project root.

  4. Create/open a minimal HTML file in the project root named phoenix-test.html:

    <!doctype html>

    <title>Phoenix Test</title>

    Phoenix custom server test

  5. Verify externally that:
    http://invena-preview.test/phoenix-test.html

    returns HTTP 200 and opens correctly in a browser.

  6. Open phoenix-test.html in Phoenix Code.

  7. Start Live Preview.

  8. Phoenix shows:
    "Getting preview from your custom server"

    and remains indefinitely in the connecting state.

  9. The lightning icon remains half yellow and no visual preview appears.

Expected behavior

Phoenix Code should detect the currently opened HTML file and load it through the configured custom development server.

For the opened local file:

phoenix-test.html

the Live Preview should load:

http://invena-preview.test/phoenix-test.html

The lightning icon should change from the half-yellow connecting state to the fully connected state, and the page should appear in the Live Preview panel.

OS, Browser and Phoenix versions

  1. OS: Windows 10 64-bit

  2. Browser used for external verification:
    Mozilla Firefox 154.0

  3. Phoenix Code:
    Release 5.2.5 build 5.2.5-23290
    Phoenix Pro Build: 5886d20
    Build timestamp: 2026-08-10T17:52:48.367Z

  4. Custom development server:
    Nginx 1.30.4 via Laragon

  5. Server URL:
    http://invena-preview.test/

  6. Serving Folder in Project:
    /

  7. Server Framework:
    Custom

  8. Hot reload:
    Disabled

The same HTML file works correctly when opened directly through the custom server in Firefox and returns HTTP 200.

logs or debug stack trace if any

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions