Coder Social home page Coder Social logo

Failed to spawn script 'vpnc-script-win.js' for connect: The specified resource type cannot be found in the image file. about openconnect-gui HOT 19 CLOSED

nielspeen avatar nielspeen commented on August 15, 2024
Failed to spawn script 'vpnc-script-win.js' for connect: The specified resource type cannot be found in the image file.

from openconnect-gui.

Comments (19)

kiwiroy avatar kiwiroy commented on August 15, 2024

I saw the same error in the log for openconnect v7.0.0 from the command line without the gui installed. I found that deleting the TAP and re-adding solved this and made the vpn functional also.

C:\Program Files\TAP-Windows\bin\deltapall.bat
C:\Program Files\TAP-Windows\bin\addtap.bat

TAP-Windows Adaptor V9.9.2 from openvpn

from openconnect-gui.

vladr avatar vladr commented on August 15, 2024

FWIW: simply deleting and re-adding the i/f did not solve the problem for me. I had to add a SECOND i/f (e.g. Local Area Connection 5) on top of the first one, and then delete the first one (e.g. Local Area Connection 4) using Device Manager for netsh to be able to operate on it and for vpnc-script-win.js to succeed. One of my suspicions is that at some point in the distant past this machine may have briefly had another "Local Area Connection 4" and that traces of it are still left in the system, confusing netsh's i/f name lookup.

from openconnect-gui.

connLAN avatar connLAN commented on August 15, 2024

I met the same problem, I 'll recheck it later.

from openconnect-gui.

nmav avatar nmav commented on August 15, 2024

Is that still the case with the latest version?

from openconnect-gui.

TheAndyMac avatar TheAndyMac commented on August 15, 2024

I have this almost every time I try to connect, even with the command line (which comes with the GUI) where I am specifying the interface name specifically. Any further news on a fix for this? or is there a way to get some tracing of the detailed error code/s so that we can help reproduce the issue.

from openconnect-gui.

nmav avatar nmav commented on August 15, 2024

@TheAndyMac could there be something "strange" with the path openconnect is installed at? Could you retry with something simpler such as "C:\VPN" ?

from openconnect-gui.

TheAndyMac avatar TheAndyMac commented on August 15, 2024

Have found the cause (from another forum) which is related to (1) having IPv6 setup on the TAP driver and (2) running Windows 10. Not sure if same problem on pre-Win10 but switching off IPv6 gets rid of the problem (and not an issue for my work VPN as only IPv4 on that anyway). Maybe something in the script itself that does not like IPv6 connectivity on the TAP driver?

from openconnect-gui.

nmav avatar nmav commented on August 15, 2024

Could you figure which command fails in vpnc-script.js? E.g. by disabling all IP6 variable setting, and starting enabling few at a time until it fails.

from openconnect-gui.

TheAndyMac avatar TheAndyMac commented on August 15, 2024

I’ll try to set some time aside to do this in the next few days or so.

From: Nikos Mavrogiannopoulos [mailto:[email protected]]
Sent: 16 November 2015 13:08
To: openconnect/openconnect-gui [email protected]
Cc: TheAndyMac [email protected]
Subject: Re: [openconnect-gui] Failed to spawn script 'vpnc-script-win.js' for connect: The specified resource type cannot be found in the image file. (#25)

Could you figure which command fails in vpnc-script.js? E.g. by disabling all IP6 variable setting, and starting enabling few at a time until it fails.


Reply to this email directly or view it on GitHub #25 (comment) . https://github.com/notifications/beacon/AMMQxrTvXpVhecDHeWZ4I-isIpkSEZB_ks5pGczAgaJpZM4C_Buo.gif

from openconnect-gui.

TheAndyMac avatar TheAndyMac commented on August 15, 2024

I did not manage to do this, but think I have identified one of the issues (at least for the command line level operation using your build). Did have VMWare Player installed to provide the NAT for Hyper-V on my machine. Now that latest Windows 10 build has NAT (albeit without DHCP and only currently via PowerShell) have now removed VMWare Player and configured the Hyper-V NAT network connection – and so far (a number of connections later) not had any issues of the vpnc-script.js failing – so maybe this was something related to the VMWare virtual network ports… Don’t know if this helps any.

From: Nikos Mavrogiannopoulos [mailto:[email protected]]
Sent: 16 November 2015 13:08
To: openconnect/openconnect-gui [email protected]
Cc: TheAndyMac [email protected]
Subject: Re: [openconnect-gui] Failed to spawn script 'vpnc-script-win.js' for connect: The specified resource type cannot be found in the image file. (#25)

Could you figure which command fails in vpnc-script.js? E.g. by disabling all IP6 variable setting, and starting enabling few at a time until it fails.


Reply to this email directly or view it on GitHub #25 (comment) .

from openconnect-gui.

vkopichenko avatar vkopichenko commented on August 15, 2024

I had the same error message with latest version under russian windows until manually renamed in ncpa.cpl TAP-Windows Adaptor's network connection name from "Подключение по локальной сети 2" to just "OpenConnect". I guess, the problem was in encoding.

from openconnect-gui.

spetragl avatar spetragl commented on August 15, 2024

I always have this problem when I re-install. It creates "Local Area Connection 2" which causes openconnect to fail. However if I rename it to "MyTAP" it works fine. Windows doesn't like embedded blanks in the name.

from openconnect-gui.

horar avatar horar commented on August 15, 2024

@vkopichenko , @spetragl Hi, there was merged a pull request #87 this could solve encoding and spaces in names.

from openconnect-gui.

spetragl avatar spetragl commented on August 15, 2024

I received this message again today;
"2016-03-08 10:59 Failed to spawn script 'vpnc-script.js' for connect: There are no more files." which I realize is a little different from above. But I was wondering, can you display the errno / return code from the "exec" after that message? It might give us a clue what's happening.
I have a suspicion that you're probably receiving a non-zero from the Child (cscript.exe), but the file does indeed exist.

from openconnect-gui.

mfayez avatar mfayez commented on August 15, 2024

Guys, that did not work for me, that thing that worked for me is to change the file permission of that file:
C:\Program Files\OpenConnect\vpnc-script.js to allow everyone to have full control.

from openconnect-gui.

horar avatar horar commented on August 15, 2024

Hello, guys, could you please re-test with 1.4.0 if this problem is still valid? That script was updated; interfaces are not handled by name and logging is little bit improved (just close-open if you don't see vpnc.log in log window). Just to be update the status... Thanks in advance.

from openconnect-gui.

TheAndyMac avatar TheAndyMac commented on August 15, 2024

Tested and now seems to be solid. So far, connected first time each time, and connects fully to the AnyConnect servers - when running the command line on the previous version, sometimes it would seem to connect but either not resolve web sites correctly or even connect at all for Outlook/Exchange. With 1.4.0 (at least so far) every connection has been rock solid and complete first time. Awesome work!

from openconnect-gui.

horar avatar horar commented on August 15, 2024

Okay, then closing now - if someone get this kind of problem - feel free to re-open and update info from app's log

from openconnect-gui.

spetragl avatar spetragl commented on August 15, 2024

I tested your script for v1.4 and the “connect” was flawless.
Even the logfile “vpnc.log” contained all of the activity.
Beautiful!

One last suggestion.
We need to add the code to “disconnect” the custom SPLIT routes cleanly (that were added in “connect”).

Something like this:
var gw = getDefaultGateway();

// Delete direct route for the VPN gateway
echo(">Deleting Direct Route for VPN Gateway");
exec("route delete " + env("VPNGATEWAY") + " mask 255.255.255.255");

// Restore direct route
echo(">Restoring Direct Route");
exec("route delete 0.0.0.0 mask 0.0.0.0 ");
exec("route add 0.0.0.0 mask 0.0.0.0 " + gw);

// ReSet Tunnel Adapter IP = nothing
echo(">Resetting Tunnel Adapter IP");
exec("netsh interface ip set address name="" + env("TUNDEV") + "" source=static 1.0.0.0 255.255.255.255");
exec("netsh interface ip delete address "" + env("TUNDEV") + "" 1.0.0.0");

// Take Down IPv4 Split Tunnel Server-side Network Routes
if (env("CISCO_SPLIT_INC")) {
echo(">Removing IPv4 Split Tunnel INC Server-side Network Routes:");
for (var i = 0 ; i < parseInt(env("CISCO_SPLIT_INC")); i++) {
var network = env("CISCO_SPLIT_INC_" + i + "ADDR");
var netmask = env("CISCO_SPLIT_INC
" + i + "_MASK");
exec("route delete " + network);
}
}

// Take Down IPv4 Split Tunnel Client-side Network Routes
if (env("CISCO_SPLIT_LCL")) {
echo("Removing IPv4 Split Tunnel Local Client-side Network Routes:");
for (var i = 0 ; i < parseInt(env("CISCO_SPLIT_LCL")); i++) {
var network = env("CISCO_SPLIT_LCL_" + i + "ADDR");
var netmask = env("CISCO_SPLIT_LCL
" + i + "_MASK");
exec("route delete " + network);
}
}

From: TheAndyMac
Sent: Sunday, August 14, 2016 5:31 AM
To: openconnect/openconnect-gui
Cc: spetragl ; Mention
Subject: Re: [openconnect/openconnect-gui] Failed to spawn script 'vpnc-script-win.js' for connect: The specified resource type cannot be found in the image file. (#25)

Tested and now seems to be solid. So far, connected first time each time, and connects fully to the AnyConnect servers - when running the command line on the previous version, sometimes it would seem to connect but either not resolve web sites correctly or even connect at all for Outlook/Exchange. With 1.4.0 (at least so far) every connection has been rock solid and complete first time. Awesome work!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

from openconnect-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.