qeeqbox/social-analyzer · warning
Driver Session Issue
Error message
Driver Session Issue
What it means
In find_username_site_special_facebook_1 (modules/special-scan.js:78), 'Driver Session Issue' is a verbose-mode log printed when the Selenium WebDriver cleanup itself fails: after the main scan throws, the catch block calls await driver.quit() and that quit() call rejects. The original scan error is swallowed and only this cleanup failure message is logged, then the promise resolves with undefined.
Source
Thrown at modules/special-scan.js:78
if (source.includes('Try Entering Your Password')) {
temp_profile.found += 1
}
if (temp_profile.found > 0) {
temp_profile.text = 'unavailable'
temp_profile.title = 'unavailable'
temp_profile.rate = '%' + ((temp_profile.found / 1) * 100).toFixed(2)
temp_profile.link = site.url.replace('{username}', username)
temp_profile.type = site.type
resolve(temp_profile)
} else {
resolve(undefined)
}
} catch (err) {
if (driver !== undefined) {
try {
await driver.quit()
} catch (err) {
helper.verbose && console.log('Driver Session Issue')
}
}
resolve(undefined)
}
})
}
async function find_username_site_special_gmail_1 (uuid, username, site) {
return new Promise(async (resolve, reject) => {
helper.log_to_file_queue(uuid, '[Checking] ' + helper.get_site_from_url(site.url))
const driver = new Builder()
.forBrowser('firefox')
.setFirefoxOptions(new firefox.Options().headless().windowSize({
width: 640,
height: 480
}))
.build()
View on GitHub (pinned to 1ba0905e00)
Solutions
- Check verbose logs printed before cleanup to find the original scan error that triggered the catch block
- Ensure chromedriver version matches the installed Chrome version and the browser is installed/in PATH
- Run the driver in headless mode with proper flags when no display is available
- Treat a resolved undefined as 'scan failed' and retry the scan, creating a fresh driver instance
Example fix
// before
resolve(undefined) // only 'Driver Session Issue' logged, cause lost
// after
} catch (err) {
helper.verbose && console.log('scan failed:', err)
if (driver !== undefined) {
try { await driver.quit() } catch (quitErr) {
helper.verbose && console.log('Driver Session Issue:', quitErr)
}
}
resolve(undefined)
} Defensive patterns
Strategy: try-catch
Validate before calling
// before scanning, verify the driver is alive
const session = await driver.getSession().catch(() => null)
if (!session) {
driver = await new Builder().forBrowser('chrome').build()
} Type guard
function isDriverAlive(driver) {
return driver !== undefined && typeof driver.quit === 'function' && driver.session_ !== undefined
} Try / catch
try {
// facebook scan steps
} catch (scanErr) {
console.error('scan failed:', scanErr) // keep the real cause
if (driver !== undefined) {
try { await driver.quit() } catch (quitErr) {
if (!/invalid session|ECONNREFUSED/i.test(String(quitErr))) console.error('Driver Session Issue:', quitErr)
}
}
} Prevention
- Log the original scan error, not only the cleanup failure, to preserve root cause
- Match chromedriver and browser versions before running scans
- Use headless + --no-sandbox + --disable-dev-shm-usage in CI containers
- Create a fresh driver instance per scan instead of reusing possibly-dead sessions
When it happens
Trigger: An exception inside the Facebook selenium scan enters the catch; driver !== undefined; but driver.quit() throws because the session is already dead (browser crashed, driver process exited, session id invalid), and helper.verbose is true so the message is printed.
Common situations: Chromedriver/geckodriver version mismatch with installed browser; browser killed by OOM or timeout before quit; session already ended by an earlier quit or browser crash; running in CI/container without a display (headless not configured).
Related errors
AI-assisted analysis of qeeqbox/social-analyzer@1ba0905e00 (2026-08-31).
Data as JSON: /api/errors/8d46275d0ce51456.
Report an issue: GitHub.