Product: PowerShell Universal
Version: 3.5.3
Installation type is Windows - MSI
PSU primary base dir has been moved to E:\PSU\RepositoryInternals
HTTPS is enabled via PKI-issued cert
I am having multiple issues with APIs since updating to 3.5.3 last night. What was working fine is now returning a 500 error from external requests. Just a 500, not QUITE instantly, but nothing else.
Testing in API details from the admin site gives this error:
TypeError: (intermediate value)(intermediate value)(intermediate value).create is not a function
at pe (https://eedevops/admin/static/js/0.cf1b51ae.chunk.js:1:12079)
at N (https://eedevops/admin/static/js/33.7c7f00fb.chunk.js:1:13716)
at K (https://eedevops/admin/static/js/33.7c7f00fb.chunk.js:1:8335)
at div
at div
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3389067
at n (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3109673)
at Suspense
at u (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:52982)
at E (https://eedevops/admin/static/js/75.503d1758.chunk.js:1:446)
at div
at d (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:974401)
at div
at t.b (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:975384)
at div
at div
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3389067
at div
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:1008601
at F (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:90333)
at div
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3009876
at T (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:89963)
at n (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3109673)
at Suspense
at u (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:52982)
at m (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:89459)
at g (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:89637)
at B (https://eedevops/admin/static/js/33.7c7f00fb.chunk.js:1:1518)
at d (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389246)
at p (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389574)
at c
at d (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389246)
at p (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389574)
at n (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3109673)
at Suspense
at u (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:52982)
at main
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:911817
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:911648
at section
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:912052
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:911648
at div
at div
at t (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:2880341)
at ve (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:140933)
at section
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:912052
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:911648
at section
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:912052
at https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:911648
at Bt (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:159506)
at d (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389246)
at p (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389574)
at h (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:389311)
at u (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:377284)
at n (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:3109673)
at Suspense
at u (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:52982)
at m (https://eedevops/admin/static/js/main.899d13a6.chunk.js:1:131891)
at s (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:940449)
at c (https://eedevops/admin/static/js/17.a9efa917.chunk.js:2:665677)
at va
It’s not clear if the same cause underlies both behaviors - I see a similar TypeError was reported and marked solved in June. If they’re separate, the only one I REALLY care about is the 500 error when using the API via HTTP requests.
A newly-created endpoint works without any issues, but I’d really like to avoid having to recreate these, and it seems reusing the “API path” is what leads to the issues. [EDIT: ha, nope, see reply]
It seems like something is getting stuck somewhere. None of this helps:
- Changing endpoint path
- Changing endpoint environment
- Toggling endpoint persistent logging
- Restarting APIs via button on Endpoints
- Restarting PSU service
Endpoint code (I excised the actual function but the behavior from PSU is the same) from endpoints.ps1:
New-PSUEndpoint -Url "/api/util/flip/:text" -Description "Flips text." -Method @('GET') -Endpoint {
param (
[parameter()]
[string]$Text
)
$Output = "Flipping: $Text"
New-PSUApiResponse -Body $Output -StatusCode 200 -Headers @{"content-type"="application/json;charset=UTF-8"}
} -Environment "Windows PowerShell 5.1"
All the endpoints are in endpoints.ps1 under .universal, nothing weird there.
Thanks!