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

Cannot process argument transformation on parameter 'InterfaceIndex'. #18

Open
albrrt opened this issue Apr 9, 2019 · 2 comments
Open

Comments

@albrrt
Copy link

albrrt commented Apr 9, 2019

Hi, I have downloaded the module and run the sample code on Win10, but after console prints Hotspot Enabled I am getting this error:

Unhandled rejection Error: Command failed:

"C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" "(Get-NetAdapter -ifIndex "undefined" | Get-NetIPAddress).IPv4Address"
Get-NetAdapter : Cannot process argument transformation on parameter 'InterfaceIndex'. Cannot convert value
"undefined" to type "System.UInt32[]". Error: "Cannot convert value "undefined" to type "System.UInt32". Error: "Input
string was not in a correct format.""
At line:1 char:26
+ (Get-NetAdapter -ifIndex undefined | Get-NetIPAddress).IPv4Address
+                          ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-NetAdapter], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-NetAdapter

    at ChildProcess.exithandler (child_process.js:294:12)
    at ChildProcess.emit (events.js:189:13)
    at maybeClose (internal/child_process.js:970:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

I have tried changing the adaptor options to false, 'Ethernet', 0, and removing the option completely, but it doesn't seem to solve the problem.

Curiously, if I run the script whilst connected to my home Wi-Fi access point (my internet router), the error disappears. The console prints

Hotspot disabled
Configuring hotspot with SSID: nodeHotspot
Starting hotspot
Hotspot started!
ICS Configuration successful!
Hotspot Enabled
Hotspot status: [object Object]

but the hotspot doesn't show up in the Wi-Fi lists of available networks.

I am running Node v10.15.2 on a Windows 10 64bit (v10.0.17134 Build 17134)

Has any of you encoutered this error?

@jordaofranca
Copy link

I had the same issue.

@MaxAlyokhin
Copy link

It seems to be related to the fact that all adapters on the device are "hosted network supported: no". I get the same error. It can only be solved by updating the drivers, but it is not guaranteed that this will work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants