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

UnhandledPromiseRejectionWarning: TimeoutError #28

Open
hamhamhammchamm opened this issue Mar 27, 2021 · 9 comments
Open

UnhandledPromiseRejectionWarning: TimeoutError #28

hamhamhammchamm opened this issue Mar 27, 2021 · 9 comments
Assignees
Labels
bug Something isn't working P1 Highest priorities

Comments

@hamhamhammchamm
Copy link

fgps --group-ids 610355872400171 --output C:/Users/xx/Documents/ Cookie banner did not appear (node:9572) UnhandledPromiseRejectionWarning: TimeoutError: waiting for XPath "//div[@data-pagelet="Stories"]" failed: timeout 30000ms exceeded at new WaitTask (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\DOMWorld.js:549:28) at DOMWorld._waitForSelectorOrXPath (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\DOMWorld.js:478:22) at DOMWorld.waitForXPath (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\DOMWorld.js:441:17) at Frame.waitForXPath (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\FrameManager.js:642:47) at Frame.<anonymous> (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\helper.js:112:23) at Page.waitForXPath (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\Page.js:1131:29) at facebookLogIn (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\src\index.js:366:14) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async main (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\src\index.js:612:10) (Use node --trace-warnings ...to show where the warning was created) (node:9572) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:9572) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:9572) UnhandledPromiseRejectionWarning: Error: Page crashed! at Page._onTargetCrashed (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\Page.js:213:24) at CDPSession.<anonymous> (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\Page.js:122:56) at CDPSession.emit (events.js:315:20) at CDPSession._onMessage (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\Connection.js:200:12) at Connection._onMessage (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\Connection.js:112:17) at WebSocket.<anonymous> (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\puppeteer\lib\WebSocketTransport.js:44:24) at WebSocket.onMessage (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\ws\lib\event-target.js:120:16) at WebSocket.emit (events.js:315:20) at Receiver.receiverOnMessage (C:\Users\xx\AppData\Roaming\npm\node_modules\facebook-group-posts-scraper\node_modules\ws\lib\websocket.js:789:20) at Receiver.emit (events.js:315:20) (node:9572) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) ERROR: The process with PID 2340 (child process of PID 9572) could not be terminated. Reason: There is no running instance of the task.

Hi I'm experiencing this error after installing 2.4.0.

@kaanyagci kaanyagci self-assigned this Mar 27, 2021
@kaanyagci kaanyagci added the bug Something isn't working label Mar 27, 2021
@kaanyagci
Copy link
Contributor

Hi @hamhamhammchamm

Thanks for your contribution, are you running a different version of Facebook? Like a newer or an older UI. Because it seems like, stories at the top of the page did not appear for you 🤔

@hamhamhammchamm
Copy link
Author

Hi @hamhamhammchamm

Thanks for your contribution, are you running a different version of Facebook? Like a newer or an older UI. Because it seems like, stories at the top of the page did not appear for you 🤔

I see the stories at the top of the page when I browse my Facebook, and I don't believe I'm using an older/newer UI.

@kaanyagci
Copy link
Contributor

Hi @hamhamhammchamm
Thanks for your contribution, are you running a different version of Facebook? Like a newer or an older UI. Because it seems like, stories at the top of the page did not appear for you 🤔

I see the stories at the top of the page when I browse my Facebook, and I don't believe I'm using an older/newer UI.

This is weird. I'll check it out. While waiting, you can try the Docker image

@oscard0m
Copy link

Happened same to me. Running it in --headful mode I got the 2FactorAuthentication page (or the page where I have to say I trust this browser). Could this be the issue?

@oscard0m
Copy link

Hi @hamhamhammchamm
Thanks for your contribution, are you running a different version of Facebook? Like a newer or an older UI. Because it seems like, stories at the top of the page did not appear for you 🤔

I see the stories at the top of the page when I browse my Facebook, and I don't believe I'm using an older/newer UI.

This is weird. I'll check it out. While waiting, you can try the Docker image

Running it with Docker I get the following issue:

~ # fgps --group-ids XXXXXXXXXXXXX
/usr/local/lib/node_modules/facebook-group-posts-scraper/node_modules/puppeteer/lib/Launcher.js:750
      reject(new Error([
             ^

Error: Failed to launch the browser process! spawn /usr/local/lib/node_modules/facebook-group-posts-scraper/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome ENOENT


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md

    at onClose (/usr/local/lib/node_modules/facebook-group-posts-scraper/node_modules/puppeteer/lib/Launcher.js:750:14)
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/facebook-group-posts-scraper/node_modules/puppeteer/lib/Launcher.js:741:65)
    at ChildProcess.emit (node:events:365:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

@kaanyagci
Copy link
Contributor

kaanyagci commented May 28, 2021

Happened same to me. Running it in --headful mode I got the 2FactorAuthentication page (or the page where I have to say I trust this browser). Could this be the issue?

Hi ! Sorry for the delay ! Sorry to hear that you had an issue I'll check as soon as possible

@oscard0m
Copy link

Happened same to me. Running it in --headful mode I got the 2FactorAuthentication page (or the page where I have to say I trust this browser). Could this be the issue?

Hi ! Sorry for the delay ! Sorry to hear that you had an issue I'll check as soon as possible

If I can help you to debug or so, let me know. Thanks for your assistance and no rush at all.

@kaanyagci kaanyagci added the P1 Highest priorities label May 28, 2021
@kaanyagci
Copy link
Contributor

Hi @oscard0m ,

Hope you're doing great ! A new version 4.0.0 just got released. In this version, the CLI feature is not more available. For the CLI you can refer to fbjs-cli repo. Now, we can handle 2FA pages and cookie based authentication too.

Also any contributions are more than welcome.
Happy coding 😎  

@oscard0m
Copy link

oscard0m commented Aug 3, 2021

Hi @oscard0m ,

Hope you're doing great ! A new version 4.0.0 just got released. In this version, the CLI feature is not more available. For the CLI you can refer to fbjs-cli repo. Now, we can handle 2FA pages and cookie based authentication too.

Also any contributions are more than welcome.
Happy coding 😎

Thanks for the updated @kaanyagci. For the moment I stopped working on the project where I was getting this error. If I jump back to it I will give a try to fbjs-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1 Highest priorities
Projects
None yet
Development

No branches or pull requests

3 participants