jerseysans / FetTools

Tools for making fetlife more tolerable and useful
GNU General Public License v3.0
4 stars 4 forks source link

npm Err! missing script:start #1

Open Slofe opened 4 years ago

Slofe commented 4 years ago

Hey,

I'm used to running scripts on tampermonkey so this is all new to me. I've followed tutorials on youtube to get the script cloned and all its dependencies installed. I can't actually get the thing to run though. I type npm start then the name of one of the .js files listed on git bash but I always get npm ERR! missing script: start So I'm quite stumped at this point. I don't even know if I'm on the right track for getting it run or even what to look for to know it's running. Does it run in a browser? Yeah I realise I sound like a total noob! I never thought I'd miss dos commands so much!

jerseysans commented 4 years ago

did you look at the readme?

Slofe commented 4 years ago

I did and turns out it was my bad I had an extra $ sign!

I got it to logging in stage but it then returned a Timeout Error: Waiting for selector.

jerseysans commented 4 years ago

if you change line 173 in groupCrawler to { devtools: true } you can see what the browser is doing and what the webpages are doing.

Slofe commented 4 years ago

This is what happens when I run the script:

Logging in... (node:3132) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector "[id="activity_feed_container"]" failed: timeout 30000ms exceeded at new WaitTask (C:\Users\user\fettools\node_modules\puppeteer\lib\DOMWorld. js:549:28) at DOMWorld._waitForSelectorOrXPath (C:\Users\user\fettools\node_modules\pup peteer\lib\DOMWorld.js:478:22) at DOMWorld.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\l ib\DOMWorld.js:432:17) at Frame.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\lib\ FrameManager.js:627:47) at Frame. (C:\Users\user\fettools\node_modules\puppeteer\lib\help er.js:112:23) at Page.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\lib\P age.js:1125:29) at MemberScanner.LogIn (C:\Users\user\fettools\groupCrawler.js:128:25) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async MemberScanner.ScanForUsers (C:\Users\user\fettools\groupCrawler.js: 134:9) at async module.exports (C:\Users\user\fettools\groupCrawler.js:177:5) (node:3132) 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:3132) [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.

jerseysans commented 4 years ago

create a file called "previouslyFound.json" put this in it

{
    "found": []
}
Slofe commented 4 years ago

I did that and I got a similar error:

(node:8228) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector "[id="activity_feed_container"]" failed: timeout 30000ms exceeded at new WaitTask (C:\Users\user\fettools\node_modules\puppeteer\lib\DOMWorld.js:549:28) at DOMWorld._waitForSelectorOrXPath (C:\Users\user\fettools\node_modules\puppeteer\lib\DOMWorld.js:478:22) at DOMWorld.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\lib\DOMWorld.js:432:17) at Frame.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\lib\FrameManager.js:627:47) at Frame. (C:\Users\user\fettools\node_modules\puppeteer\lib\helper.js:112:23) at Page.waitForSelector (C:\Users\user\fettools\node_modules\puppeteer\lib\Page.js:1125:29) at MemberScanner.LogIn (C:\Users\user\fettools\groupCrawler.js:128:25) at processTicksAndRejections (internal/process/task_queues.js:93:5) at async MemberScanner.ScanForUsers (C:\Users\user\fettools\groupCrawler.js:134:9) at async module.exports (C:\Users\user\fettools\groupCrawler.js:177:5) (node:8228) 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:8228) [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.

jerseysans commented 4 years ago

are you giving it a proper user name and password?

Slofe commented 4 years ago

Yes I am. My username does have a - on either side of it so maybe that's a problem?

jerseysans commented 4 years ago

I have not tested this on windows. If you're on win10 try running it in linux mode.

On Tue, Dec 10, 2019 at 5:46 PM Slofe notifications@github.com wrote:

Yes I am. My username does have a - on either side of it so maybe that's a problem?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jerseysans/FetTools/issues/1?email_source=notifications&email_token=ANVMDPLNKBVWQWKOP2SZ26DQYAL3NA5CNFSM4JYBIHHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGRHGMI#issuecomment-564294449, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVMDPNW4WLQLY3CY5L62ZTQYAL3NANCNFSM4JYBIHHA .

Slofe commented 4 years ago

Ah ok. I'm on windows 7. I should've know it might've been a windows problem!