Comments (14)
I just ran into this same issue. Decided to dig into the source a little and found this...
The issue appears to be a result of using fs.watch which isn't recommended for network paths (and WSL is accessed via network path).
A simple workaround is to set the environment variable CHOKIDAR_USEPOLLING=true
before launching bruno. This avoids the issue but means that all folders use polling though which could be less efficient for large projects.
A more permanent fix could be conditionally setting the polling mode based on the path type. In watcher.js:415 the parameter usePolling: false
could do something like usePolling: watchPath.startsWith("\\\\") ? true : false,
from bruno.
Alternatively, if you validate the prerequisites for running GUI apps from WSL2, you can run bruno as GUI from the WSL itself and it seems to just work fine.
from bruno.
I'm also experiencing this. In fact, even if I move a working Bruno folder to WSL2 and then open the collection from there, Bruno only shows me the collection name and the folders under it, but no requests at all.
I tried the above steps, enabling dev tools and running window.__IS_DEV__ = true
in the console. Unfortunately, no log was created at all in the console when creating new requests.
When removing the collection and re-adding it, there are two addDir
events in the log. But again, when adding a request (or apparently loading one when opening a collection), no UI events are firing.
Please let me know how I can help debug this further! Please note that I have my WSL2 mapped as a network drive, but the same issues happen when using a collection on the \\wsl$\
path.
Edit: I have more info:
When running Bruno.exe from the command line, I was able to see the errors. Pasting them below:
Paste from Command Line
Preferences file is located at: C:\Users\myusr\AppData\Roaming\bruno\preferences.json
watcher add: C:\Users\myusr\OneDrive\Documents\bruno\bruno.json
watcher add: C:\Users\myusr\OneDrive\Documents\bruno\Github.bru
watcher add: C:\Users\myusr\OneDrive\Documents\bruno\Foo\Bar.bru
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:/home/myuser/projects/MyProject/resources/api/bruno'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleDir (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:567:19)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:617:16)
at async C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\index.js:451:21
at async Promise.all (index 0)
(Use `Bruno --trace-warnings ...` to show where the warning was created)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\bruno.json' at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleFile (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:395:23)
at NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:637:21)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\Github.bru' at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleFile (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:395:23)
at NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:637:21)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\Foo'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleDir (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:567:19)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:617:16)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\Foo\Baz.bru'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleFile (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:395:23)
at NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:637:21)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\Foo\Bar.bru'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleFile (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:395:23)
at NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:637:21)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 6)
(node:20976) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, watch 'Z:\home\myuser\projects\MyProject\resources\api\bruno\Foo\Biz.bru'
at FSWatcher.<computed> (node:internal/fs/watchers:244:19)
at Object.watch (node:fs:2264:34)
at createFsWatchInstance (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:119:15)
at setFsWatchListener (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:166:15)
at NodeFsHandler._watchWithNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:331:14)
at NodeFsHandler._handleFile (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:395:23)
at NodeFsHandler._addToNodeFs (C:\Users\myusr\AppData\Local\Programs\bruno\resources\app.asar\node_modules\chokidar\lib\nodefs-handler.js:637:21)
(node:20976) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 7)
from bruno.
Came here to say WSL paths do not work. Glad I'm not the only one. Hopefully one day bruno will support this.
from bruno.
Hey @helloanoop. Only had time to do a quick test but so far so good! I'll let you know if I have any other problems.
from bruno.
1.5.1 worked just fine for me.
Basically clicked create new collection. Choose \wsl$.localhost\Ubuntu\tmp\bruno
Created a request and it showed up.
Did a GET request on google.com and it pulled down the webpage and rendered it.
Closed Bruno and re-opened and it still remained there.
Thanks @helloanoop
from bruno.
Okay, using the \\wsl.localhost\...
path did work. I have my WSL distro mapped to a drive letter, and that was what I used last time. I can confirm that using the network path to WSL does work with 1.5.1. Thanks for the suggestion, @GimpMaster, and for the update @helloanoop
from bruno.
Works over here too, thanks! No more workaround.
from bruno.
I've opened a new issue here: #1302
Looks like there are issues with several file operations in WSL2
from bruno.
@binaryfire Glad that you like Bruno !
Need some help to debug this issue.
So the requests are getting created, but not appearing in the UI.
When a .bru
file gets created, electron fires an ipc event which gets picked up in the UI layer. You are right that the issue is likely due to the format of the path.
To debug, first you can toggle dev tools (Click on View
in Menubar and click on Toggle Developer Tools
)
Then enter window.__IS_DEV__ = true
in console to support debug logs
Once done, try creating a new request and see if you are getting any logs.
This should help us narrow down the issue on whether the event fire by electron reaches the UI or not.
from bruno.
Alternatively, if you validate the prerequisites for running GUI apps from WSL2, you can run bruno as GUI from the WSL itself and it seems to just work fine.
Yep, installing Bruno in WSL directly (I used apt) worked for me, thanks!
from bruno.
@binaryfire @eblount @nicklargent @SpiRanha @GimpMaster This has been fixed in v1.5.1
Can you download and check if it solves the issue ?
@gyunseo Many thanks for the PR!
from bruno.
@helloanoop I don't see any change here, sorry:
- Installed 1.5.1 in Windows
- Created a new collection with the folder in WSL2
- Created a new request
- Request doesn't appear in the Bruno sidebar
- Request file is in the directory in WSL2
- Restarted Bruno, same result: Collection is there, request is not
from bruno.
Is anyone else having problems renaming folders on WSL2? It'd be great if someone could test this and let me know - I'm not sure if it's a bug or if it's something to do with my system.
To reproduce: right click on a folder inside a collection, click "Rename" and try and change the name to something else. The name doesn't change.
from bruno.
Related Issues (20)
- Override content-type
- Safe Mode Beta description typo HOT 1
- Switch to AUTH tab marks Request as modified/unsaved
- Asserting a json field with complex name fails after saving request
- Save all button
- Multiple CLI Reporters HOT 1
- [Feature Request] draft request
- Test cases failing when using forEach with nested tests HOT 3
- Using authorization token issue
- Environments mapped via symlink is not loading in dropdown
- API response int field modified from original response HOT 1
- Inherit URL from collection HOT 1
- Getting output from Bruno CLI request HOT 2
- `bru.setNextRequest` doesn't work in bru CLI HOT 2
- Version Typo HOT 2
- Bruno keeps interfering with Git, during rebase operations [ Transient ] HOT 1
- I would like to be able to retrieve the environment name
- flatpak reduce permissions from all user files HOT 2
- CLI - ignored files are not ignored
- Scripts methods 'req.body' and 'req.getBody()' returns string instead js object. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bruno.