alleyway / add-tradingview-alerts-tool

Automated entry of TradingView alerts for bot trading tools such as 3Commas, Alertatron, CryptoHopper, etc.
MIT License
636 stars 141 forks source link

Timeout exceeding adding symbol #34

Closed tedwardd closed 3 years ago

tedwardd commented 3 years ago

After successfully logging in, ATAT attempts to add the first alert and fails with the following error. This is on MacOS 10.15.7

$ npx cross-env node -r source-map-support/register dist/add-alerts.js
 Current Log level: 3 (you can set env variable ATAT_LOG_LEVEL=5 for verbose logging)                        14:59:28
 Base delay: 1000 (you can set env variable BASE_DELAY=1000 to increase/decrease speed)                      14:59:28
 Using config file:  config.yml                                                                              14:59:28
 Press Ctrl-C to stop this script                                                                            14:59:28
 Adding symbol: BINANCEUS:BTCUSD  ( BTC priced in USD )                                                      14:59:55

 ERROR  waiting for XPath //div[@id="header-toolbar-symbol-search"] failed: timeout 20000ms exceeded          15:00:17

  at new WaitTask (node_modules/puppeteer/src/common/DOMWorld.ts:776:28)
  at DOMWorld.waitForXPath (node_modules/puppeteer/src/common/DOMWorld.ts:671:22)
  at Frame.waitForXPath (node_modules/puppeteer/src/common/FrameManager.ts:1189:47)
  at Page.waitForXPath (node_modules/puppeteer/src/common/Page.ts:1982:29)
  at src/service/tv-page-actions.ts:14:20
  at Generator.next (<anonymous>)
  at dist/service/tv-page-actions.js:7:71
  at new Promise (<anonymous>)
  at __awaiter (dist/service/tv-page-actions.js:3:12)
  at fetchFirstXPath (src/service/tv-page-actions.ts:11:82)
  $ npm list
@alleyway/add-tradingview-alerts-tool@1.6.10 /Users/tedwardd/git-work/add-tradingview-alerts-tool
├── @fast-csv/format@4.3.5
├── @fast-csv/parse@4.3.6
├── @types/node@14.14.35
├── chromium@3.0.2
├── consola@2.15.3
├── cross-env@7.0.3
├── csv-parser@3.0.0
├── fast-csv@4.3.6
├── kleur@4.1.4
├── node-fetch@2.6.1
├── puppeteer@7.1.0
├── release-it@14.5.0
├── source-map-support@0.5.19
├── typescript@4.2.3
└── yaml@1.10.2
mlake commented 3 years ago

hi there - does this happen consistently for you? or only sometimes? do you have a fast/slow internet connection?

tedwardd commented 3 years ago

This is consistently repeatable. I have a fast, 1Gbps, fiber internet connection.

I've attached a screen recording of what happens. Let me know if there's any other information I can provide to assist. example_timeout

tedwardd commented 3 years ago

Nevermind. I solved the issue. I did not realize I had to change the value for chartUrl in config.yml. I changed that and now it works. Might want to make this more apparent in the docs. Cheers.

mlake commented 3 years ago

Hi! Thanks for pointing out the bad UX - I've added an error that will show up if people forget to change the chartUrl!

Cheers, Michael