DOC.07LIAP

๐Ÿ› Debugging & Logs

โ† Home


Log Files

FileWhat's in itHow to read
messenger_debug.logStep-by-step automation tracetail -50 messenger_debug.log
Live Feed tabWebSocket stream during runVisible in UI
Follow Up tab live feedFollow-up specific streamVisible in UI

messenger_debug.log Structure

Each run starts with a header:

============================================================
FOLLOWUP RUN START  2026-02-21T13:57:07  cap=5 wait_days=0 speed=1.0
============================================================

Then per-person entries:

Processing Tomer Fuss Sanderovich | url=https://linkedin.com/in/tomer-...
  Reply check: navigating to https://linkedin.com/in/tomer-...
  Clicking Message button on profile page...
  Found Message button via: main button:has-text('Message')
  Clicked Message button โ€” waiting for compose overlay...
  Compose overlay appeared (selector: .msg-form__contenteditable)
  Reply check: last_sender=unknown
  Compose box found via .msg-form__contenteditable
  AI follow-up full: Hi Tomer, I hope you're doing well!...
  Clicked Send button
  Follow-up sent and logged for Tomer Fuss Sanderovich

Common Issues & Fixes

Chrome doesn't open

Symptom: Button clicked, nothing happens, no log output. Fix: Restart uvicorn. Old process may still be running.

# Kill the old process
lsof -ti:8000 | xargs kill -9
# Restart
uvicorn main:app --reload --port 8000

"No messageable connections found"

Symptom: Run starts, Chrome opens connections page, exits immediately. Fix: The scan didn't find [data-view-name="message-button"] elements. Try scrolling LinkedIn first, or increase scan_limit.

"All connections already messaged"

Symptom: Run starts, skips everyone, exits. Fix: Expected behavior โ€” everyone in view has been messaged. Either wait for new connections or increase scan_limit.

Follow-up: "Nothing to follow up on yet"

Symptom: Follow-up run exits before Chrome opens. Fix: Either:

  • Set days slider to 0 (test mode โ€” messages all pending immediately)
  • Or wait the required number of days since first messages

"Compose box not found"

Symptom: Chrome opens the right page but nothing is typed. Fix: LinkedIn may have changed their DOM. Check messenger_debug.log for which selector failed. Share the Web Inspector HTML of the compose area.

CAPTCHA detected

Symptom: Run pauses, log shows "CAPTCHA detected". Fix: Solve the CAPTCHA manually in the Chrome window, then restart the run.

AI generates message with quotes

Symptom: Message starts with "Hi... or 'Hi.... Status: Fixed โ€” both _generate_message and _generate_followup_message strip leading/trailing quotes with .strip('"').strip("'").

"Keyboard.type: Target page has been closed"

Symptom: Exception in log, Chrome window closes mid-run. Cause: User closed Chrome manually, or Chrome crashed. Fix: Let the automation finish before interacting with the Chrome window. Use Stop button to cancel cleanly.


Selector Reference

Selectors confirmed working as of 2026-02-21:

ElementSelectorLocation
Message button (connections list)[data-view-name="message-button"]/mynetwork/invite-connect/connections/
Message link on carda[aria-label="Message"]Inside message-button wrapper
Message button (profile page)main button:has-text('Message')Profile page hero section
Compose text box.msg-form__contenteditableMessaging overlay
Compose text box (fallback)div[role='textbox']Messaging overlay
Send buttonbutton.msg-form__send-buttonMessaging overlay
Send button (fallback)button[aria-label='Send']Messaging overlay
Last msg (them).msg-s-event-listitem--otherThread overlay
Last msg (us).msg-s-event-listitem--selfThread overlay

TIP โ€” When selectors break LinkedIn occasionally updates their DOM. When something stops working, right-click the element in Chrome โ†’ Inspect โ†’ share the HTML with Claude to get the updated selector.


Key Bugs Fixed (Session History)

BugRoot CauseFix
All 10 cards showed same personJS walk-up overshot shared parentReduced from 5 to 3 levels + seenHrefs Set
Compose box "outside viewport"Stale element handle after OllamaRe-query compose box after AI call
2nd+ messages never sentOverlay state broke after firstNavigate directly to compose URL
Follow-up skipped everyone<a> selector on profile pageProfile page uses <button> โ€” click it directly
Follow-up jumped to messaging tabnavigating compose URLStay on profile, click Message button, overlay opens there
AI message wrapped in quotesOllama wraps output in "..."Strip with .strip('"').strip("'")
Chrome never opened in follow-upwait_days min was 1, blocked same-day messagesLowered min to 0