- New patterns/ directory with 7 initial failure-mode patterns (PAT-001..007) - skill-impact.md audit trail for skill modifications - _template.md for future pattern creation - index.md updated with Patterns section - log.md entry for this change - Inspired by arXiv:2608.27454 (WikiSkill)
59 lines
2.1 KiB
Markdown
59 lines
2.1 KiB
Markdown
---
|
|
pattern_id: PAT-006
|
|
title: "LinkedIn login via browser — nativeInputSetter required, session expires between nav"
|
|
category: integration
|
|
severity: medium
|
|
status: active
|
|
first_observed: 2026-07
|
|
last_updated: 2026-08-30
|
|
related_systems: []
|
|
related_solution_docs:
|
|
- docs/solutions/bug-fixes/2026-07-10-ha-token-expiry-browser-session-loss.md
|
|
related_skills: [linkedin-personal-branding]
|
|
---
|
|
|
|
# LinkedIn login via browser — nativeInputSetter required, session expires between nav
|
|
|
|
## Symptom
|
|
|
|
Automated LinkedIn login via browser tools fails silently. Form fields appear filled
|
|
but LinkedIn doesn't recognize the input (login button stays disabled, or submission
|
|
fails with "invalid credentials").
|
|
|
|
Additionally, authenticated sessions expire between page navigations, requiring
|
|
re-login on almost every navigation step.
|
|
|
|
## Root Cause
|
|
|
|
1. **React-controlled inputs**: LinkedIn uses React, which manages input state internally.
|
|
Simply setting `.value` via DOM manipulation doesn't trigger React's onChange handler.
|
|
The `nativeInputSetter` approach is required:
|
|
```javascript
|
|
const setter = Object.getOwnPropertyDescriptor(
|
|
window.HTMLInputElement.prototype, 'value'
|
|
).set;
|
|
setter.call(inputElement, 'my-value');
|
|
inputElement.dispatchEvent(new Event('input', { bubbles: true }));
|
|
```
|
|
|
|
2. **Session expiry**: LinkedIn's SPA doesn't persist auth tokens reliably across
|
|
`browser_navigate` calls (each navigation may reset the JS context).
|
|
|
|
## Mitigation
|
|
|
|
- Always use `browser_console` with `nativeInputSetter` for form fills — NOT `browser_click`
|
|
followed by typing
|
|
- Perform login + desired action in a SINGLE browsing session (minimize navigations)
|
|
- UTF-8 files must be saved without BOM (LinkedIn rejects BOM in posted content)
|
|
|
|
## Prevention
|
|
|
|
- The `linkedin-personal-branding` skill documents this workflow
|
|
- Never use `browser_click` for LinkedIn form fields
|
|
- Minimize navigation steps after login
|
|
|
|
## Evidence
|
|
|
|
- Observed during LinkedIn branding sessions (Jul 2026)
|
|
- MEMORY.md entry: "Login via browser_console nativeInputSetter. NOT browser_click. Session expires between nav. UTF-8 no BOM."
|