Duplicate Connections on Install from Bundled Installer

Got a problem with Viscosity or need help? Ask here!

apoapse

Posts: 2
Joined: Fri Mar 16, 2012 4:12 am

Post by apoapse » Fri Mar 16, 2012 4:21 am
I am an IT Administrator evaluating Viscosity for my small business. I created a custom bundle package for employee installation following the instructions here: http://www.thesparklabs.com/support/vis ... viscosity/. I am using version 1.3.5 (1120) of Viscosity.

When I install the bundled package in Windows 7 or Windows Vista, the new connection appears twice with the same name. No other connections appear. Selecting first connection causes a Microsoft .NET Framework error. I’ve included the exception text below. The second connection properly establishes the VPN connection. This issue does not appear in Windows XP.

In the bundle creation, I placed the VPN connection files into the Connections-Overwrite folder. When I place the files in the Connections-Append folder I have the same issue. When I place the files in the Connections folder no connections appear upon install.

I’ve included my VPN connection config file, bundle compile script, and Viscosity preconfigured settings file below. Am I doing something wrong, or is this an issue in Viscosity?

Thanks,
Mark


Microsoft .NET Framework Exception (from Windows 7):
Code: Select all
 ************** Exception Text **************
IronPython.Runtime.UnboundLocalException: Local variable 'connection' referenced before assignment.
   at IronPython.Runtime.Operations.PythonOps.CheckUninitialized(Object value, String name)
   at DLRCachedCode.MenuItemClickHandler$172(Closure , PythonFunction $function, Object self, Object sender, Object e)
   at IronPython.Runtime.PythonFunction.FunctionCaller`3.Call3(CallSite site, CodeContext context, Object func, T0 arg0, T1 arg1, T2 arg2)
   at CallSite.Target(Closure , CallSite , Object , Object , EventArgs )
   at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
   at _Scripting_(Object[] , Object , EventArgs )
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
VPN Config File:
Code: Select all
 #-- Config Auto Generated By Viscosity --#

#viscosity name xxxxxxxxxx
remote xxxxxxxxxx.xxx 1194 udp
pull
tls-client
dev tap
nobind
persist-key
persist-tun
ca ca.crt
cert cert.crt
key key.key
ns-cert-type server
tls-auth ta.key 1
comp-lzo
resolv-retry infinite
route-delay 5
dev-node {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Compile Script:
Code: Select all
 ; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
AppName=xxxxxxxxxx
AppVersion=1.0
;AppVerName=My Bundled Viscosity 1.0
AppPublisher=xxxxxxxxxx
AppPublisherURL=http://www.xxxxxxxxxx.xxx/
AppSupportURL== http://www.xxxxxxxxxx.xxx/
AppUpdatesURL== http://www.xxxxxxxxxx.xxx/
CreateAppDir=no
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: english; MessagesFile: compiler:Default.isl

[Files]
Source: Viscosity Installer.exe; DestDir: {tmp}
Source: Preconfigure\*; DestDir: {userappdata}\Viscosity\Preconfigure; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Run]
Filename: {tmp}\Viscosity Installer.exe; Parameters: /sp- /silent /nocancel
Viscosity Preconfigured Settings:
Code: Select all
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>10DayWarning</key>
	<string>NO</string>
	<key>5DayWarning</key>
	<string>NO</string>
	<key>AskOldKexts</key>
	<string>NO</string>
	<key>AutoUpdate</key>
	<string>YES</string>
	<key>ConnectAfterFail</key>
	<string>Ask</string>
	<key>ConnectionOrder</key>
	<array>
		<dict>
			<key>children</key>
			<array>
			</array>
			<key>name</key>
			<string>1</string>
			<key>type</key>
			<string>openvpn</string>
		</dict>
	</array>
	<key>DetailsOnTop</key>
	<string>YES</string>
	<key>DisableTimeMachine</key>
	<string>NO</string>
	<key>DisconnectIfIdle</key>
	<string>NO</string>
	<key>DisconnectIfIdleTimeout</key>
	<integer>10</integer>
	<key>DisplayIPInMenu</key>
	<string>NO</string>
	<key>DisplayWelcome</key>
	<string>NO</string>
	<key>FirstRun</key>
	<string>NO</string>
	<key>KeepFileNames</key>
	<string>NO</string>
	<key>License</key>
	<string></string>
	<key>MenuBarIcons</key>
	<string>Windows Default</string>
	<key>MenuOnRights</key>
	<string>NO</string>
	<key>PasswordSupport</key>
	<string>YES</string>
	<key>ReconnectAfterDropOut</key>
	<string>Ask</string>
	<key>ReconnectOnWake</key>
	<string>YES</string>
	<key>StartAtLogin</key>
	<string>NO</string>
	<key>globalConnectedScript</key>
	<string></string>
	<key>globalDisconnectedScript</key>
	<string></string>
</dict>
</plist>

James

User avatar
Posts: 1880
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Fri Mar 16, 2012 4:58 am
Hi Mark,

Two things spring to mind:

1. I'd recommend trying to remove the "ConnectionOrder" key, and see if that makes a difference, as this may be what is causing your second phantom connection (that causes a crash as it doesn't actually exist). You'll need to remove the following from your settings file:
Code: Select all
<key>ConnectionOrder</key>
   <array>
      <dict>
         <key>children</key>
         <array>
         </array>
         <key>name</key>
         <string>1</string>
         <key>type</key>
         <string>openvpn</string>
      </dict>
   </array>
2. If the above trick doesn't solve the issue, do you have the same problem with the latest beta version? The latest beta version contains massive improvements to Viscosity Windows (including huge performance improvements), so it may be worth investigating with it as well. It can be downloaded at: http://www.thesparklabs.com/forum/viewt ... 1593#p1593

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs

apoapse

Posts: 2
Joined: Fri Mar 16, 2012 4:12 am

Post by apoapse » Fri Mar 16, 2012 5:23 am
Hi James,

I followed the first suggestion of removing the ConnectionOrder key and that resolved the problem. Thanks for the prompt response!

I will give the beta version a try to check out the improvements. Do you have an estimated release date?

Mark

James

User avatar
Posts: 1880
Joined: Thu Sep 04, 2008 9:27 pm

Post by James » Fri Mar 16, 2012 10:53 pm
Hi Mark,

Great to hear.

We are hoping for it to be released this month. We may end up pushing out the performance improvements as version 1.3.6, and leave the new features (which require more testing) for version 1.4, so it is available sooner.

Cheers,
James
James Bekkema
Viscosity Developer

Web: http://www.sparklabs.com
Support: http://www.sparklabs.com/support
Twitter: http://twitter.com/sparklabs
4 posts Page 1 of 1