Agentic AI Code: Code reviewed and manually tested by human contributor
Code review: Self-reviewed for code quality and standards compliance
Title Prefix: Using fix: prefix
Changelog Entry
Description
Fixed critical ImportError preventing application startup and resolved Socket.IO CORS origin validation warnings.
Added
SOCKETIO_CORS_ORIGINS variable in backend/open_webui/socket/main.py for proper CORS handling
Changed
Updated firecrawl imports from Firecrawl to FirecrawlApp in all affected files
Modified Socket.IO server configuration to use string wildcard for CORS
Fixed
Fixed ImportError: cannot import name 'Firecrawl' from 'firecrawl' (Issue #18973)
Fixed Socket.IO CORS warning: "is not an accepted origin" when using default CORS configuration
Fixed compatibility with firecrawl package v1.12.0+
Additional Information
Tested with firecrawl v1.12.0
Both fixes are backwards compatible
No breaking changes to existing functionality
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/18977
**Author:** [@Limbicnation](https://github.com/Limbicnation)
**Created:** 11/6/2025
**Status:** ❌ Closed
**Base:** `dev` ← **Head:** `fix/firecrawl-import-and-socketio-cors`
---
### 📝 Commits (2)
- [`e85c7f7`](https://github.com/open-webui/open-webui/commit/e85c7f79310f351672fe967a102396b6f3f5e88b) Merge pull request #18402 from open-webui/dev
- [`5387b6d`](https://github.com/open-webui/open-webui/commit/5387b6d8b8c44cfedc6037457f3f0eb4ea125efa) fix: resolve Firecrawl import error and Socket.IO CORS warning
### 📊 Changes
**3 files changed** (+10 additions, -7 deletions)
<details>
<summary>View changed files</summary>
📝 `backend/open_webui/retrieval/web/firecrawl.py` (+2 -2)
📝 `backend/open_webui/retrieval/web/utils.py` (+3 -3)
📝 `backend/open_webui/socket/main.py` (+5 -2)
</details>
### 📄 Description
## Description
Fixes #18973
This PR resolves two critical bugs preventing Open WebUI from starting:
1. **Firecrawl Import Error**: Updates imports to use `FirecrawlApp` instead of `Firecrawl`
2. **Socket.IO CORS Warning**: Properly handles wildcard CORS origins for Socket.IO
## Changes Made
### Firecrawl Import Fix
- Updated import from `Firecrawl` to `FirecrawlApp` in `backend/open_webui/retrieval/web/utils.py`
- Updated import from `Firecrawl` to `FirecrawlApp` in `backend/open_webui/retrieval/web/firecrawl.py`
- Updated all class instantiations to use `FirecrawlApp`
**Root Cause**: The firecrawl package (v1.12.0+) changed its exported class from `Firecrawl` to `FirecrawlApp`, causing ImportError on startup.
### Socket.IO CORS Fix
- Modified `backend/open_webui/socket/main.py` to properly handle wildcard CORS origins
- Added `SOCKETIO_CORS_ORIGINS` variable to convert `["*"]` to `"*"` for Socket.IO compatibility
**Root Cause**: Socket.IO requires wildcard CORS as string `"*"`, not list `["*"]`, causing origin validation warnings.
# Pull Request Checklist
- [x] **Target branch:** Targets the `dev` branch
- [x] **Description:** Concise description provided above
- [x] **Changelog:** Added below following Keep a Changelog format
- [ ] **Documentation:** No documentation changes needed (bug fix only)
- [ ] **Dependencies:** No new dependencies
- [x] **Testing:** Manually tested - application starts without errors, Socket.IO connects successfully
- [x] **Agentic AI Code:** Code reviewed and manually tested by human contributor
- [x] **Code review:** Self-reviewed for code quality and standards compliance
- [x] **Title Prefix:** Using `fix:` prefix
# Changelog Entry
### Description
Fixed critical ImportError preventing application startup and resolved Socket.IO CORS origin validation warnings.
### Added
- `SOCKETIO_CORS_ORIGINS` variable in `backend/open_webui/socket/main.py` for proper CORS handling
### Changed
- Updated firecrawl imports from `Firecrawl` to `FirecrawlApp` in all affected files
- Modified Socket.IO server configuration to use string wildcard for CORS
### Fixed
- Fixed ImportError: `cannot import name 'Firecrawl' from 'firecrawl'` (Issue #18973)
- Fixed Socket.IO CORS warning: "is not an accepted origin" when using default CORS configuration
- Fixed compatibility with firecrawl package v1.12.0+
### Additional Information
- Tested with firecrawl v1.12.0
- Both fixes are backwards compatible
- No breaking changes to existing functionality
### Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/18977
Author: @Limbicnation
Created: 11/6/2025
Status: ❌ Closed
Base:
dev← Head:fix/firecrawl-import-and-socketio-cors📝 Commits (2)
e85c7f7Merge pull request #18402 from open-webui/dev5387b6dfix: resolve Firecrawl import error and Socket.IO CORS warning📊 Changes
3 files changed (+10 additions, -7 deletions)
View changed files
📝
backend/open_webui/retrieval/web/firecrawl.py(+2 -2)📝
backend/open_webui/retrieval/web/utils.py(+3 -3)📝
backend/open_webui/socket/main.py(+5 -2)📄 Description
Description
Fixes #18973
This PR resolves two critical bugs preventing Open WebUI from starting:
FirecrawlAppinstead ofFirecrawlChanges Made
Firecrawl Import Fix
FirecrawltoFirecrawlAppinbackend/open_webui/retrieval/web/utils.pyFirecrawltoFirecrawlAppinbackend/open_webui/retrieval/web/firecrawl.pyFirecrawlAppRoot Cause: The firecrawl package (v1.12.0+) changed its exported class from
FirecrawltoFirecrawlApp, causing ImportError on startup.Socket.IO CORS Fix
backend/open_webui/socket/main.pyto properly handle wildcard CORS originsSOCKETIO_CORS_ORIGINSvariable to convert["*"]to"*"for Socket.IO compatibilityRoot Cause: Socket.IO requires wildcard CORS as string
"*", not list["*"], causing origin validation warnings.Pull Request Checklist
devbranchfix:prefixChangelog Entry
Description
Fixed critical ImportError preventing application startup and resolved Socket.IO CORS origin validation warnings.
Added
SOCKETIO_CORS_ORIGINSvariable inbackend/open_webui/socket/main.pyfor proper CORS handlingChanged
FirecrawltoFirecrawlAppin all affected filesFixed
cannot import name 'Firecrawl' from 'firecrawl'(Issue #18973)Additional Information
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.