-
Notifications
You must be signed in to change notification settings - Fork 74
[ BUG ] Receive
commands generate index out of range
errors even when successful
#382
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
Comments
Thanks for the report! I've been looking at this one and I haven't tracked down where the error is popping up. Something is receiving an empty array when the download completes. |
I think I've tracked this down and relocated some internal functions to prevent the error from occurring. The changes will be present in the next release. If you'd like to resolve it for your local module before release, you can replace Import-Module -Name PSFalcon
$ModulePath = (Show-FalconModule).ModulePath
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/e60951774c23443ce7d3c7788c823d268c2a7fc1/private/Private.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath private) Private.ps1)
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/CrowdStrike/psfalcon/e60951774c23443ce7d3c7788c823d268c2a7fc1/class/Class.ps1 -UseBasicParsing).Content > (Join-Path (Join-Path $ModulePath class) Class.ps1) You will need to fully close and re-open PowerShell, re-import PSFalcon and re-request your token before testing the change. I'll leave this issue open for other users to apply this fix before the next release. |
Receive-FalconInstaller
Outputs Error "Index was out of range"Receive
commands generate index out of range
errors even when successful
@bk-cs thanks for a fix to this, I was banging my head against the wall last night trying to figure out what I was doing wrong. Do you have an ETA for a new release? |
Not yet. There have been several new API releases and I'm behind on adding them. I'm continuing it work on it and will put out the release as soon as I can. My hope is that including fixes in individual issues can fix problems and relieve some of the pressure to get the release out. 😄 |
@bk-cs hi
P.S. I got that it helped a guy with the same problem at another issue thread #398 but for me it doesn't work :( |
Did you restart PowerShell after applying that fix? Did you verify that the targeted files were updated? Usually the error is generated by a function that is called by all the PSFalcon commands--it shouldn't be specific to a file in the |
This fix is included in the 2.2.7 release. |
Describe the bug
Executing
Receive-FalconInstaller
results in an ArgumentOutOfRangeException. However, the sensor installer is actually successfully downloaded!To Reproduce
Expected behavior
I do not expect the exception.
Environment (please complete the following information):
Additional context
The sensor downloads successfully, it's just an odd error that pops out after the download is complete.
I cannot replicate the issue on PowerShell 7.1, it seems that something was introduced that makes PSFalcon incompatible with PowerShell 5.1. Since PS 5.1 is the default "Windows PowerShell", this is unfortunate.
Transcript content
The text was updated successfully, but these errors were encountered: