You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.
Running Powershell Core 6.1.1 on CentOS Linux ("CentOS Linux release 7.6.1810 (Core)")
Installed powershell core from ms repo and did a Install-Module Polaris.
Eventually after running into problems, started off to Install-Module -Scope CurrentUser Polaris for debugging and troubleshooting.
Tested same problem with v0.1.0 and 0.2.0 module versions.
A clear and concise description of what the bug is.
SSH Session #1:
had to stop-polaris. Got no response at all in Browser or in session #2
So went troubleshooting. Seems in first place the $Polaris.Log() statements are blocking the I/O.
SSH Session #1:
$env:PSModulePath
/username/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/6/Modules
cd /usr/local/share/powershell/Modules/Polaris/0.2.0/lib
edited file Polaris.Class.ps1 and commented all line statements with "$Polaris.Log(" ...
Now, when i go to session #2 and do Stop-Polaris or Ctrl+C then it gives response in session #2:
VERBOSE: received 2-byte response of content type text/plain
VERBOSE: Content encoding: iso-8859-1
Sounds very similar to a known issue we have on Unix based platforms (OSX / Linux) detailed more in #136, could you try the following before running Polaris and see if the issue clears up for you:
Remove-Module PSReadline
(Not meant as a fix, just wanting to narrow the issue down)
I noticed before (because i came across the 136 issue), i have to do the Invoke-RestMethod in a second ssh tty or it hangs if i try to run it from the same tty where i execute the Start-Polaris CmdLet.
[update] Works from a browser to now, gets instant response.
Polaris Bug Report
Description of the bug
Running Powershell Core 6.1.1 on CentOS Linux ("CentOS Linux release 7.6.1810 (Core)")
Installed powershell core from ms repo and did a Install-Module Polaris.
Eventually after running into problems, started off to Install-Module -Scope CurrentUser Polaris for debugging and troubleshooting.
Tested same problem with v0.1.0 and 0.2.0 module versions.
A clear and concise description of what the bug is.
Steps to reproduce
SSH Session #1:
Import-Module Polaris
New-PolarisGetRoute -Path '/helloworld' -Scriptblock { $Response.Send("Hi"); return }
Stop-Polaris; Start-Polaris -Port 8080
SSH Session #2:
Invoke-RestMethod -Method GET -Uri http://machine:8080/helloworld -Verbose
VERBOSE: GET http://machine:8080/helloworld with 0-byte payload
--> // hangs here
SSH Session #1:
had to stop-polaris. Got no response at all in Browser or in session #2
So went troubleshooting. Seems in first place the $Polaris.Log() statements are blocking the I/O.
SSH Session #1:
$env:PSModulePath
/username/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/6/Modules
cd /usr/local/share/powershell/Modules/Polaris/0.2.0/lib
edited file Polaris.Class.ps1 and commented all line statements with "$Polaris.Log(" ...
Stop-Palaris
Remove-Module Polaris
Remove-Module Polaris.Class
Import-Module Polaris
New-PolarisGetRoute -Path '/helloworld' -Scriptblock { $Response.Send("Hi"); return } -Force
Start-Polaris -Port 8080
SSH Session #2:
Invoke-RestMethod -Method GET -Uri http://machine:8080/helloworld -Verbose
VERBOSE: GET http://machine:8080/helloworld with 0-byte payload
--> // hangs here (again)
Now, when i go to session #2 and do Stop-Polaris or Ctrl+C then it gives response in session #2:
VERBOSE: received 2-byte response of content type text/plain
VERBOSE: Content encoding: iso-8859-1
Expected behavior
Return me a value instant
Add any other context about the problem here.
Version Information
tested behaviour with Polaris v0.1.0 and v0.2.0
The text was updated successfully, but these errors were encountered: