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
I originally (yesterday) posted this on the Pode site as a question about the maximum value for Response Timeout. Seems that if I set the Timeout value to 600 (seconds - 5 Mins.), the Response timed out at 3 mins. and 30 seconds (See Pode Issue Related: ([https://github.com/Badgerati/Pode/issues/1235]))
Although the Response Timeout maximum value question still remains, I did some additional digging and found that it looks like New-PodeWebForm ScriptBlock also has a bug.
Here's the issue: If the ScriptBlock code runs for greater than 30 seconds, something is executing the ScriptBlockagain and again every 30 seconds until the Response Timeout of 3 mins. and 30 seconds is reached.
Steps To Reproduce
Create a page with a simple Web Form on it
In the ScriptBlock, add this code: Write-PodeHost "Calling ScriptBlock"; Start-Sleep -Seconds 45
Set your Pode Response Timeout value to 600 (seconds).
Start Pode in a Powershell session (Run as Administrator)
In a browser, navigate to your page/form and click on the Submit button
What you will see in your browser is a spinner on the Submit Button for 3 mins. and 30 seconds.
What you will see in your PowerShell session window is the phrase "Calling ScriptBlock", every 30 seconds until the Pode Response Time occurs at 3 mins. and 30 seconds. Then the Submit spinner in the browser page/form will stop spinning.
Expected Behavior
Pode Response Timeout should allow for setting the value to something larger than 210 seconds (3 mins. and 30 seconds), and honor that setting.
Pode.Web New-PodeWebForm ScriptBlock should not be re-executed every 30 seconds. It should run once unless the Submit button is clicked again.
Screenshots
Platform
OS: Windows
Browser: Chrome
Versions:
Pode: v2.9.0
Pode.Web: v0.8.2 - Upgraded to v0.8.3 - Issue persists
PowerShell: PS v5.1 Build: 19041 Revision: 3570
Additional Context
What I believe to be a Pode.Web New-PodeWebForm ScriptBlock bug, is what made me start looking at increasing the Pode Response Timeout value.
Now that I think of it: This behavior has been happening for a very long time. For long running pages like getting all AD users or Groups and displaying them in a table, this is what moved me to using Timer jobs to get that information and populating it into SQL tables or Pode variables. Then the page/table display code would fetch the needed information from either the SQL tables or the Pode variables.
The text was updated successfully, but these errors were encountered:
It's actually AJAX that's doing the 30secs auto-recall, and triggering the Forms scriptblock repeatedly. The last time I looked, I couldn't see an option to stop AJAX from doing this, but maybe there is one now! I'll have a gander at the AJAX docs, see if I can spot anything; it might even just be a case of altering an AJAX timeout potentially.
The above commit should now fix the Form timing out, so long as it's still less than the configured Request Timeout in your server.psd1.
For the Form/Ajax calling the endpoint again and again, sadly there isn't anything I can do - it's actually by design within most browsers in accordance with the HTTP/1.1 spec:
Describe the Bug
I originally (yesterday) posted this on the Pode site as a question about the maximum value for Response Timeout. Seems that if I set the Timeout value to 600 (seconds - 5 Mins.), the Response timed out at 3 mins. and 30 seconds (See Pode Issue Related: ([https://github.com/Badgerati/Pode/issues/1235]))
Although the Response Timeout maximum value question still remains, I did some additional digging and found that it looks like New-PodeWebForm ScriptBlock also has a bug.
Here's the issue: If the ScriptBlock code runs for greater than 30 seconds, something is executing the ScriptBlock again and again every 30 seconds until the Response Timeout of 3 mins. and 30 seconds is reached.
Steps To Reproduce
Write-PodeHost "Calling ScriptBlock"; Start-Sleep -Seconds 45
Expected Behavior
Screenshots
Platform
Additional Context
What I believe to be a Pode.Web New-PodeWebForm ScriptBlock bug, is what made me start looking at increasing the Pode Response Timeout value.
Now that I think of it: This behavior has been happening for a very long time. For long running pages like getting all AD users or Groups and displaying them in a table, this is what moved me to using Timer jobs to get that information and populating it into SQL tables or Pode variables. Then the page/table display code would fetch the needed information from either the SQL tables or the Pode variables.
The text was updated successfully, but these errors were encountered: