[PR #18976] [CLOSED] fix: resolve Firecrawl import error and Socket.IO CORS warning #25041

Closed
opened 2026-04-20 05:43:33 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/18976
Author: @Limbicnation
Created: 11/6/2025
Status: Closed

Base: mainHead: fix/firecrawl-import-and-socketio-cors


📝 Commits (1)

  • 5387b6d fix: 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:

  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

🔄 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>
GiteaMirror added the pull-request label 2026-04-20 05:43:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#25041