2

Openconnect works fine via the command line.

$ sudo openconnect foo.com/bar
POST https://foo.com/bar
Attempting to connect to server 1.2.3.4:443
Connected to 1.2.3.4:443
SSL negotiation with foo.com
Connected to HTTPS on foo.com
Got HTTP response: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Fri, 04 Aug 2017 08:28:32 GMT
X-Frame-Options: SAMEORIGIN
X-Aggregate-Auth: 1
HTTP body chunked (-2)
XML POST enabled
Please enter your username and password.
Username:baz
Password:

However, it fails via network manager. I click to connect to the VPN, which brings up a window. I then click the "connect" icon again, and I'm presented with Failed to find or parse web form in login page. The log is as follows.

GET https://foo.com/bar
Attempting to connect to server 1.2.3.4:443
Connected to 1.2.3.4:443
SSL negotiation with foo.com
Connected to HTTPS on foo.com
Got HTTP response: HTTP/1.0 200 OK
Content-Length: 110
Cache-Control: no-cache
Pragma: no-cache
Connection: Close
Date: Fri, 04 Aug 2017 08:31:22 GMT
HTTP body length:  (110)
Failed to find or parse web form in login page

There are a few differences, e.g. GET vs. POST, and Content-Type. I'm not sure if this is important. Here is the NetworkManager config file:

$ sudo cat /etc/NetworkManager/system-connections/foo_VPN
[connection]
id=foo_VPN
uuid=<random string>
type=vpn
permissions=user:sparhawk:;

[vpn]
autoconnect-flags=0
certsigs-flags=0
cookie-flags=2
enable_csd_trojan=no
gateway=foo.cam/bar
gateway-flags=2
gwcert-flags=2
lasthost-flags=0
pem_passphrase_fsid=no
protocol=nc
xmlconfig-flags=0
service-type=org.freedesktop.NetworkManager.openconnect

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
method=auto

I'm using an up-to-date Arch Linux, with openconnect and networkmanager-openconnect installed. I'm using KDE Plasma, if relevant.

closed as off-topic by Sparhawk, Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura Nov 1 '17 at 16:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Sparhawk, Jeff Schaller, Stephen Rauch, GAD3R, Satō Katsura
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I'm not sure what happened, but now it's working. Perhaps an update fixed this. – Sparhawk Nov 1 '17 at 7:57