Skip to content

[Bug]: Docker Job Queue API Error: 'NoneType' object has no attribute 'new_context' #1842

@pbtsrc

Description

@pbtsrc

crawl4ai version

0.8.0

Expected Behavior

No errors in logs

Current Behavior

Sometimes a job takes much longer than usual to complete, and there are many such errors in the logs:

Code context:
1051                   perms = context_settings.get("permissions", [])
1052                   perms.append("geolocation")
1053                   context_settings["permissions"] = perms
1054
1055           # Create and return the context with all settings
1056 →         context = await self.browser.new_context(**context_settings)
1057
1058           # Apply text mode settings if enabled
1059           if self.config.text_mode:
1060               # Create and apply route patterns for each extension
1061               for ext in blocked_extensions:
[ERROR]... × https://somesite.com  | Error:
Unexpected error in _crawl_web at line 1056 in create_browser_context
(../usr/local/lib/python3.12/site-packages/crawl4ai/browser_manager.py):
Error: 'NoneType' object has no attribute 'new_context'

Is this reproducible?

No

Inputs Causing the Bug

Steps to Reproduce

Code snippets

OS

Linux

Python version

3.12

Browser

No response

Browser version

No response

Error logs & Screenshots (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 BugSomething isn't working🩺 Needs TriageNeeds attention of maintainers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions