aio app run --local
action request returns OpenWhisk HTTP 502
#587
Labels
bug
Something isn't working
aio app run --local
action request returns OpenWhisk HTTP 502
#587
Expected Behaviour
Running
aio app run --local
and posting an action request with the same action and request parameters that return success one time would consistently open a Docker container and return the same success.Actual Behaviour
Running
aio app run --local
and posting an action request with the same action and request parameters that return success one time will on another occasion show the Docker container close unexpectedly and return an error "The action did not initialize and exited unexpectedly" with the status "action developer error".The response status code is 502.
This error message and status can be found in the OpenWhisk docs.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
Run
aio app run --local
.Make action request with
curl -i -X POST --json '{"data": {}}' -H "Authorization: Basic <redacted>" "http://localhost:3233/api/v1/namespaces/guest/actions/dx-excshell-1/<action>?blocking=true&result=true"
On one occasion, Docker Desktop will show a container open for the action and the above will return a success.
On another occasion, the same steps will show the container close in Docker Desktop and return an HTTP 502 status code with the error message "The action did not initialize and exited unexpectedly.". Reviewing the activation log reveals the
response.result.status
as "action developer error".Inconsistent workaround
Using the macOS Terminal, starting a new Terminal session before running
aio app run --local
seems to make the chances of success much greater.Environment Info
Sample Code that illustrates the problem
Any action code can be used to recreate this problem. An action will work one time and then return the HTTP 502 another.
The action can be as simple as:
Or it can be more complex, requiring other node packages, using
params
from the request and configuration, and manipulating data.Logs taken while reproducing problem
Error
Success
The text was updated successfully, but these errors were encountered: