mifi / instauto

Instagram bot / automation library written in Javascript for Node.js
797 stars 145 forks source link

"Failed to save database" #126

Open tteguayco opened 2 years ago

tteguayco commented 2 years ago

Any idea why this may be happening?

There is a message Failed to save database in the logs, and it occurs quite often.

2022-09-01T14:21:04.634Z Waiting 5.72 sec
Failed to save database
2022-09-01T14:21:10.409Z Waiting 1.46 sec
2022-09-01T14:21:11.872Z Waiting 22.94 sec
2022-09-01T14:21:34.820Z Have now unfollowed (or tried to unfollow) 7 users
2022-09-01T14:21:34.820Z Checking if user zackrossfitness follows us
2022-09-01T14:21:34.820Z Trying to get user data from HTML
2022-09-01T14:21:34.821Z Navigating to user zackrossfitness
2022-09-01T14:21:34.821Z Goto https://www.instagram.com/zackrossfitness
2022-09-01T14:21:39.829Z Page loaded
2022-09-01T14:21:39.830Z Waiting 2.71 sec
2022-09-01T14:21:42.561Z Need to intercept network request to get user data
2022-09-01T14:21:47.562Z Unable to intercept request, will send manually
2022-09-01T14:21:49.798Z User follows us? true
2022-09-01T14:21:49.798Z Checking if user loreniki007 follows us
2022-09-01T14:21:49.798Z Trying to get user data from HTML
2022-09-01T14:21:49.798Z Navigating to user loreniki007
2022-09-01T14:21:49.799Z Goto https://www.instagram.com/loreniki007
2022-09-01T14:21:57.825Z Page loaded
2022-09-01T14:21:57.825Z Waiting 3.52 sec
2022-09-01T14:22:01.374Z Need to intercept network request to get user data
2022-09-01T14:22:06.377Z Unable to intercept request, will send manually
2022-09-01T14:22:08.028Z User follows us? false
2022-09-01T14:22:08.029Z Navigating to user loreniki007
2022-09-01T14:22:08.029Z Goto https://www.instagram.com/loreniki007
2022-09-01T14:22:14.878Z Page loaded
2022-09-01T14:22:14.878Z Waiting 3.20 sec
2022-09-01T14:22:18.084Z Unfollowing user loreniki007
2022-09-01T14:22:18.185Z Waiting 1.42 sec
2022-09-01T14:22:19.707Z Waiting 8.27 sec
Failed to save database
2022-09-01T14:22:27.993Z Waiting 1.04 sec
2022-09-01T14:22:29.030Z Waiting 27.45 sec
2022-09-01T14:22:56.483Z Have now unfollowed (or tried to unfollow) 8 users
2022-09-01T14:22:56.483Z Checking if user petervigl follows us
2022-09-01T14:22:56.483Z Trying to get user data from HTML
2022-09-01T14:22:56.483Z Navigating to user petervigl
2022-09-01T14:22:56.484Z Goto https://www.instagram.com/petervigl
2022-09-01T14:23:03.794Z Page loaded
mifi commented 2 years ago

maybe the path is wrong? what's your code like?

tteguayco commented 2 years ago

maybe the path is wrong? what's your code like?

What path do you mean, @mifi? I'm running the example script that can be found in this repo, with a few tweaks on the options parameters.

mifi commented 2 years ago

Which folder are you running it from? Are you allowed to write files in that folder?

i meanthese: https://github.com/mifi/instauto/blob/96b5fa837f3375aa0df1e1397eef0c9d97a72c56/example.js#L79

tteguayco commented 2 years ago

Yeah, indeed I was specifying a non-existing folder in this path, thus getting the error.

Maybe it would be better to make that log error message more verbose?

Thanks for the help, @mifi. Instauto is an awesome project!

mifi commented 2 years ago

Yes it would indeed! Pr welcome