spieglt / fb-photos

Download "Photos of me" on Facebook
MIT License
34 stars 5 forks source link

UnhandledPromiseRejectionWarning #1

Closed Duartemartins closed 4 years ago

Duartemartins commented 4 years ago

I get the following error, which I have the feeling is an easy fix.

(node:12191) UnhandledPromiseRejectionWarning: Error: Protocol error (Page.addScriptToEvaluateOnNewDocument): Target closed.
    at Promise (/Users/user/fb/node_modules/puppeteer/lib/Connection.js:183:56)
    at new Promise (<anonymous>)
    at CDPSession.send (/Users/user/fb/node_modules/puppeteer/lib/Connection.js:182:12)
    at FrameManager._ensureIsolatedWorld (/Users/user/fb/node_modules/puppeteer/lib/FrameManager.js:270:24)
    at Promise.all._client.send.then (/Users/user/fb/node_modules/puppeteer/lib/FrameManager.js:66:63)
  -- ASYNC --
    at Target.<anonymous> (/Users/user/fb/node_modules/puppeteer/lib/helper.js:111:15)
    at Browser._createPageInContext (/Users/user/fb/node_modules/puppeteer/lib/Browser.js:177:31)
  -- ASYNC --
    at Browser.<anonymous> /Users/user/fb/node_modules/puppeteer/lib/helper.js:111:15)
    at main (/Users/user/fb/index.js:15:24)
(node:12191) 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(). (rejection id: 1)
(node:12191) [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.
spieglt commented 4 years ago

It died at https://github.com/spieglt/fb-photos/blob/master/index.js#L15, meaning it couldn't spawn a browser window, which must be a problem on your side unfortunately. What OS are you using? Did you npm install or have any issues there?

However, while testing this, I did find that Facebook completely redesigned their front-end, meaning that this repo is broken for now and it's going to take some effort to get working again. I'll post updates here as I have them. Thanks for your interest!

spieglt commented 4 years ago

@Duartemartins The repo is fixed, so if you can get past that error you'll be able to use it. Happy to help if you can give me some more detail.

spieglt commented 4 years ago

Closing this for now but feel free to reach back out.

Duartemartins commented 4 years ago

I've since retrieved all my photos and deleted my account so I can't try again. Thanks for taking a look, nonetheless 👍