-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Describe the bug
StackBlitz Support Report
Issue Summary
Critical file system write operations are failing in WebContainer environment with no error messages or output.
Environment Details
- Runtime: WebContainer Node.js
- Working Directory: /home/project
- Node Version: v18+
- Platform: Browser-based Linux emulation
Symptoms
- All file write operations fail silently
- No files are created
- No error messages are thrown
- Process exits successfully despite failure
- Affects all file writing methods:
- fs.writeFile (promises)
- fs.writeFileSync
- Streams
- Buffer writes
Test Cases Executed
- Basic synchronous write:
writeFileSync('test.txt', 'test');
- Promise-based async write:
await writeFile('test.txt', 'test', 'utf-8');
- Directory creation + write:
await mkdir(outputDir, { recursive: true });
await writeFile(join(outputDir, 'test.txt'), 'test');
- Stream writing:
const stream = createWriteStream('test.txt');
stream.write('test');
stream.end();
Verification Steps
-
Confirmed working:
- Authentication system
- API calls to OpenRouter/OpenAI
- Knowledge base loading
- Environment variable access
- Directory listing
-
Not working:
- Any file write operation
- All attempted paths (/home/project, ./output, etc)
- All content sizes (single word to full scenes)
- All Node.js file system APIs
Impact
- Cannot generate or save any scene content
- Core functionality completely blocked
- No file output possible
- Project development halted
Additional Context
- Project is a novel scene generator
- Requires file system access for saving generated content
- Multiple workaround attempts failed
- Issue persists across different Node.js file APIs
- No error messages to debug from
Attempted Solutions
-
Different file paths:
- Absolute paths
- Relative paths
- Various directories
-
Different APIs:
- fs.promises
- fs.sync
- Streams
- Buffers
-
Different content:
- Minimal content ("test")
- Small files
- Various encodings
-
Error handling:
- Try/catch blocks
- Error event listeners
- Process error handlers
Request
- Investigation into WebContainer file system access
- Guidance on proper file writing in WebContainer
- Alternative approaches if file system access is limited
- Documentation updates if certain paths/methods are required
Contact Information
- Project: Novel Scene Generator
- User ID: dev-xcqfusg22i3sv2mc
- Email: [email protected]
Logs
Current directory: /home/project
Writing file...
✅ Write completed
No files created despite success message
Priority
HIGH - Blocking all development progress
Link to the blitz that caused the error
https://stackblitz.com/edit/sb1-bdnfaz?file=index.js
Steps to reproduce
Critical file system write operations are failing in WebContainer environment with no error messages or output.
Expected behavior
after 20mill tokens , i expected to be able to write one word to an output file?
StackBlitz Support Report
Issue Summary
Critical file system write operations are failing in WebContainer environment with no error messages or output.
Environment Details
- Runtime: WebContainer Node.js
- Working Directory: /home/project
- Node Version: v18+
- Platform: Browser-based Linux emulation
Symptoms
- All file write operations fail silently
- No files are created
- No error messages are thrown
- Process exits successfully despite failure
- Affects all file writing methods:
- fs.writeFile (promises)
- fs.writeFileSync
- Streams
- Buffer writes
Test Cases Executed
- Basic synchronous write:
writeFileSync('test.txt', 'test');
- Promise-based async write:
await writeFile('test.txt', 'test', 'utf-8');
- Directory creation + write:
await mkdir(outputDir, { recursive: true });
await writeFile(join(outputDir, 'test.txt'), 'test');
- Stream writing:
const stream = createWriteStream('test.txt');
stream.write('test');
stream.end();
Verification Steps
-
Confirmed working:
- Authentication system
- API calls to OpenRouter/OpenAI
- Knowledge base loading
- Environment variable access
- Directory listing
-
Not working:
- Any file write operation
- All attempted paths (/home/project, ./output, etc)
- All content sizes (single word to full scenes)
- All Node.js file system APIs
Impact
- Cannot generate or save any scene content
- Core functionality completely blocked
- No file output possible
- Project development halted
Additional Context
- Project is a novel scene generator
- Requires file system access for saving generated content
- Multiple workaround attempts failed
- Issue persists across different Node.js file APIs
- No error messages to debug from
Attempted Solutions
-
Different file paths:
- Absolute paths
- Relative paths
- Various directories
-
Different APIs:
- fs.promises
- fs.sync
- Streams
- Buffers
-
Different content:
- Minimal content ("test")
- Small files
- Various encodings
-
Error handling:
- Try/catch blocks
- Error event listeners
- Process error handlers
Request
- Investigation into WebContainer file system access
- Guidance on proper file writing in WebContainer
- Alternative approaches if file system access is limited
- Documentation updates if certain paths/methods are required
Contact Information
- Project: Novel Scene Generator
- User ID: dev-xcqfusg22i3sv2mc
- Email: [email protected]
Logs
Current directory: /home/project
Writing file...
✅ Write completed
No files created despite success message
Priority
HIGH - Blocking all development progress
Parity with Local
- I have run the project in my local machine and I could not reproduce the issue.
Screenshots
No response
Platform
Browser name = Chrome
Full version = 130.0.0.0
Major version = 130
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
performance.memory = {
"totalJSHeapSize": 112496304,
"usedJSHeapSize": 108166648,
"jsHeapSizeLimit": 4294705152
}
Hash = 34c588ed
Additional context
StackBlitz Support Report
Issue Summary
Critical file system write operations are failing in WebContainer environment with no error messages or output.
Environment Details
- Runtime: WebContainer Node.js
- Working Directory: /home/project
- Node Version: v18+
- Platform: Browser-based Linux emulation
Symptoms
- All file write operations fail silently
- No files are created
- No error messages are thrown
- Process exits successfully despite failure
- Affects all file writing methods:
- fs.writeFile (promises)
- fs.writeFileSync
- Streams
- Buffer writes
Test Cases Executed
- Basic synchronous write:
writeFileSync('test.txt', 'test');
- Promise-based async write:
await writeFile('test.txt', 'test', 'utf-8');
- Directory creation + write:
await mkdir(outputDir, { recursive: true });
await writeFile(join(outputDir, 'test.txt'), 'test');
- Stream writing:
const stream = createWriteStream('test.txt');
stream.write('test');
stream.end();
Verification Steps
-
Confirmed working:
- Authentication system
- API calls to OpenRouter/OpenAI
- Knowledge base loading
- Environment variable access
- Directory listing
-
Not working:
- Any file write operation
- All attempted paths (/home/project, ./output, etc)
- All content sizes (single word to full scenes)
- All Node.js file system APIs
Impact
- Cannot generate or save any scene content
- Core functionality completely blocked
- No file output possible
- Project development halted
Additional Context
- Project is a novel scene generator
- Requires file system access for saving generated content
- Multiple workaround attempts failed
- Issue persists across different Node.js file APIs
- No error messages to debug from
Attempted Solutions
-
Different file paths:
- Absolute paths
- Relative paths
- Various directories
-
Different APIs:
- fs.promises
- fs.sync
- Streams
- Buffers
-
Different content:
- Minimal content ("test")
- Small files
- Various encodings
-
Error handling:
- Try/catch blocks
- Error event listeners
- Process error handlers
Request
- Investigation into WebContainer file system access
- Guidance on proper file writing in WebContainer
- Alternative approaches if file system access is limited
- Documentation updates if certain paths/methods are required
Contact Information
- Project: Novel Scene Generator
- User ID: dev-xcqfusg22i3sv2mc
- Email: [email protected]
Logs
Current directory: /home/project
Writing file...
✅ Write completed
No files created despite success message
Priority
HIGH - Blocking all development progress