Skip to content

Latest commit

 

History

History
203 lines (156 loc) · 5.8 KB

File metadata and controls

203 lines (156 loc) · 5.8 KB

Quick Start - Debugging Steps

⚠️ Extension Not Working? Follow These Steps:

Step 1: Reload the Extension (IMPORTANT!)

  1. Go to chrome://extensions/
  2. Find "Higgsfield AI Automation"
  3. Click the circular reload icon
  4. Close ALL Higgsfield AI tabs
  5. Open a new tab: https://higgsfield.ai/sora-trends/tiktok

Step 2: Check the 3 Consoles

A. Service Worker Console

  1. Go to chrome://extensions/
  2. Click "Service worker" (blue link under the extension)
  3. Look for: "Background service worker loaded"
  4. ❌ If you see errors or nothing, reload the extension (Step 1)

B. Content Script Console

  1. On Higgsfield page, press F12
  2. Go to Console tab
  3. Look for: "Higgsfield AI automation content script loaded"
  4. ❌ If you don't see it:
    • Verify URL is exactly: https://higgsfield.ai/sora-trends/tiktok
    • Refresh the page
    • Check for red errors

C. Popup Console

  1. Click extension icon
  2. Right-click in popup → Inspect
  3. Go to Console tab
  4. Keep this open while testing

Step 3: Load CSV and Test

  1. Click extension icon
  2. Click "Choose CSV File"
  3. Select your CSV file
  4. Look for: "✓ X prompts loaded" (green text)
  5. If no message, check Popup Console for errors

Step 4: Click Start

  1. Make sure you're on: https://higgsfield.ai/sora-trends/tiktok
  2. Click "Start" button
  3. Watch ALL 3 consoles simultaneously:

Popup Console should show:

Start button clicked
Current tab: https://higgsfield.ai/sora-trends/tiktok
Sending start message to background...
Start response: { success: true }

Service Worker Console should show:

Background received message: { action: 'start' }
Starting automation...
startAutomation called
Current state: { prompts: [...], ... }
Processing next prompts...
Found 1 prompts to process: [0]
Showing confirmation notification...

Content Script Console should show (after you confirm):

Content script received message: { action: 'generatePrompt', ... }
=== GENERATE PROMPT CALLED ===
Step 1: Ensuring Unlimited is ON...
=== CHECKING UNLIMITED TOGGLE ===
✓ Unlimited is already ON
Step 2: Finding textarea...
✓ Found textarea, pasting prompt...
Step 4: Finding submit button...
✓ Found submit button with matching class
✓ Generation started successfully!

Step 5: What To Do If You See Errors

Error: "Extension context invalidated"

Fix: Reload extension (Step 1)

Error: "Cannot read properties of undefined (reading 'sendMessage')"

Fix:

  1. Reload extension
  2. Close all Higgsfield tabs
  3. Open new tab to Higgsfield

Error: "No prompts loaded"

Fix: Load CSV file first before clicking Start

Error: "Higgsfield AI tab not found"

Fix: Make sure you're on https://higgsfield.ai/sora-trends/tiktok (with /tiktok!)

Error: "Toggle button not found"

Check Content Script Console, it will list all switches found. Share that output.

Error: "Could not find textarea element"

Check Content Script Console, it will show how many textareas exist on the page.

Step 6: Run Diagnostic

On the Higgsfield page, press F12, go to Console, and paste this:

console.log('=== DIAGNOSTIC ===');
console.log('URL:', window.location.href);
console.log('Extension ID:', chrome.runtime?.id);
console.log('Textarea:', document.querySelector('textarea') ? 'FOUND ✓' : 'NOT FOUND ✗');
console.log('Unlimited toggle:', document.querySelector('button[role="switch"]') ? 'FOUND ✓' : 'NOT FOUND ✗');
console.log('Submit buttons:', document.querySelectorAll('button[type="submit"]').length);

chrome.storage.local.get(['prompts', 'currentIndex'], (data) => {
  console.log('Prompts loaded:', data.prompts?.length || 0);
  console.log('Current index:', data.currentIndex || 0);
});

Share the output if you need help!

Step 7: Test Content Script Communication

In the Higgsfield page console, run:

chrome.runtime.sendMessage({ action: 'ping' }, (response) => {
  console.log('Ping test response:', response);
});

Expected: { success: true, ready: true } If error: Extension or content script not loaded properly

Common Issues Checklist

  • Extension is enabled in chrome://extensions/
  • Extension has been reloaded after any code changes
  • You're on exactly: https://higgsfield.ai/sora-trends/tiktok
  • CSV file was loaded successfully (saw green "✓ X prompts loaded")
  • Start button is enabled (not grayed out)
  • All 3 console windows are open and visible
  • No red errors in any console before clicking Start
  • Notifications permission is granted

Still Not Working?

Share these details:

  1. Screenshot of Service Worker console
  2. Screenshot of Content Script console (Higgsfield page F12)
  3. Screenshot of Popup console
  4. Copy/paste any red error messages
  5. Output of the Diagnostic script (Step 6)

Quick Command Reference

Reload Extension:

chrome://extensions/ → Click reload icon on extension

Open Service Worker Console:

chrome://extensions/ → Click "Service worker" link

Open Content Script Console:

On Higgsfield page → Press F12 → Console tab

Open Popup Console:

Click extension icon → Right-click popup → Inspect → Console tab

Check Storage:

chrome.storage.local.get(null, (data) => console.log(data));

Expected Behavior (When Working)

  1. Load CSV → See green "✓ 5 prompts loaded"
  2. Click Start → See notification asking to confirm prompt #1
  3. Click "Yes" on notification
  4. See prompt appear in textarea on Higgsfield page
  5. See submit button get clicked automatically
  6. Generation starts
  7. After 5 minutes, extension checks status
  8. When complete, get notification for next prompt

The key is watching the console logs to see exactly where it fails!