spieglt / fb-delete Goto Github PK
View Code? Open in Web Editor NEWDelete your Facebook content by year and category
License: MIT License
Delete your Facebook content by year and category
License: MIT License
Hello - I try and just do the following and I get this error. Chromium stays open and stuck at:
? Please enter your Facebook password: *****************
? Select the categories you'd like to delete: Posts
? Select the years you'd like to delete: 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006, 2
005, 2004
(node:15252) UnhandledPromiseRejectionWarning: Error: Protocol error (Page.navigate): Invalid parameters url: string value expected
at C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\Connection.js:183:56
at new Promise (<anonymous>)
at CDPSession.send (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\Connection.js:182:12)
at navigate (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\FrameManager.js:118:39)
at FrameManager.navigateFrame (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\FrameManager.js:95:7)
at Frame.goto (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\FrameManager.js:406:37)
at Frame.<anonymous> (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\helper.js:112:23)
at Page.goto (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\Page.js:674:49)
at Page.<anonymous> (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\helper.js:112:23)
at followLinkByContent (C:\Users\jack\Downloads\fb-delete\index.js:101:14)
-- ASYNC --
at Frame.<anonymous> (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\helper.js:111:15)
at Page.goto (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\Page.js:674:49)
at Page.<anonymous> (C:\Users\jack\Downloads\fb-delete\node_modules\puppeteer\lib\helper.js:112:23)
at followLinkByContent (C:\Users\jack\Downloads\fb-delete\index.js:101:14)
at async next (C:\Users\jack\Downloads\fb-delete\index.js:30:3)
at async main (C:\Users\jack\Downloads\fb-delete\index.js:25:3)
(node:15252) 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:15252) [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:6988) UnhandledPromiseRejectionWarning: Error: Protocol error (Page.navigate): Invalid parameters url: string value expected
at Promise (c:\Users\Trent\Desktop\fb-delete-master\node_modules\puppeteer\lib\Connection.js:198:56)
at new Promise (<anonymous>)
at CDPSession.send (c:\Users\Trent\Desktop\fb-delete-master\node_modules\puppeteer\lib\Connection.js:197:12)
at navigate (c:\Users\Trent\Desktop\fb-delete-master\node_modules\puppeteer\lib\Page.js:520:39)
at Page.goto (c:\Users\Trent\Desktop\fb-delete-master\node_modules\puppeteer\lib\Page.js:500:7)
at followLinkByContent (c:\Users\Trent\Desktop\fb-delete-master\index.js:99:14)
at <anonymous>
(node:6988) 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:6988) [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.
That's the error message I get, it loads chronium, logs in fine then goes from my timeline to my profile and crashes... Any fixes?
Thanks for this: was looking for a way to remove past content easily instead of just hiding or setting to 'Friends'.
I figured I'd take it the whole way and remove 2018 content as well, but it errors out
Year 2018 not found. { Error: Protocol error (Page.navigate): Invalid parameters url: string value expected
at Promise (E:\fb-delete\node_modules\puppeteer\lib\Connection.js:198:56)
at new Promise (<anonymous>)
at CDPSession.send (E:\fb-delete\node_modules\puppeteer\lib\Connection.js:197:12)
at navigate (E:\fb-delete\node_modules\puppeteer\lib\Page.js:520:39)
at Page.goto (E:\fb-delete\node_modules\puppeteer\lib\Page.js:500:7)
at followLinkByContent (E:\fb-delete\index.js:99:14)
at <anonymous>
message: 'Protocol error (Page.navigate): Invalid parameters url: string value expected' }
Figured I'd post about it before digging too far into it.
Upon running the script as instructed, a chromium windows opens very briefly. Following error is printed in the terminal.
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
Error: Error: failed to find element matching selector "input[id=m_login_email]"
at ElementHandle.$eval (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/JSHandle.js:504:13)
at async main (/home/jakob/Downloads/fb-delete/index.js:18:3)
-- ASYNC --
at ElementHandle. (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/helper.js:111:15)
at DOMWorld.$eval (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/DOMWorld.js:156:21)
at async main (/home/jakob/Downloads/fb-delete/index.js:18:3)
-- ASYNC --
at Frame. (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/helper.js:111:15)
at Page.$eval (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/Page.js:345:29)
at Page. (/home/jakob/Downloads/fb-delete/node_modules/puppeteer/lib/helper.js:112:23)
at main (/home/jakob/Downloads/fb-delete/index.js:18:14)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:528:9)
at processTimers (node:internal/timers:502:7)
After recording the screen for the script execution, it seems that an 'accept cookies' window is what opens. It seems like the chromium browser that's opened is one installed as a dependency.
(node:1465) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome!
(chrome:1475): Gtk-WARNING **: 13:29:45.860: cannot open display:
TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/trou bleshooting.md
at onClose (/home/..[someLocation]/Launcher.js:255:14)
at Interface.helper.addEventListener (/home/k/Downloads/fb-delete-master/nod e_modules/puppeteer/lib/Launcher.js:244:50)
at emitNone (events.js:111:20)
at Interface.emit (events.js:208:7)
at Interface.close (readline.js:370:8)
at Socket.onend (readline.js:149:10)
at emitNone (events.js:111:20)
at Socket.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
(node:1465) 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:1465) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre cated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:5648) UnhandledPromiseRejectionWarning: Error: Protocol error (Page.navigate): Invalid parameters url: string value expected
at Promise (C:\Users\Renovatio\fb-delete\node_modules\puppeteer\lib\Connection.js:198:56)
at new Promise ()
at CDPSession.send (C:\Users\Renovatio\fb-delete\node_modules\puppeteer\lib
Connection.js:197:12)
at navigate (C:\Users\Renovatio\fb-delete\node_modules\puppeteer\lib\Page.js:520:39)
at Page.goto (C:\Users\Renovatio\fb-delete\node_modules\puppeteer\lib\Page.js:500:7)
at followLinkByContent (C:\Users\Renovatio\fb-delete\index.js:99:14)
(node:5648) 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:5648) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
(node:18746) UnhandledPromiseRejectionWarning: TypeError: puppeteer.launch is not a function
at main (/Users/[ ]/Documents/GitHub/fb-delete/index.js:11:35)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:18746) 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:18746) [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.
Hello,
First of all, thanks very much for the repo ! If it were to work on my machine it would be lovely.
I am not used to using javascript whatsover thus I have no idea how to debug this : when trying to run your script everything seems to work fine until chromium opens :
the log-ins are correctly written and should therefore allow the bot to connect itself. However, the bot validates my logins I then get the following error
(node:13088) 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:13088) [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.
Any idea what could cause such error to happen ?
Thanks anyway !
its possible to use this for delete post of a fanpage?
First: amazing code, thank you.
After running it the first time around, it deleted many of my posts but missed a lot as well. When I tried to go back and delete the missed ones, it skips everything and outputs "Done!"
Any ways to work around this?
(node:4824) 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:4824) [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.
Error: Error: failed to find element matching selector "input[id=m_login_email]"
at ElementHandle.$eval (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\JSHandle.js:504:13)
at async main (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\index.js:18:3)
-- ASYNC --
at ElementHandle. (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\helper.js:111:15)
at DOMWorld.$eval (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\DOMWorld.js:156:21)
at async main (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\index.js:18:3)
-- ASYNC --
at Frame. (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\helper.js:111:15)
at Page.$eval (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\Page.js:345:29)
at Page. (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\node_modules\puppeteer\lib\helper.js:112:23)
at main (C:\Users\Mr.Fox\Downloads\Compressed\fb-delete-master\fb-delete-master\index.js:18:14)
at runNextTicks (node:internal/process/task_queues:61:5)
at listOnTimeout (node:internal/timers:526:9)
at processTimers (node:internal/timers:500:7)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.