Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't close sniffnet from Dock menu #197

Open
itfidele opened this issue May 19, 2023 · 9 comments
Open

Can't close sniffnet from Dock menu #197

itfidele opened this issue May 19, 2023 · 9 comments
Labels
bug Something isn't working macOS Something related to macOS operating system

Comments

@itfidele
Copy link

To Reproduce
Describe steps to reproduce the bug, e.g.:

  1. Open sniffnet
  2. Try to exit the app from Doc bar or force exit

Expected behavior
To close app and it's all instances

Screenshots
Screenshot 2023-05-19 at 14 13 11

Desktop:

  • OS: MacOS
@GyulyVGC GyulyVGC added the bug Something isn't working label May 19, 2023
@GyulyVGC
Copy link
Owner

Thanks for pointing out, I never noticed it.
However, you should be able to comfortably close the app with cmd+Q.

@GyulyVGC
Copy link
Owner

GyulyVGC commented May 19, 2023

After thinking about it I've found a reason for this issue and #198: on macOS the app is launched by a wrapper that gives it admin privileges required to inspect your PC's network adapters (see this file).
After having launched the app, the wrapper is quit to not have more than one process running for Sniffnet.
The app shown in the dock remains linked to the original process though (the wrapper which has already been quit).
I'll work to fix this problem.

@itfidele
Copy link
Author

This is interesting, thanks @GyulyVGC

@GyulyVGC
Copy link
Owner

You're welcome!

@GyulyVGC
Copy link
Owner

For the same reason, I've discovered that Sniffnet 1.2.0 cannot be set full screen on macOS.

@GyulyVGC GyulyVGC added the macOS Something related to macOS operating system label May 24, 2023
@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 1, 2023

It's probably due to running the app in the background:

                                                                                    🡻
do shell script "/Applications/Sniffnet.app/Contents/MacOS/sniffnet >/dev/null 2>&1 &" with administrator privileges

May you please modify your /Applications/Sniffnet.app/Contents/MacOS/wrapper.sh file and test it without the >/dev/null 2>&1 & part?

P.S. We have to discuss our options for getting rid of the Terminal as well as launching the app using the native Window Manager. I might have some ideas... @GyulyVGC

@GyulyVGC
Copy link
Owner

GyulyVGC commented Jun 1, 2023

The >/dev/null 2>&1 & is exactly the cause, but without including it the app starts in two separated instances and two open Sniffnet icons are shown (one for the script and one for the actual process).

@4r7if3x
Copy link
Contributor

4r7if3x commented Jun 1, 2023

The >/dev/null 2>&1 & is exactly the cause, but without including it the app starts in two separated instances and two open Sniffnet icons are shown (one for the script and one for the actual process).

It's probably because the app launches itself after being launched by the wrapper script, yet sending one to the background is just sweeping the dirt under the carpet... Using sudo alone should be sufficient, but I'll discuss this further with you via email, we might be able to resolve this another way.

@GyulyVGC GyulyVGC added this to the v1.2.1 milestone Jun 1, 2023
@GyulyVGC
Copy link
Owner

GyulyVGC commented Jun 5, 2023

I just tried it without >/dev/null 2>&1 & and the issues are still there, unexpectedly.

The behaviour is the same except for the fact that two icons open instead of one.

Using sudo is what I did until the last release, but I didn't like that solution because a terminal was spawned and kept opened.

@GyulyVGC GyulyVGC mentioned this issue Jun 6, 2023
9 tasks
@GyulyVGC GyulyVGC modified the milestones: v1.2.1, v1.2.2 Jun 8, 2023
@GyulyVGC GyulyVGC modified the milestones: v1.2.2, v1.3.0 Aug 3, 2023
@GyulyVGC GyulyVGC removed this from the v1.3.0 milestone Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working macOS Something related to macOS operating system
Projects
None yet
Development

No branches or pull requests

3 participants