-
-
Notifications
You must be signed in to change notification settings - Fork 148
Open
Description
Bug Report: Login Failure Due to Changed Instagram Form Selectors
Description
The bot fails to login to Instagram because the login form HTML structure has changed. Instagram removed the name attributes from the username and password input fields, causing the current selectors to fail.
Current Behavior
- Bot attempts to find
input[name="email"]- element not found - Bot attempts to find
input[name="pass"]- element not found - Login process fails silently or with timeout errors
Expected Behavior
- Bot should successfully locate the username and password fields
- Bot should be able to type credentials and submit the login form
Root Cause
The selectors in src/index.ts (lines ~1259-1265) use outdated selectors:
await page.type('input[name="email"]', myUsername, { delay: 50 });
await page.type('input[name="pass"]', password, { delay: 50 });Instagram's current login form (as of February 2026) no longer includes these name attributes on the input fields.
Proposed Solution
Update the selectors to use the type attribute, which is more stable:
const usernameInput = await page.waitForSelector('input[type="text"]', { timeout: 5000 });
if (!usernameInput) throw new Error('Username input field not found');
await usernameInput.type(myUsername, { delay: 50 });
const passwordInput = await page.waitForSelector('input[type="password"]', { timeout: 5000 });
if (!passwordInput) throw new Error('Password input field not found');
await passwordInput.type(password, { delay: 50 });Benefits of This Approach
- Uses
waitForSelectorwith explicit timeout - Validates element existence before use
- Provides clear error messages
- Uses more stable selectors (type attributes)
Environment
- instauto version: 9.2.1 / 10.0.0
- Instagram interface: Current (February 2026)
- Affected projects: SimpleInstaBot and any project using instauto
Additional Context
I have already implemented and tested this fix in a fork:
- Fork: https://github.com/riacrdodoria/instauto
- Branch:
fix-instagram-login-selectors - Commit: riacrdodoria@06753b9
I'm preparing a Pull Request with this fix.
Impact
This is a critical bug that prevents the bot from functioning at all. Users cannot login to Instagram with the current version.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels