Open
Description
versions
- SlimerJS: 1.0.0
- Firefox: 59.x
- Operating system: Ubuntu 18.04
Steps to reproduce the issue
Heroku CLI provides a method to run one-off containers in detached/non-interactive mode (heroku run:detached
). I use this command to wget
a remote bash script and execute it. In the script, I have these lines:
#!/usr/bin/env bash
set -x
echo "Starting..."
slimerjs --headless /tmp/script.js
echo "Finishing..."
# now calling webhook to notify other end
curl -v -d 'done=xyz' https://webhook.example.com
However the process exits with 0
and the lines after slimerjs
never work.
It's weird that when running in interactive mode (full TTY), the script works as expected.
Actual results:
2019-05-11T17:23:32.125165+00:00 app[run.7880]: + echo Starting...
2019-05-11T17:23:32.125212+00:00 app[run.7880]: Starting...
2019-05-11T17:23:32.125295+00:00 app[run.7880]: + slimerjs --headless /tmp/script.js
2019-05-11T17:23:34.472415+00:00 app[run.7880]: Waiting for the button to fully appear...
2019-05-11T17:23:35.472665+00:00 app[run.7880]: Starting to render the page...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Completed. Exiting now...
2019-05-11T17:24:00.678075+00:00 heroku[run.7880]: State changed from up to complete
2019-05-11T17:24:00.660840+00:00 heroku[run.7880]: Process exited with status 0
Expected results:
2019-05-11T17:23:32.125165+00:00 app[run.7880]: + echo Starting...
2019-05-11T17:23:32.125212+00:00 app[run.7880]: Starting...
2019-05-11T17:23:32.125295+00:00 app[run.7880]: + slimerjs --headless /tmp/script.js
2019-05-11T17:23:34.472415+00:00 app[run.7880]: Waiting for the button to fully appear...
2019-05-11T17:23:35.472665+00:00 app[run.7880]: Starting to render the page...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Completed. Exiting now...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: + echo Finishing...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: Finishing...
2019-05-11T17:23:37.666730+00:00 app[run.7880]: . . .
2019-05-11T17:23:37.666730+00:00 app[run.7880]: ( curl verbose... )
2019-05-11T17:23:37.666730+00:00 app[run.7880]: . . .
2019-05-11T17:24:00.678075+00:00 heroku[run.7880]: State changed from up to complete
2019-05-11T17:24:00.660840+00:00 heroku[run.7880]: Process exited with status 0
Metadata
Metadata
Assignees
Labels
No labels