Skip to content

fix: add FILES_BLOB_DIR to docker-compose and guard undefined array access in console#114

Open
Littly wants to merge 1 commit into
open-ma:mainfrom
Littly:fix/docker-and-frontend-null-safety
Open

fix: add FILES_BLOB_DIR to docker-compose and guard undefined array access in console#114
Littly wants to merge 1 commit into
open-ma:mainfrom
Littly:fix/docker-and-frontend-null-safety

Conversation

@Littly
Copy link
Copy Markdown

@Littly Littly commented May 28, 2026

Fixes

1. oma-server EACCES on startup (docker-compose)

FILES_BLOB_DIR was not set in docker-compose.yml, so the code fell back to the default relative path ./data/files-blobs. Under pnpm --filter, this resolves to /app/apps/main-node/data/files-blobs — outside the bind mount and without write permissions.

Fix: Add FILES_BLOB_DIR: /app/data/files-blobs to the oma-server environment so it uses the bind-mounted volume.

2. "Cannot read properties of undefined (reading 'length')" on new agent

The /v1/runtimes API may return runtime objects without an agents field. Frontend code accessed r.agents.length and r.agents.map() without null guards.

Fix:

  • AgentFormDialog.tsx: r.agents.lengthr.agents?.length
  • AgentsList.tsx: API response .data / .runtimes fields get ?? [] fallbacks
  • RuntimesList.tsx: r.agents gets ?? [] fallbacks

…ccess in console

- Add FILES_BLOB_DIR env var to docker-compose.yml so oma-server uses
  the bind-mounted /app/data/ dir instead of the relative ./data path
  which resolves outside the volume and causes EACCES.
- Guard r.agents?.length in AgentFormDialog runtime dropdown.
- Add ?? [] fallbacks in AgentsList for API response data fields.
- Add ?? [] fallbacks in RuntimesList for r.agents access.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant