Repository navigation
Description
Historical FAQ: apflow v0.7–v0.18. Archived on 2026-10-20.
The entries below describe issues already marked fixed in older releases. Several
workarounds refer to components removed or replaced in v2. This issue is being
closed as completed after adding current-version guidance and preserving the
original FAQ. New reproducible defects should be tracked in separate issues with
the apflow version, Python version, storage backend, and a minimal reproduction.
Guidance for apflow 0.22.1
- Python: Current releases require Python 3.11 or newer. The Python 3.10 datetime
workaround below is historical; theparse_iso_datetime()helper still exists. - Storage and CLI: SQLite is the default embedded backend; PostgreSQL is required
for distributed workers. DuckDB,config.cli.yaml, and the former CLI-to-API
Gateway workaround below belong to older releases. - Scheduling: Current scheduling uses a fresh run instance for each fire and
exposes its history throughschedule.history. The old shared-tree reset
workaround below does not describe the current clone-per-fire scheduling model. - Authentication: The current inbound webhook has its own HMAC configuration;
REST, MCP, and A2A JWT configuration is documented separately. The old
handle_webhook_trigger/_is_adminimplementation below has been replaced. - Executors: Built-in CrewAI integration was removed during v2 slimming.
Bring your own executor or use the function executor adapter. Select an executor
withparams.executor_id;schemas.methodremains a fallback. Use registered
executor IDs such asrest_executororaggregate_results_executor; the old
system_info_executorandcommand_executorexamples below are historical.
Current documentation:
- Installation and supported Python version
- Task orchestration and dependency results
- Storage migration and supported backends
- Scheduler and run history
- REST, JWT, and inbound webhooks
- Function executors
- Environment variables and logging
Original historical FAQ (preserved)
This issue documents common problems encountered when using apflow and their solutions. Updated as new issues are discovered and resolved.
1. ISO datetime 'Z' suffix parsing error (Python 3.10 and below)
Symptom: ValueError: Invalid isoformat string when passing datetime strings with 'Z' suffix.
Cause: Python 3.10's datetime.fromisoformat() does not support the 'Z' suffix (only Python 3.11+).
Solution (fixed in v0.15.0): Use parse_iso_datetime() helper from core/utils/helpers.py, which normalizes 'Z' to '+00:00' before parsing. All internal code has been updated.
2. Event loop conflicts in async CLI tests
Symptom: Tests hang with exit code 130 when combining @pytest.mark.asyncio with runner.invoke().
Cause: run_async_safe() attempts nested event loop execution inside pytest-asyncio's existing loop.
Solution (fixed in v0.11.0): ThreadPoolExecutor-based event loop isolation. Each async CLI operation runs in a separate thread with an independent event loop. See conftest.py for the implementation.
3. DuckDB concurrent write limitation
Symptom: Database lock errors when running both CLI and API server simultaneously.
Cause: DuckDB is a single-writer database. Only one process can write at a time.
Solution (addressed in v0.11.0): Use the CLI → API Gateway architecture. Configure api_server_url in config.cli.yaml, and all CLI writes route through the API server. For production with multiple writers, use PostgreSQL backend instead.
4. DuckDB custom path directory creation failure
Symptom: FileNotFoundError when specifying a custom DuckDB file path.
Cause: DuckDB does not create parent directories automatically.
Solution (fixed in v0.7.1): _ensure_database_directory_exists() now auto-creates parent directories. No user action needed on v0.7.1+.
5. Scheduler "Permission denied" when triggering tasks owned by other users
Symptom: Admin JWT tokens passed to webhook triggers return "Permission denied".
Cause: handle_webhook_trigger was not checking _is_admin(request), treating admin tokens as regular users.
Solution (fixed in v0.15.0): Admin check added to webhook trigger handler. Admin users get user_id=None, matching the pattern used by all other handlers.
6. Scheduled task re-execution produces stale results
Symptom: A scheduled parent task re-runs but its children retain completed status and old results from the previous cycle.
Cause: complete_scheduled_run() was not resetting child tasks before the next run.
Solution (fixed in v0.15.0): reset_task_tree_for_reexecution() now clears result, progress, and resets all children to pending before each scheduled re-execution.
7. CrewAI executor tests fail with OPENAI_API_KEY error
Symptom: Unit tests for CrewAI executors fail with OPENAI_API_KEY not set, even though tests should not call real APIs.
Cause: Missing mock patches for crewai.Agent and crewai.Task in test fixtures.
Solution (fixed in v0.18.0): Added crewai.Agent and crewai.Task patches in test_multi_phase_crew.py. Integration tests requiring real API keys now use api_keys_available fixture to skip when keys are not set.
8. Extension registration messages polluting CLI output
Symptom: Benign executor registration messages appear during normal CLI runs.
Cause: Registration messages were logged at INFO level.
Solution (fixed in v0.7.3): Registration messages demoted to DEBUG. Default log level is ERROR. Use LOG_LEVEL=DEBUG apflow ... to see them.
9. schemas.method field confusion in task definitions
Symptom: Task execution fails with "executor not found" when using placeholder values in schemas.method.
Cause: Documentation examples used placeholder values like "executor_id" instead of real executor IDs.
Solution (fixed in v0.7.2): All documentation examples updated to use valid executor IDs (e.g., "system_info_executor", "rest_executor", "command_executor"). The schemas.method field must match a registered executor ID.
Tips for Contributors
- Before opening a new issue, check if your problem is listed above.
- If you find a new common issue, comment below and we'll add it to this list.
- For executor-specific issues, include the executor ID and your input configuration.
- For database issues, specify your backend (DuckDB or PostgreSQL) and Python version.
Activity
fix: bridge module registration and validation gaps (CRITICAL #9-#14)