Page 1 of 1

Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Sat Jun 25, 2016 8:27 am
by HikerBitch
So far I'm pretty happy with viscosity during my 30 day trial and I want to buy it if I can get this issue sorted out.

Whenever I open my laptop and it wakes from sleep, I login to OS X and Viscosity is unresponsive and not connected. I can click on the toolbar icon and the menu appears but my connection is stuck on 'exiting'. None of the menu buttons work and I have to force quit through activity monitor and restart the program. Every single time I open my laptop.

I'm running Viscosity version 1.6.4 with PIA on OS X Yosemite 10.10.5. I've got an applescript running to kill the wifi on disconnect. I have the program set to connect to a server when viscosity opens and I'm sending all traffic over VPN.

Also worth noting...

A better wifi killswitch

The example listed on http://www.sparklabs.com/support/kb/art ... fic-leaks/ for turning off the wifi with applescript when the vpn disconnects causes my network card to completely shut off (blank wifi signal icon with an x in the middle), which requires opening the network settings, clicking the settings icon at the bottom, making the service active, and THEN turning the wifi on after accepting a system confirmation popup. This is way too many steps for reconnecting after a disconnect.

I found a command that turns off the wifi (blank wifi signal icon WITHOUT an x through it) and allows me to simply click the icon and select 'turn wifi on' instead of the convoluted multistage process required with the command listed on your website example. The script listed below also doesn't require storing your login and password in plain characters within the script (questionable from a security and privacy standpoint) that's listed in the website example. Even quicker still, I set a keybind in OS X to turn the wifi back on using the reverse of the script listed below ('on' substituted for 'off').

This script works much nicer as a wifi killswitch within Viscosity on VPN disconnect:

do shell script "networksetup -setairportpower en0 off"
tell application "Viscosity" to display dialog "VPN CONNECTION DISCONNECTED" buttons "OK"

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Wed Jun 29, 2016 6:17 pm
by James
Hi HikerBitch,

It sounds likely Viscosity is waiting for an AppleScript to finish executing. I'd recommend temporarily removing all scripts from your connection/s and see if you get the same behaviour when waking your computer from sleep.

If you're still seeing a problem, try checking the Console for any warnings or error messages:
http://www.sparklabs.com/support/kb/art ... nsole-log/

Cheers,
James

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Wed Jun 29, 2016 8:03 pm
by zeinlinger721
I experience the same behavior (even when not running any scripts). Re-installing only temporarily helps. Right after the next sleep-cycle, Viscosity is unable to connect and eventually doesn't respond anymore.

My console does NOT hold any messages with regard to Viscosity crashing.

Looking forward to your response.

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Thu Jun 30, 2016 1:46 am
by James
Hi zeinlinger721,

Can you confirm that you're using the latest version of Viscosity (1.6.4 at the time of writing)? The version number is available under Preferences->About.

If you are using the latest version, does un-ticking the "Reconnect active connections on wake" option under Preferences->General resolve the issue?

Cheers,
James

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Thu Jun 30, 2016 2:11 am
by zeinlinger721
Even tried beta versions. Now back to 1.6.4.
However, I can't even start the application right now.

Kind regards

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Sat Oct 01, 2016 6:50 am
by cursedspiral
Since nobody else did, I'd like go and thank you for the new script. The other one was really obnoxious like you said, and yours is great. It was cool of you to share. Thanks.

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Tue Oct 11, 2016 7:22 am
by pkillpeers
HikerBitch wrote:
So far I'm pretty happy with viscosity during my 30 day trial and I want to buy it if I can get this issue sorted out.

Whenever I open my laptop and it wakes from sleep, I login to OS X and Viscosity is unresponsive and not connected. I can click on the toolbar icon and the menu appears but my connection is stuck on 'exiting'. None of the menu buttons work and I have to force quit through activity monitor and restart the program. Every single time I open my laptop.

I'm running Viscosity version 1.6.4 with PIA on OS X Yosemite 10.10.5. I've got an applescript running to kill the wifi on disconnect. I have the program set to connect to a server when viscosity opens and I'm sending all traffic over VPN.

Also worth noting...

A better wifi killswitch

The example listed on http://www.sparklabs.com/support/kb/art ... fic-leaks/ for turning off the wifi with applescript when the vpn disconnects causes my network card to completely shut off (blank wifi signal icon with an x in the middle), which requires opening the network settings, clicking the settings icon at the bottom, making the service active, and THEN turning the wifi on after accepting a system confirmation popup. This is way too many steps for reconnecting after a disconnect.

I found a command that turns off the wifi (blank wifi signal icon WITHOUT an x through it) and allows me to simply click the icon and select 'turn wifi on' instead of the convoluted multistage process required with the command listed on your website example. The script listed below also doesn't require storing your login and password in plain characters within the script (questionable from a security and privacy standpoint) that's listed in the website example. Even quicker still, I set a keybind in OS X to turn the wifi back on using the reverse of the script listed below ('on' substituted for 'off').

This script works much nicer as a wifi killswitch within Viscosity on VPN disconnect:

do shell script "networksetup -setairportpower en0 off"
tell application "Viscosity" to display dialog "VPN CONNECTION DISCONNECTED" buttons "OK"
Your script worked like a charm buddy. after it rans, i have to click and turn wifi on, and then i have to manually click connect on viscosity.
Just for the sake of it, is it a script i can use to tell viscosity to connect right after i turn on wifi? Lazy i know :D
thanks again

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Tue Jan 17, 2017 9:23 pm
by steve83357
HikerBitch wrote:
So far I'm pretty happy with viscosity during my 30 day trial and I want to buy it if I can get this issue sorted out.

Whenever I open my laptop and it wakes from sleep, I login to OS X and Viscosity is unresponsive and not connected. I can click on the toolbar icon and the menu appears but my connection is stuck on 'exiting'. None of the menu buttons work and I have to force quit through activity monitor and restart the program. Every single time I open my laptop.

I'm running Viscosity version 1.6.4 with PIA on OS X Yosemite 10.10.5. I've got an applescript running to kill the wifi on disconnect. I have the program set to connect to a server when viscosity opens and I'm sending all traffic over VPN.

Also worth noting...

A better wifi killswitch

The example listed on http://www.sparklabs.com/support/kb/art ... fic-leaks/ for turning off the wifi with applescript when the vpn disconnects causes my network card to completely shut off (blank wifi signal icon with an x in the middle), which requires opening the network settings, clicking the settings icon at the bottom, making the service active, and THEN turning the wifi on after accepting a system confirmation popup. This is way too many steps for reconnecting after a disconnect.

I found a command that turns off the wifi (blank wifi signal icon WITHOUT an x through it) and allows me to simply click the icon and select 'turn wifi on' instead of the convoluted multistage process required with the command listed on your website example. The script listed below also doesn't require storing your login and password in plain characters within the script (questionable from a security and privacy standpoint) that's listed in the website example. Even quicker still, I set a keybind in OS X to turn the wifi back on using the reverse of the script listed below ('on' substituted for 'off').

This script works much nicer as a wifi killswitch within Viscosity on VPN disconnect:

do shell script "networksetup -setairportpower en0 off"
tell application "Viscosity" to display dialog "VPN CONNECTION DISCONNECTED" buttons "OK"
This works well, nice job.

I presume it only works on WiFi though. Can it be modified to simultaneously apply to WiFi and LAN?

Re: Viscosity unresponsive on wake -and a better wifi killswitch

Posted: Thu Jan 19, 2017 9:04 pm
by steve83357
I have encountered a problem with this method.

When the VPN drops the script does indeed kill WiFi, so that's good news. But the problem is that Viscosity then hangs. Viscosity shows the current connection as 'Exiting' and locks up even when WiFI is re-enabled. The only way to resurrect it is to force close via Activity Monitor and restart. I have the line remap-usr1 SIGTERM in my Advanced settings.

Does anybody know what the problem might be?