Firecrawl Import Error: Updates imports to use FirecrawlApp instead of Firecrawl (firecrawl v1.12.0+ API change)
Socket.IO CORS Warning: Properly handles wildcard CORS origins for Socket.IO
Changes
Updated backend/open_webui/retrieval/web/utils.py: Changed Firecrawl imports and instantiations
Updated backend/open_webui/retrieval/web/firecrawl.py: Changed Firecrawl imports and instantiations
Updated backend/open_webui/socket/main.py: Added proper CORS origin handling for Socket.IO
Testing
✅ Application starts without ImportError
✅ Socket.IO connects without CORS warnings
✅ Firecrawl integration works with current package version (v1.12.0)
Root Cause Analysis
Firecrawl Import Error
The firecrawl package changed its exported class name from Firecrawl to FirecrawlApp in recent versions. Open-WebUI was still importing the old class name, causing:
ImportError: cannot import name 'Firecrawl' from 'firecrawl'
Socket.IO CORS Warning
Open-WebUI's CORS_ALLOW_ORIGIN config splits on ; resulting in ['*'] when set to '*'. Socket.IO's cors_allowed_origins parameter expects the string '*' for wildcard, not a list ['*'], causing origin validation warnings.
Additional Context
The firecrawl package (v1.12.0+) only exports FirecrawlApp
Socket.IO documentation specifies wildcard origins must be a string, not a list
Both fixes are backwards compatible and non-breaking
🔄 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/18976
**Author:** [@Limbicnation](https://github.com/Limbicnation)
**Created:** 11/6/2025
**Status:** ❌ Closed
**Base:** `main` ← **Head:** `fix/firecrawl-import-and-socketio-cors`
---
### 📝 Commits (1)
- [`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 issues:
1. **Firecrawl Import Error**: Updates imports to use `FirecrawlApp` instead of `Firecrawl` (firecrawl v1.12.0+ API change)
2. **Socket.IO CORS Warning**: Properly handles wildcard CORS origins for Socket.IO
## Changes
- Updated `backend/open_webui/retrieval/web/utils.py`: Changed Firecrawl imports and instantiations
- Updated `backend/open_webui/retrieval/web/firecrawl.py`: Changed Firecrawl imports and instantiations
- Updated `backend/open_webui/socket/main.py`: Added proper CORS origin handling for Socket.IO
## Testing
- ✅ Application starts without ImportError
- ✅ Socket.IO connects without CORS warnings
- ✅ Firecrawl integration works with current package version (v1.12.0)
## Root Cause Analysis
### Firecrawl Import Error
The firecrawl package changed its exported class name from `Firecrawl` to `FirecrawlApp` in recent versions. Open-WebUI was still importing the old class name, causing:
```
ImportError: cannot import name 'Firecrawl' from 'firecrawl'
```
### Socket.IO CORS Warning
Open-WebUI's `CORS_ALLOW_ORIGIN` config splits on `;` resulting in `['*']` when set to `'*'`. Socket.IO's `cors_allowed_origins` parameter expects the string `'*'` for wildcard, not a list `['*']`, causing origin validation warnings.
## Additional Context
- The firecrawl package (v1.12.0+) only exports `FirecrawlApp`
- Socket.IO documentation specifies wildcard origins must be a string, not a list
- Both fixes are backwards compatible and non-breaking
---
<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/18976
Author: @Limbicnation
Created: 11/6/2025
Status: ❌ Closed
Base:
main← Head:fix/firecrawl-import-and-socketio-cors📝 Commits (1)
5387b6dfix: 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 issues:
FirecrawlAppinstead ofFirecrawl(firecrawl v1.12.0+ API change)Changes
backend/open_webui/retrieval/web/utils.py: Changed Firecrawl imports and instantiationsbackend/open_webui/retrieval/web/firecrawl.py: Changed Firecrawl imports and instantiationsbackend/open_webui/socket/main.py: Added proper CORS origin handling for Socket.IOTesting
Root Cause Analysis
Firecrawl Import Error
The firecrawl package changed its exported class name from
FirecrawltoFirecrawlAppin recent versions. Open-WebUI was still importing the old class name, causing:Socket.IO CORS Warning
Open-WebUI's
CORS_ALLOW_ORIGINconfig splits on;resulting in['*']when set to'*'. Socket.IO'scors_allowed_originsparameter expects the string'*'for wildcard, not a list['*'], causing origin validation warnings.Additional Context
FirecrawlApp🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.