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

openvpnconnectv3 won't install due to a typo in the pkgName #784

Closed
macmangr opened this issue Nov 26, 2022 · 7 comments
Closed

openvpnconnectv3 won't install due to a typo in the pkgName #784

macmangr opened this issue Nov 26, 2022 · 7 comments
Labels
application adds or improves an application label application-issue App label issue that's not an Installomator bug. Vendor changed their installer, their website, etc. waiting for response
Milestone

Comments

@macmangr
Copy link
Contributor

1.)
pkgName for arm64 is "/OpenVPN_Connect...." but should be "OpenVPN_Connect..."

2.)
Suggestion to add appNewVersion to avoid unnecessary download and installation. Something like the following maybe:

appNewVersion=$(curl -fs "https://openvpn.net/client-connect-vpn-for-mac-os/" | grep -i "Release notes for " | grep -vx -m 1 '.beta.' | sed "s|.for (.) .|\1|")
or
appNewVersion=$(curl -fs "https://openvpn.net/client-connect-vpn-for-mac-os/" | grep -v 'beta'| grep -m 1 "Release notes for " | sed "s|.for (.) .
|\1|")

2022-11-26 18:34:19 :: 1st-v9.6 :
2022-11-26 18:34:19 :: 1st-v9.6 : openvpnconnectv3
2022-11-26 18:34:19 : REQ : openvpnconnectv3 : ################## Start Installomator v. 10.0, date 2022-11-18
2022-11-26 18:34:19 : INFO : openvpnconnectv3 : ################## Version: 10.0
2022-11-26 18:34:19 : INFO : openvpnconnectv3 : ################## Date: 2022-11-18
2022-11-26 18:34:19 : INFO : openvpnconnectv3 : ################## openvpnconnectv3
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : BLOCKING_PROCESS_ACTION=prompt_user
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : NOTIFY=all
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : LOGGING=INFO
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : LOGO=/Applications/Self-Service.app/Contents/Resources/AppIcon.icns
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : Label type: pkgInDmg
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : archiveName: OpenVPN Connect.dmg
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : no blocking processes defined, using OpenVPN Connect as default
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : App(s) found: /Applications/OpenVPN Connect.app
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : found app at /Applications/OpenVPN Connect.app, version 3.3.6, on versionKey CFBundleShortVersionString
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : appversion: 3.3.6
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : Latest version not specified.
2022-11-26 18:34:20 : REQ : openvpnconnectv3 : Downloading https://openvpn.net/downloads/openvpn-connect-v3-macos.dmg to OpenVPN Connect.dmg
2022-11-26 18:34:20 : INFO : openvpnconnectv3 : notifying
2022-11-26 18:34:48 : INFO : openvpnconnectv3 : found blocking process OpenVPN Connect
2022-11-26 18:34:51 : INFO : openvpnconnectv3 : telling app OpenVPN Connect to quit
2022-11-26 18:34:51 : INFO : openvpnconnectv3 : waiting 30 seconds for processes to quit
2022-11-26 18:35:22 : REQ : openvpnconnectv3 : no more blocking processes, continue with update
2022-11-26 18:35:22 : REQ : openvpnconnectv3 : Installing OpenVPN Connect
2022-11-26 18:35:22 : INFO : openvpnconnectv3 : notifying
2022-11-26 18:35:22 : INFO : openvpnconnectv3 : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.EtLRERn4/OpenVPN Connect.dmg
2022-11-26 18:35:27 : INFO : openvpnconnectv3 : Mounted: /Volumes/OpenVPN Connect
2022-11-26 18:35:27 : INFO : openvpnconnectv3 : Telling app OpenVPN Connect.app to open
2022-11-26 18:35:27 : INFO : openvpnconnectv3 : Reopened OpenVPN Connect.app as savvas
2022-11-26 18:35:27 : ERROR : openvpnconnectv3 : ERROR: couldn't find pkg �/OpenVPN_Connect_[0-9_()]*_arm64_Installer_signed.pkg� in dmg OpenVPN Connect.dmg
2022-11-26 18:35:27 : REQ : openvpnconnectv3 : ################## End Installomator, exit code 20

@scriptingosx scriptingosx added application adds or improves an application label application-issue App label issue that's not an Installomator bug. Vendor changed their installer, their website, etc. labels Nov 27, 2022
@scriptingosx scriptingosx added this to the v10.1 milestone Nov 27, 2022
@scriptingosx
Copy link
Collaborator

so, which one of the two suggestions should we use? and can you create a PR for this?

@macmangr
Copy link
Contributor Author

macmangr commented Dec 2, 2022

I was hoping that someone with more scripting experience than me (none to poor), would take a look and maybe come up with a better suggestion...

The PR request is created

scriptingosx added a commit to scriptingosx/Installomator that referenced this issue Dec 8, 2022
@scriptingosx
Copy link
Collaborator

ok, so I created a PR (#801) for the pkgName fix. Thank you.

When I run either suggestion to get the appNewVersion, I get an error:

% curl -fs "https://openvpn.net/client-connect-vpn-for-mac-os/" | grep -i "Release notes for " | grep -vx -m 1 '.beta.' | sed "s|.for (.*) .|\1|"
sed: 1: "s|.for (.*) .|\1|": \1 not defined in the RE

@macmangr
Copy link
Contributor Author

macmangr commented Dec 9, 2022

The correct File/Code is in the PR #796 and it works.

appNewVersion=$(curl -fs "https://openvpn.net/client-connect-vpn-for-mac-os/" | grep -i "Release notes for " | grep -vx -m 1 '.*beta.*' | sed "s|.*for \(.*\) .*|\\1|")

sudo ./assemble.sh -l /Users/savvas/Desktop/Mosyle/Resources/InstallomatorLabels openvpnconnectv3 NOTIFY=silent DEBUG=0
2022-12-09 19:02:20 : INFO : openvpnconnectv3 : setting variable from argument NOTIFY=silent
2022-12-09 19:02:20 : INFO : openvpnconnectv3 : setting variable from argument DEBUG=0
2022-12-09 19:02:20 : REQ : openvpnconnectv3 : ################## Start Installomator v. 10.1, date 2022-12-09
2022-12-09 19:02:20 : INFO : openvpnconnectv3 : ################## Version: 10.1
2022-12-09 19:02:20 : INFO : openvpnconnectv3 : ################## Date: 2022-12-09
2022-12-09 19:02:20 : INFO : openvpnconnectv3 : ################## openvpnconnectv3
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : BLOCKING_PROCESS_ACTION=tell_user
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : NOTIFY=silent
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : LOGGING=INFO
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : Label type: pkgInDmg
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : archiveName: OpenVPN Connect.dmg
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : no blocking processes defined, using OpenVPN Connect as default
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : name: OpenVPN Connect, appName: OpenVPN Connect.app
2022-12-09 19:02:22 : WARN : openvpnconnectv3 : No previous app found
2022-12-09 19:02:22 : WARN : openvpnconnectv3 : could not find OpenVPN Connect.app
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : appversion:
2022-12-09 19:02:22 : INFO : openvpnconnectv3 : Latest version of OpenVPN Connect is 3.4.1
2022-12-09 19:02:22 : REQ : openvpnconnectv3 : Downloading https://openvpn.net/downloads/openvpn-connect-v3-macos.dmg to OpenVPN Connect.dmg
2022-12-09 19:02:53 : REQ : openvpnconnectv3 : no more blocking processes, continue with update
2022-12-09 19:02:53 : REQ : openvpnconnectv3 : Installing OpenVPN Connect
2022-12-09 19:02:53 : INFO : openvpnconnectv3 : Mounting /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.23SZgbzG/OpenVPN Connect.dmg
2022-12-09 19:03:00 : INFO : openvpnconnectv3 : Mounted: /Volumes/OpenVPN Connect
2022-12-09 19:03:00 : INFO : openvpnconnectv3 : found pkg: /Volumes/OpenVPN Connect/OpenVPN_Connect_3_4_1(4522)_arm64_Installer_signed.pkg
2022-12-09 19:03:00 : INFO : openvpnconnectv3 : Verifying: /Volumes/OpenVPN Connect/OpenVPN_Connect_3_4_1(4522)_arm64_Installer_signed.pkg
2022-12-09 19:03:03 : INFO : openvpnconnectv3 : Team ID: ACV7L3WCD8 (expected: ACV7L3WCD8 )
2022-12-09 19:03:03 : INFO : openvpnconnectv3 : Installing /Volumes/OpenVPN Connect/OpenVPN_Connect_3_4_1(4522)_arm64_Installer_signed.pkg to /
2022-12-09 19:03:12 : INFO : openvpnconnectv3 : Finishing...
2022-12-09 19:03:15 : INFO : openvpnconnectv3 : App(s) found: /Applications/OpenVPN Connect.app
2022-12-09 19:03:15 : INFO : openvpnconnectv3 : found app at /Applications/OpenVPN Connect.app, version 3.4.1, on versionKey CFBundleShortVersionString
2022-12-09 19:03:15 : REQ : openvpnconnectv3 : Installed OpenVPN Connect, version 3.4.1
2022-12-09 19:03:16 : INFO : openvpnconnectv3 : App not closed, so no reopen.
2022-12-09 19:03:16 : REQ : openvpnconnectv3 : All done!
2022-12-09 19:03:16 : REQ : openvpnconnectv3 : ################## End Installomator, exit code 0

sudo ./assemble.sh -l /Users/savvas/Desktop/Mosyle/Resources/InstallomatorLabels openvpnconnectv3 NOTIFY=silent DEBUG=0
2022-12-09 19:03:26 : INFO : openvpnconnectv3 : setting variable from argument NOTIFY=silent
2022-12-09 19:03:26 : INFO : openvpnconnectv3 : setting variable from argument DEBUG=0
2022-12-09 19:03:26 : REQ : openvpnconnectv3 : ################## Start Installomator v. 10.1, date 2022-12-09
2022-12-09 19:03:26 : INFO : openvpnconnectv3 : ################## Version: 10.1
2022-12-09 19:03:26 : INFO : openvpnconnectv3 : ################## Date: 2022-12-09
2022-12-09 19:03:26 : INFO : openvpnconnectv3 : ################## openvpnconnectv3
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : BLOCKING_PROCESS_ACTION=tell_user
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : NOTIFY=silent
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : LOGGING=INFO
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : Label type: pkgInDmg
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : archiveName: OpenVPN Connect.dmg
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : no blocking processes defined, using OpenVPN Connect as default
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : App(s) found: /Applications/OpenVPN Connect.app
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : found app at /Applications/OpenVPN Connect.app, version 3.4.1, on versionKey CFBundleShortVersionString
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : appversion: 3.4.1
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : Latest version of OpenVPN Connect is 3.4.1
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : There is no newer version available.
2022-12-09 19:03:28 : INFO : openvpnconnectv3 : App not closed, so no reopen.
2022-12-09 19:03:28 : REQ : openvpnconnectv3 : No newer version.
2022-12-09 19:03:28 : REQ : openvpnconnectv3 : ################## End Installomator, exit code 0

@asimone001
Copy link

I've incorporated the change from PR #796 into my script, but it seems unable to successfully download the .dmg for some reason. Output below:

Script result: 2022-12-27 10:41:14 : REQ : : shifting arguments for Jamf
2022-12-27 10:41:14 : REQ : openvpnconnectv3 : ################## Start Installomator v. 10.1, date 2022-12-02
2022-12-27 10:41:14 : INFO : openvpnconnectv3 : ################## Version: 10.1
2022-12-27 10:41:14 : INFO : openvpnconnectv3 : ################## Date: 2022-12-02
2022-12-27 10:41:14 : INFO : openvpnconnectv3 : ################## openvpnconnectv3
2022-12-27 10:41:14 : INFO : openvpnconnectv3 : SwiftDialog is not installed, clear cmd file var
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : BLOCKING_PROCESS_ACTION=prompt_user_then_kill
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : NOTIFY=success
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : LOGGING=INFO
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : Label type: pkgInDmg
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : archiveName: OpenVPN Connect.dmg
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : no blocking processes defined, using OpenVPN Connect as default
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : App(s) found: /Applications/OpenVPN Connect.app
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : found app at /Applications/OpenVPN Connect.app, version 3.3.6, on versionKey CFBundleShortVersionString
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : appversion: 3.3.6
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : Label is not of type “updateronly”, and it’s set to use force to install or ignoring app store apps, so not using updateTool.
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : Latest version of OpenVPN Connect is 3.4.1
2022-12-27 10:41:16 : REQ : openvpnconnectv3 : Downloading https://openvpn.net/downloads/openvpn-connect-v3-macos.dmg to OpenVPN Connect.dmg
2022-12-27 10:41:16 : ERROR : openvpnconnectv3 : error downloading https://openvpn.net/downloads/openvpn-connect-v3-macos.dmg
ls: OpenVPN Connect.dmg: No such file or directory
2022-12-27 10:41:16 : ERROR : openvpnconnectv3 : File list:
2022-12-27 10:41:16 : ERROR : openvpnconnectv3 : File type: OpenVPN Connect.dmg: cannot open `OpenVPN Connect.dmg' (No such file or directory)
2022-12-27 10:41:16 : INFO : openvpnconnectv3 : App not closed, so no reopen.
2022-12-27 10:41:16 : ERROR : openvpnconnectv3 : ERROR: Error downloading https://openvpn.net/downloads/openvpn-connect-v3-macos.dmg error:

  • Trying 104.18.110.96:443...
  • Connected to openvpn.net (104.18.110.96) port 443 (#0)
  • ALPN: offers h2
  • ALPN: offers http/1.1
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • (304) (OUT), TLS handshake, Client hello (1):
    } [316 bytes data]
  • (304) (IN), TLS handshake, Server hello (2):
    { [122 bytes data]
  • (304) (IN), TLS handshake, Unknown (8):
    { [19 bytes data]
  • (304) (IN), TLS handshake, Certificate (11):
    { [4752 bytes data]
  • (304) (IN), TLS handshake, CERT verify (15):
    { [264 bytes data]
  • (304) (IN), TLS handshake, Finished (20):
    { [36 bytes data]
  • (304) (OUT), TLS handshake, Finished (20):
    } [36 bytes data]
  • SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
  • ALPN: server accepted h2
  • Server certificate:
  • subject: C=US; ST=California; O=OpenVPN Inc.; CN=*.openvpn.net
  • start date: Mar 21 00:00:00 2022 GMT
  • expire date: Apr 20 23:59:59 2023 GMT
  • subjectAltName: host "openvpn.net" matched cert's "openvpn.net"
  • issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Organization Validation Secure Server CA
  • SSL certificate verify ok.
  • Using HTTP2, server supports multiplexing
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  • h2h3 [:method: GET]
  • h2h3 [:path: /downloads/openvpn-connect-v3-macos.dmg]
  • h2h3 [:scheme: https]
  • h2h3 [:authority: openvpn.net]
  • h2h3 [user-agent: curl/7.84.0]
  • h2h3 [accept: /]
  • Using Stream ID: 1 (easy handle 0x14f811600)

GET /downloads/openvpn-connect-v3-macos.dmg HTTP/2

Host: openvpn.net

user-agent: curl/7.84.0

accept: /

  • Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
    < HTTP/2 301

< date: Tue, 27 Dec 2022 15:41:16 GMT

< content-type: text/html; charset=UTF-8

< location: https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.4.1.4522_signed.dmg

< expires: Wed, 11 Jan 1984 05:00:00 GMT

< cache-control: no-cache, must-revalidate, max-age=0

< x-redirect-by: redirection

< cf-cache-status: MISS

< server: cloudflare

< cf-ray: 780328d21fcd78e1-EWR

<

{ [0 bytes data]

  • Connection #0 to host openvpn.net left intact
  • Issue another request to this URL: 'https://swupdate.openvpn.net/downloads/connect/openvpn-connect-3.4.1.4522_signed.dmg'
  • Trying 104.18.109.96:443...
  • Connected to swupdate.openvpn.net (104.18.109.96) port 443 (What if the user is already running the latest version? #1)
  • ALPN: offers h2
  • ALPN: offers http/1.1
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • (304) (OUT), TLS handshake, Client hello (1):
    } [325 bytes data]
  • (304) (IN), TLS handshake, Server hello (2):
    { [122 bytes data]
  • (304) (IN), TLS handshake, Unknown (8):
    { [19 bytes data]
  • (304) (IN), TLS handshake, Certificate (11):
    { [4752 bytes data]
  • (304) (IN), TLS handshake, CERT verify (15):
    { [264 bytes data]
  • (304) (IN), TLS handshake, Finished (20):
    { [36 bytes data]
  • (304) (OUT), TLS handshake, Finished (20):
    } [36 bytes data]
  • SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
  • ALPN: server accepted h2
  • Server certificate:
  • subject: C=US; ST=California; O=OpenVPN Inc.; CN=*.openvpn.net
  • start date: Mar 21 00:00:00 2022 GMT
  • expire date: Apr 20 23:59:59 2023 GMT
  • subjectAltName: host "swupdate.openvpn.net" matched cert's "*.openvpn.net"
  • issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Organization Validation Secure Server CA
  • SSL certificate verify ok.
  • Using HTTP2, server supports multiplexing
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
  • h2h3 [:method: GET]
  • h2h3 [:path: /downloads/connect/openvpn-connect-3.4.1.4522_signed.dmg]
  • h2h3 [:scheme: https]
  • h2h3 [:authority: swupdate.openvpn.net]
  • h2h3 [user-agent: curl/7.84.0]
  • h2h3 [accept: /]
  • Using Stream ID: 1 (easy handle 0x14f811600)

GET /downloads/connect/openvpn-connect-3.4.1.4522_signed.dmg HTTP/2

Host: swupdate.openvpn.net

user-agent: curl/7.84.0

accept: /

  • Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
    < HTTP/2 403

< date: Tue, 27 Dec 2022 15:41:16 GMT

< content-type: text/plain; charset=UTF-8

< content-length: 16

< x-frame-options: SAMEORIGIN

< referrer-policy: same-origin

< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0

< expires: Thu, 01 Jan 1970 00:00:01 GMT

< server: cloudflare

< cf-ray: 780328d41bfc8c35-EWR

2022-12-27 10:41:16 : REQ : openvpnconnectv3 : ################## End Installomator, exit code 2
Error running script: return code was 2.

@mrazishere
Copy link
Contributor

I've incorporated the change from PR #796 into my script, but it seems unable to successfully download the .dmg for some reason.

i encountered this too but it's not related to the original issue posted here, you can fix this by adding curl options to the label. The example in readme.md works just fine...

curlOptions: (array, optional) Options to the curl command, needed for curl to be able to download the software. Usually used for adding extra headers that some servers need in order to serve the file.

curlOptions=( -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.1 Safari/605.1.15" )

(See “mocha”-labels, for examples on labels, and buildLabel.sh for header-examples.)

@asimone001
Copy link

That worked, thank you! I added the default user agent listed and this particular problem is resolved for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application adds or improves an application label application-issue App label issue that's not an Installomator bug. Vendor changed their installer, their website, etc. waiting for response
Projects
None yet
Development

No branches or pull requests

4 participants