Skip to content

Live reloading server breaks when file deleted #3130

@CGamesPlay

Description

@CGamesPlay

What version of Remix are you using?

1.4.3

Steps to Reproduce

I am able to break the live reloading server by deleting a file. This frequently happens when doing file operations (moves, renames) on my local system. The only way to make live reloading work again is to restart the server.

  1. Run remix dev and open a page.
  2. Delete a file (for example, deleting my ~/components/Layout.tsx file which is referenced by ~/root.tsx causes the issue).
  3. Restore the file.
  4. Manually refresh the page.
  5. Make a modification that should be live-reloaded.
  6. Manually refresh the page.

Expected Behavior

During step 2, I expect that an error would be displayed. Step 4 should not be necessary. After step 5, I should see the modification reflected in the page.

Actual Behavior

After step 2, no error is displayed anywhere. After step 5, the modification does not appear in the page. Manually refreshing continues to work normally.

In the browser console, I do see the following error:

transactions:28: WebSocket connection to 'ws://localhost:58609/socket' failed: 
transactions:40: Remix dev asset server web socket error:
transactions:41: Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}

However, the server console shows nothing out of the ordinary.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions