Step was canceled when trying to run server

Hello,
I want to run selenium tests on circleci and therefore I have to start my backend, which is django app and frontend (angular app served by gulp). The problem is that after starting them I get “Step was canceled” message. I’ve checked other threads but haven’t find any fix. Is there any workaround how to fix it?

docker:
- image: circleci/python:3.6-node-browsers
.
.
- run:
      name: Run backend
      command: |
        # Run backend
        cd project
        python3 manage.py migrate --fake-initial app
        python3 manage.py runserver
        background: true

Hi there,

Welcome to the community!

Can you give more details about “Step was canceled”? Where are you seeing this? Any links would be helpful.

Hello,

for example, when starting django webserver it shows this

python3 manage.py runserver

Operations to perform:
  Apply all migrations: app
Running migrations:
  No migrations to apply.
Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
July 04, 2019 - 10:25:52
Django version 2.2.3, using settings 'settings.django'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Step was canceled

I’m seeing this in the log of the step job.

I think I have seen this message before with backgrounded tasks - I suspect however your server is still running, and the message can be ignored.

Could you try to make the command one long command?

i.e.

cd project && python3 manage.py migrate && python3 manage.py runserver

I am not sure if background:true knows how to handle multiple commands.

The same thing happens when running as one long command.

Hi! were you able to resolve the issue? I want to run “python manage.py test” after running django server(python manage.py runserver) for selenium headless webdriver. facing the same issue.