-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Runspace error on pode start #1137
Comments
did some debugging and found there is a conflict with another module called "completionpredictor". this is what i found during debugging: Exception: C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.7.2\Private\Context.ps1:714:13
Line |
714 | $item.Pool.EndOpen($item.Result) | Out-Default
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Exception calling "EndOpen" with "1" argument(s): "The implementation with Id '77bb0bd8-2d8b-4210-ad14-79fb91a75eab' was already registered for the
| subsystem 'CommandPredictor'."
`` |
Hi @v2kiran, The first error appears to be when closing the runspace, while the second error seems to be while trying to open the runspace. Do you know if they're both related to the CommandPredictor module? If you try disabling the auto-importing of modules, does that resolve the issue? (https://badgerati.github.io/Pode/Tutorials/Scoping/#disable) |
hi @Badgerati - thanks for replying. I then changed the server.ps1 script slightly then ran into another error about importing modules after which i basically gave up. {
# attach to port 8080 for http
Add-PodeEndpoint -Address localhost -Port 8085 -Protocol Http
# a simple page for displaying services
Add-PodePage -Name 'processes' -ScriptBlock { Get-Process }
}
i also have this psd1 file named server.psd1 in the same directory but didnt change do anything: @{
Server = @{
AutoImport = @{
Modules = @{
Enable = $false
}
}
}
}
Import-Module: C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1:933:17
Line |
933 | … $null = Import-Module $path -DisableNameChecking -Scope Global -E …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The specified module 'C:\gh\learn-pode\31a63532-6abc-443a-8533-7462fe8fe31f' was not loaded because no valid module file was found in any module
| directory.
at Import-PodeModules, C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1: line 933
at Open-PodeRunspace, C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1: line 603
at <ScriptBlock>, <No file>: line 1
Import-Module: C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1:933:17
Line |
933 | … $null = Import-Module $path -DisableNameChecking -Scope Global -E …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The specified module 'C:\gh\learn-pode\31a63532-6abc-443a-8533-7462fe8fe31f' was not loaded because no valid module file was found in any module
| directory.
at Import-PodeModules, C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1: line 933
at Open-PodeRunspace, C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1: line 603
at <ScriptBlock>, <No file>: line 1
ParentContainsErrorRecordException: C:\Users\Kiran\OneDrive\Documents\PowerShell\Modules\Pode\2.8.0\Private\Helpers.ps1:730:9
Line |
730 | throw $_.Exception
| ~~~~~~~~~~~~~~~~~~
| Main runspace failed to load: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop:
| The specified module 'C:\gh\learn-pode\31a63532-6abc-443a-8533-7462fe8fe31f' was not loaded because no valid module file was found in any module
| directory.
|
Hi @v2kiran, Well I just found a bug with Auto-Importing! Turns out the configuration is actually being ignored, so I'll get that fixed. What's the module at |
thats great :) Note: this string (31a63532-6abc-443a-8533-7462fe8fe31f) changes everytime i restart the ps session.. |
Just a quick bump as I have the same issue as @v2kiran on a fresh Win10 insider system, tried in both 5.1 and 7.3.8. I'll try to build the dev version and see if that fixes it. EDIT: Didn't happen on a Win2012 server |
Describe the Bug
Failed to close RunspacePool: Main error on running pode start
Steps To Reproduce
Steps to reproduce the behavior:
create a simple server.ps1 witht he following content:
run
pode start
Expected Behavior
hello world is print with no error
Screenshots
Platform
Additional Context
Also tried with an older version of pode, tried another user account, different content in server.ps1
The text was updated successfully, but these errors were encountered: