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

Unable to open #60

Closed
pravinxor opened this issue May 28, 2020 · 9 comments
Closed

Unable to open #60

pravinxor opened this issue May 28, 2020 · 9 comments

Comments

@pravinxor
Copy link

pravinxor commented May 28, 2020

I've installed Portmaster on Windows multiple times properly (according to the installation steps), however Portmaster never shows me the GUI when I open it. I've made sure that all startup processes are running and the Portmaster core is also running, however I cannot get Portmaster to open and show me its GUI. My build of Windows is 19041.264 and the version of Portmaster I was installing was 0.4.3

@dhaavi
Copy link
Member

dhaavi commented May 28, 2020

Hey @pravin-2-5, thanks for reporting this issue.

What may have happened, is that the Portmaster was unable to load resources from the update server, such as the GUI itself.

For troubleshooting, please go to %PROGRAMDATA%\Safing\Portmaster. There you can
(1) check the logs of the core in logs\core (or logs\fstree\core), and
(2) try to open the app directly in updates\windows_amd64\app.

@pravinxor
Copy link
Author

https://bin.privacytools.io/?0fff1de993afe9aa#aGPc0GuQGxrfUezOrzcHsM5sEQgfybVcW8eZhCzSSNo=

Here are the logs for Portmaster, so it looks like 'rng' from the Core is the problem. I've tried running the service manually and running the executable directly as an admin and as a regular user but nothing seems to get it to run

@dhaavi
Copy link
Member

dhaavi commented May 28, 2020

Thanks for the log!
This is weird. The rng module hardly does anything. The only thing I can think of right now, is that reading from the Windows rand pool would block. But 10 seconds! That is a lot! I will also discuss this with my colleague tomorrow.

To further investigate, please follow these steps:

  • open cmd.exe with administrator privileges
  • change directory to somewhere where you can drop the log file
  • run %PROGRAMDATA%\Safing\Portmaster\updates\windows_amd64\core\portmaster-core_v0-4-6.exe --data %PROGRAMDATA%\Safing\Portmaster -log trace -print-stack-on-exit > log.txt
  • after 5 seconds, hit CTRL + C
  • screen log.txt for any private information and redact it. (In this case, there should not be any)
  • upload the log.txt (https://bin.privacytools.io 👌)

@pravinxor
Copy link
Author

pravinxor commented May 28, 2020

Alright- so something strange happened and I was able to run Portmaster normally as soon as I ran the that command you gave, however when I closed and reopened the Portmaster window, all that was shown was a blank window (reminiscent of Windows 7) showing "Navigation to the webpage was cancelled" and "What you can try: refresh the page" so I'm not sure what happened but I think the service might be refusing to start again. I've retried by opening Portmaster from start & restarting the services manually, however nothing seems to get it to work again.
Here is the log file for reference: https://bin.privacytools.io/?230b8ee6ba7c7430#bh8f4S8JshE3Js8iJ6JlJbMDoKrrMc3ksmr3h8kjm64=
(Memory Integrity & SVM in my BIOS were disabled during this run just in case that would've been the culprit for causing the "windows kernel extension (driver) is not ready to accept commands" warning)

@dhaavi
Copy link
Member

dhaavi commented May 29, 2020

I see.

I should have been more clear about what this command did: It started the portmaster and logged to a specific file. During that, it downloaded the GUI and performed normally without errors (as seen in the log file). When you hit CTRL+C, it printed the current stack of the process - ie. all currently running internal goroutines/threads, and then shut down. (You could also just leave it running like that. The portmaster will work normally.)

You then started the App/GUI, which started but tried to connect to the Portmaster. That is why the white screen is shown. There will be something nicer in the future - here is the issue tracking this: safing/portmaster-ui#1

The warning you saw - windows kernel extension (driver) is not ready to accept commands - is just a small warning telling you that the kernel extension already shut down. Some packet apparently didn't get through fast enough. This is no problem at all.
You can turn on Memory Integrity & SVM again, there really should be no relation here.

Regarding the actual error why the Portmaster Core won't start when run as a service: I have looked into it with my colleague and the only thing we could find is that it blocks on reading random data from Windows. We have made small tweaks (safing/portbase#51, safing/portbase#52), which may work around the problem. As the core currently does not run normally, please follow these steps to get the new version:

  • open cmd.exe with administrator privileges
  • run %PROGRAMDATA%\Safing\Portmaster\updates\windows_amd64\core\portmaster-core_v0-4-6.exe --data %PROGRAMDATA%\Safing\Portmaster
  • Wait for about 30 seconds. (If you watch the log output you will see that it detected a new version and downloaded it.)
  • hit CTRL + C to shut down the core again.
  • restart the Portmaster Core with the Windows Services Control Manager.

You can then open the app and/or check the logs to see if it works now.
If the problem persists, please upload the current log from %PROGRAMDATA%\Safing\Portmaster\logs.

Two more things:

  • Are you running anything that might use a lot of random data from Windows? The rand pool normally only blocks if it's "empty" (low on entropy) - ie. someone is reading massive amounts of random data. (Or you just booted)
  • You can delete the prior log file from https://bin.privacytools.io/, as it does contain some (low-risk) private data.

@pravinxor
Copy link
Author

pravinxor commented May 29, 2020

I did update, however the initial window shows for the app up now (wheras it refused to open before) but Portmaster is again giving me the white screen displaying the "navigation to webpage was cancelled" screen.
Currently my R/W rates (reported by Task manager) are settling at around 0-10kb/s so I don't think that there's any problem with that.

@dhaavi
Copy link
Member

dhaavi commented May 29, 2020

The white screen means it cannot connect to the core. Can you confirm the core is up and running? If you could provide the newest log file of the core, we can continue to troubleshoot with that.

@pravinxor
Copy link
Author

No need to troubleshoot anymore! Maybe the app didn't update when I ran your command, but after a couple restarts Portmaster works fine and looks amazing! Thank you so much!
Here's the log now, incase you want to compare it to the last one: https://bin.privacytools.io/?8dcde45dfd0298eb#KlQM7DuzyASp/17KxBwJ3Ersm+MSPFPyH/c3IVlx+Pw=

@dhaavi
Copy link
Member

dhaavi commented May 29, 2020

Great! 🎉
I will close this issue now. If another issue arises, please don't hesitate to open a new issue.

I noticed two things in the log file that may be of interest to you:

  • The Portmaster seemingly detected a global IPv4 address and no local dns resolvers. This could hint at a dangerous network setup, or you might be using a VPN that has a less than optimal setup.
  • There were quite some connections that were dropped as incoming. This can happen if you start the Portmaster while your PC is already running. After starting, you might get some timeouts, but after a couple minutes everything should be handled correctly.

Thanks for the log file, please delete it again ;)

@dhaavi dhaavi closed this as completed May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants