Skip to content

M1 Mac: Job submission returns silent 500 error with no traceback (authentication works, pipelines registered) #1

@rhtoc

Description

@rhtoc

Environment

Hardware: Apple M1 MacBook Pro

OS: macOS 14.0 (Sonoma)

Python: 3.12.13

VideoAnnotator version: 1.4.2 (installed from main branch)

Installation method: pip install -e . in virtual environment

Description

After a clean installation following the project's instructions, the server starts successfully and all 9 pipelines are registered. Authentication works (API key is generated and accepted when AUTH_REQUIRED=true), but any attempt to submit a job via the API returns a 500 error with absolutely no traceback in the logs.
Steps to Reproduce

Fresh install with Python 3.12:

bash

git clone https://github.com/InfantLab/VideoAnnotator.git
cd VideoAnnotator
python3.12 -m venv venv
source venv/bin/activate
pip install -e .

Install dependencies:

bash

pip install torch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 --index-url https://download.pytorch.org/whl/cpu
pip install numpy==1.26.4
pip install openai-whisper
pip install pyannote.audio==3.3.2
pip install ultralytics deepface

Start server:

bash

export AUTH_REQUIRED=false # or true with API key
python -m videoannotator.cli server

Submit job (in another terminal):

bash

curl -X POST "http://127.0.0.1:18011/api/v1/jobs/"
-F "video=@/tmp/test.mp4"
-F "selected_pipelines=scene_detection"

Expected Behavior

Job should be accepted with status 201 and return a job_id

Processing should start in background

Logs should show job progress

Actual Behavior

Returns 500 error: {"error":{"code":"JOB_SUBMIT_FAILED","message":"Failed to submit job"}}

No traceback in logs - only shows:

text

[user:None] [request_id] INFO - Request started: POST /api/v1/jobs/
INFO:videoannotator.requests:POST /api/v1/jobs/ - 500 - 10.957s

What I've Tried

✓ Multiple clean installs (3 attempts)

✓ Both Python 3.10 and 3.12

✓ Authentication enabled/disabled

✓ Different pipelines (scene_detection, speech_recognition, person_tracking)

✓ Different video formats and sizes

✓ Fixed database schema issues (added missing columns, corrected api_keys.id type)

✓ Created missing storage modules (manager.py, providers)

✓ Checked file permissions and storage directories

✓ Server health check returns 200 with all systems healthy

Logs

Server starts cleanly:
text

[START] Starting VideoAnnotator API server on http://127.0.0.1:18011
[INFO] API documentation available at http://127.0.0.1:18011/docs
...
[INFO] [DATABASE] Initialized schema version 1
[INFO] [START] Background job processing started
INFO: Application startup complete.

Job submission attempt (only output):
text

[user:None] [8140f17e] INFO - Request started: POST /api/v1/jobs/
INFO:videoannotator.requests:POST /api/v1/jobs/ - 500 - 10.957s

No error messages, tracebacks, or warnings appear in any log file (api_server.log, errors.log, api_requests.log).
Additional Observations

The 500 error happens before any logging occurs in the job processing code

All pipelines are correctly registered and visible via /api/v1/pipelines

Database migrations complete successfully

The issue persists across multiple clean installs

Only occurs on M1 Mac (suspect architecture-specific bug)

Questions

Is M1 Mac officially supported?

Are there known issues with Python 3.12?

Is there a way to enable more verbose logging to catch this error?

Could this be related to a C extension crash (OpenCV, PyTorch) on Apple Silicon?

System Info
text

Platform: macOS-14.0-arm64-arm-64bit
Python: 3.12.13
CPU: Apple M1 (10 cores)
RAM: 32GB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions