BUG: Ombi webhook enable endpoint returning 404 in production #40

Closed
opened 2026-05-23 09:53:04 +01:00 by Gandalf · 1 comment
Owner

Bug Description

The Ombi webhook setup is failing in production. When the frontend attempts to enable the webhook by sending a POST request to https://sofarr.i3omb.com/api/ombi/webhook/enable, the server responds with a 404 (Not Found) error in the console:

POST https://sofarr.i3omb.com/api/ombi/webhook/enable 404 (Not Found)
Failed to enable Ombi webhook: Error: Failed to enable
    at Fe (app.js:1:6504)
    at async HTMLButtonElement.lt (app.js:8:21364)

Root Cause

  1. In server/app.js (used for integration testing), the Ombi routes are imported and mounted correctly under /api/ombi:
    const ombiRoutes = require('./routes/ombi');
    ...
    app.use('/api/ombi', ombiRoutes);
    
  2. However, the production entry point server/index.js does NOT import createApp from server/app.js or mount the ombiRoutes router. Instead, server/index.js duplicates the Express app configuration and fails to register ombiRoutes, causing all /api/ombi/* endpoints to return a 404 (Not Found) in production.

Proposed Changes

  1. Import ombiRoutes in server/index.js:
    const ombiRoutes = require('./routes/ombi');
    
  2. Mount the Ombi router under /api/ombi in server/index.js:
    app.use('/api/ombi', ombiRoutes);
    
### Bug Description The Ombi webhook setup is failing in production. When the frontend attempts to enable the webhook by sending a `POST` request to `https://sofarr.i3omb.com/api/ombi/webhook/enable`, the server responds with a `404 (Not Found)` error in the console: ``` POST https://sofarr.i3omb.com/api/ombi/webhook/enable 404 (Not Found) Failed to enable Ombi webhook: Error: Failed to enable at Fe (app.js:1:6504) at async HTMLButtonElement.lt (app.js:8:21364) ``` ### Root Cause 1. In `server/app.js` (used for integration testing), the Ombi routes are imported and mounted correctly under `/api/ombi`: ```javascript const ombiRoutes = require('./routes/ombi'); ... app.use('/api/ombi', ombiRoutes); ``` 2. However, the production entry point `server/index.js` does NOT import `createApp` from `server/app.js` or mount the `ombiRoutes` router. Instead, `server/index.js` duplicates the Express app configuration and fails to register `ombiRoutes`, causing all `/api/ombi/*` endpoints to return a `404 (Not Found)` in production. ### Proposed Changes 1. Import `ombiRoutes` in `server/index.js`: ```javascript const ombiRoutes = require('./routes/ombi'); ``` 2. Mount the Ombi router under `/api/ombi` in `server/index.js`: ```javascript app.use('/api/ombi', ombiRoutes); ```
Gandalf added the Kind/Bug
Priority
High
2
labels 2026-05-23 09:53:04 +01:00
Gandalf reopened this issue 2026-05-23 09:59:05 +01:00
Author
Owner

Reopened and successfully closed via commit db809f2fb343bec48fe6c948fbaf6d66844a77b3 on the develop branch.

All automated tests passed successfully, confirming the Ombi routes /api/ombi/* are now correctly mounted in the production server entry point.

Reopened and successfully closed via commit [db809f2fb343bec48fe6c948fbaf6d66844a77b3](https://git.i3omb.com/Gandalf/sofarr/commit/db809f2fb343bec48fe6c948fbaf6d66844a77b3) on the `develop` branch. All automated tests passed successfully, confirming the Ombi routes `/api/ombi/*` are now correctly mounted in the production server entry point.
Gandalf added the Area/Proxy label 2026-05-28 11:58:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/sofarr#40