Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error interacting with post #23

Open
Saunakghosh10 opened this issue Jan 16, 2025 · 1 comment
Open

Error interacting with post #23

Saunakghosh10 opened this issue Jan 16, 2025 · 1 comment

Comments

@Saunakghosh10
Copy link

npm start

[email protected] start
tsc && node build/index.js

info: Starting Instagram agent... {"timestamp":"10:25:56 PM"}
info: Server is running on port 3000 {"timestamp":"10:25:56 PM"}
info: Checking cookies existence: false {"timestamp":"10:25:57 PM"}
info: MongoDB connected {"timestamp":"10:25:57 PM"}
info: Cookies saved successfully. {"timestamp":"10:26:04 PM"}
Like button not found for post 1.
No caption found for post 1.
Comment box not found.
Waiting 5.976 seconds before moving to the next post...
Error interacting with post 1: TypeError: page.waitForTimeout is not a function
at interactWithPosts (D:\PROJECTS\Riona-AI-Agent\build\client\Instagram.js:158:24)
at async runInstagram (D:\PROJECTS\Riona-AI-Agent\build\client\Instagram.js:60:5)
at async runAgents (D:\PROJECTS\Riona-AI-Agent\build\app.js:63:5)
info: Instagram agent finished. {"timestamp":"10:26:05 PM"}

@hakunamatata1997
Copy link
Contributor

The page.waitForTimeout method in Puppeteer was removed in v22.

You can use timeout:

import {setTimeout} from "node:timers/promises";

await setTimeout(delay);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants