Skip to content

Commit 6d62f67

Browse files
authored
Merge pull request #813 from redwoodjs/debug-windows/paths
debug windows/paths
2 parents dd6ba41 + 0f271e0 commit 6d62f67

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Windows Debug Session
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
debug:
8+
runs-on: windows-latest
9+
timeout-minutes: 60
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v3
17+
with:
18+
version: 8
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "20"
24+
cache: "pnpm"
25+
26+
- name: Install dependencies
27+
run: pnpm install
28+
29+
- name: Setup tmate session
30+
shell: powershell
31+
run: |
32+
echo "Installing tmate..."
33+
choco install tmate -y
34+
echo "Starting tmate session..."
35+
tmate new-session -d
36+
tmate wait tmate-ready
37+
$SshConnectionString = tmate display -p '#{tmate_ssh}'
38+
echo "::notice title=tmate SSH session::$SshConnectionString"
39+
sleep 3600
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# 2025-10-09: Investigate Windows Integration Issues
2+
3+
## Problem
4+
5+
The SDK has several known issues when running on Windows. These seem to be primarily related to file path handling, leading to errors during development server startup and other filesystem operations. I don't have a Windows machine for testing, which makes debugging these problems difficult.
6+
7+
Known errors include:
8+
- `ERR_UNSUPPORTED_ESM_URL_SCHEME`: Node.js's ESM loader receives a path with a drive letter (e.g., `c:`) instead of a `file://` URL. This indicates that absolute paths on Windows are not being correctly converted to file URLs before being passed to `import()`.
9+
- `ENOENT: no such file or directory`: The application attempts to create a directory at a path that appears to have a duplicated drive letter (e.g., `C:\C:\...`). This suggests an issue with path joining or normalization where an absolute path is being incorrectly concatenated with another path segment that includes the drive root.
10+
11+
The goal is to establish a reliable method for debugging the SDK on a Windows environment to identify and fix these and any other platform-specific issues.
12+
13+
## Plan
14+
15+
1. **Set up a debugging environment**: Create a GitHub Actions workflow that provides a shell on a Windows runner. This will serve as a remote debugging environment.
16+
2. **Use tmate for SSH access**: The workflow will use `tmate` to create a remote SSH session, allowing interactive access to the Windows runner to run commands, inspect the filesystem, and debug the SDK in a live environment.
17+
3. **Reproduce the errors**: Once the environment is accessible, the next step will be to run the playground examples or other test cases to reproduce the reported path issues.
18+
4. **Investigate and fix**: With a reproducible case, I can start debugging the code to find the root cause of the path handling problems and implement fixes. This will likely involve ensuring all path manipulations are handled in a platform-agnostic way, possibly using Node's `path` module more consistently and using `pathToFileURL` from the `url` module where appropriate.
19+
20+
This work log will track the progress of this investigation.

0 commit comments

Comments
 (0)