Closed appinteractive closed 10 months ago
Thank you for opening this issue!
π @lucaschultz you might want to have a look.
π‘ Tip: Once the issue is resolved, comment @raycastbot close this issue
to close it.
Hey @appinteractive!
I think #1158 might be the same error. Could you take a look at my comment on that ticket and let me know what happens? Unfortunately, the person who opened the ticket stopped getting the error, so they couldn't verify my suggestion.
Edit: You could also try running netstat -anv -p tcp
and see if that works better than /usr/sbin/lsof +c0 -iTCP -sTCP:LISTEN -P -FpcRuLPn
. If it does, I could refactor the extension to use netstat
instead of lsof
- that would be great!
Hey, it stopped also happening for me when I unmounted the time machine volume, so it has do with some permissions I guess. The same error happens for other tools, but they do not throw at this condition so it works still.
By the running the same command with mounted time machine volume from the terminal, I'll get a warning not an error, so it might be OK to except this still as a success and display the results if it's parsable!?
I will check the other command when I'm able to.
@lucaschultz so indeed, using netstat does not have that issues, no warning.
Great, I'll try and refactor the code to use netstat
. Thank you for the feedback!
@appinteractive It looks like lsof
has an option to suppress warning messages (+w
). Would you try and run /usr/sbin/lsof +c0 -iTCP +w -sTCP:LISTEN -P -FpcRuLPn
when the Time Machine volume is mounted to see if the output still displays a warning?
@lucaschultz its not +w but -w (minus) so correct would be:
/usr/sbin/lsof +c0 -iTCP -w -sTCP:LISTEN -P -FpcRuLPn
Tested it and it works fine with -w
Docs:
Thank you @appinteractive for your continued testing! It appears that the man pages suggest that the +w
option will suppress warnings, and -w
will disable that suppression. I may have misinterpreted that, though π€ Have you tested -w
under the same conditions as before and not received any warnings?
Haha, yeah the docs seems to make fun of the user by assuming multi dimensionality π
But I tested both: +w
spits out the warning like without the parameter, -w
suppresses it. I assume w
stands for warning so -w
makes sense, only the description is misleading.
My --help
output above shown that the default in my case is +w
when it was enabled.
Thank you for testing! That's a three-character bug fix β gotta love those! I'll be submitting a pull request this weekend.
Happy I could help. Thanks for your work π―
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean π
@lucaschultz did you release the fix? Still broken for me.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean π
@lucaschultz any update?
I can confirm it is broken for me as wellΒ :
Error: lsof: WARNING: can't stat() smbfs file system /Volumes/.timemachine/NicofloNAS._smb._tcp.local./91AF07B6-CBE8-4591-8EB6-DEEE5AA8CFBB/Time Machine
Output information may be incomplete.
assuming "dev=36000085" from mount table
Output information may be incomplete.
assuming "dev=36000085" from mount table
w.getCurrent:open-ports.js:2:364
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean π
Works now for me
Not for me, same error as before :
Error: lsof: WARNING: can't stat() smbfs file system /Volumes/.timemachine/NicofloNAS._smb._tcp.local./18766D1E-7DF9-4650-8D5B-87322508A86C/Time Machine
Output information may be incomplete.
assuming "dev=3600005a" from mount table
Output information may be incomplete.
assuming "dev=3600005a" from mount table
w.getCurrent:open-ports.js:2:364
Not for me, same error as before :
Could you try running the command
/usr/sbin/lsof +c0 -iTCP -w -sTCP:LISTEN -P -FpcRuLPn
with time machine mounted and check wether it shows warnings?
check wether it shows warnings?
No, it works fine AFAIK.
This issue has been automatically marked as stale because it did not have any recent activity.
It will be closed if no further activity occurs in the next 10 days to keep our backlog clean π
This issue has been automatically closed due to inactivity.
Feel free to comment in the thread when you're ready to continue working on it π
You can also catch us in Slack if you want to discuss this.
Extension
https://www.raycast.com/lucaschultz/port-manager
Description
Error:
When running lsof in the console, I also get this message, but it's only a warning, not a fatal error. So I think it's safe to accept non 0 responses from that command.
Steps To Reproduce
Current Behavior
Breaks due to non 0 response as it has a warning.
Expected Behaviour
Should show processes and ignore the warning.