SShortSingh.
Back to feed

How a Chrome Manifest V3 Lifecycle Bug Silently Kills WebSocket Connections

0
·1 views

Chrome's Manifest V3 replaced persistent background pages with service workers that are automatically terminated after roughly 30 seconds of inactivity, causing WebSocket connections hosted there to drop without any error or warning. A developer building a live planning-poker extension for GitHub discovered this when users reported votes mysteriously stopping mid-session. The WebSocket had been moved to the background service worker to bypass GitHub's strict Content Security Policy, which blocked direct connections from content scripts, especially on Firefox. The silent disconnection was not a network failure but a browser lifecycle issue, as Chrome does not count an open socket as meaningful activity. The fix involves three measures: a heartbeat to keep the service worker awake, an auto-reconnect mechanism that fetches a fresh state snapshot on drop, and defensive error handling around every port message to account for the worker dying mid-execution.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

TraceTree malware scanner fixes critical verdict bug with help from OpenAI Codex

TraceTree is a file security tool that uses radare2 disassembly, YARA rule matching, and a machine learning pipeline to detect malicious behavior before files are executed. Its developer participated in OpenAI Build Week to continue improving the project, which combines these scans into a visual dashboard rather than raw log output. The most significant fix this round addressed a backend bug where dangerous files were incorrectly flagged with a yellow caution warning instead of a red danger verdict. OpenAI's Codex, running on GPT-5.6, helped trace the issue across the orchestrator, server, and frontend components. The developer noted that targeted, narrow prompts to AI agents proved far more effective than broad open-ended queries during the debugging process.

0
ProgrammingDEV Community ·

Why Software Engineers Must Understand Technology From the Ground Up

Software engineers are encouraged to evaluate new technologies by examining why a tool is needed, what it offers, and how it works internally. A strong grasp of fundamentals helps developers diagnose problems faster and integrate systems more effectively. Understanding core concepts — such as namespaces and control groups in containerization — enables better management of modern development environments. Grounding decisions in technical knowledge also helps teams future-proof their projects against rapidly shifting industry trends. The guidance emphasizes that informed, principle-driven technology adoption leads to more efficient and innovative software development outcomes.

0
ProgrammingDEV Community ·

SOC166 Walkthrough: XSS Attack from Malicious Chinese IP Blocked on Company Server

A cross-site scripting (XSS) attack was detected after JavaScript 'script' and 'alert' code was found embedded in a requested URL. The source IP address was traced to a Chinese internet service provider and flagged as malicious on both VirusTotal and AbuseIPDB, while the destination IP belonged to a corporate network. Log analysis revealed eight requests from the attacker to the same destination at the time of the incident, with seven returning HTTP 200 responses and the final one returning a 302 status, indicating the attack ultimately failed. No planned security tests were found in the Email Security section, ruling out an authorized simulation. As a precaution, the WebServer1002 endpoint was isolated to prevent any potential further damage.

0
ProgrammingHacker News ·

GPT, Claude, Gemini, and Grok Tested on Recreating the Mona Lisa

A blog post on TryAI.dev compared how several leading AI models — GPT-5.6, Claude, Gemini, and Grok — performed at a creative drawing task centered on the Mona Lisa. The experiment appears to evaluate each model's ability to generate or describe visual artwork using a colored-pencil style format. The post was shared on Hacker News, where it attracted modest early engagement with a small number of points and comments. The comparison offers an informal look at the current creative and visual reasoning capabilities across competing AI platforms.

How a Chrome Manifest V3 Lifecycle Bug Silently Kills WebSocket Connections · ShortSingh