SpikeHD / AmazonMonitor

Amazon price checker, item monitor and stock monitor, all shoved into a Discord bot
GNU General Public License v3.0
221 stars 38 forks source link

No notifications & Proxies not working #69

Closed mrdubsuk closed 2 years ago

mrdubsuk commented 3 years ago

Describe the issue:

Hi,

Took me a while to get this working as I'm new to all this but got there in the end, Only issue I'm having is I'm got getting any pings or any notifications while testing. I've tested an item which is less then £500 and put a limit of 1000 but its not notifying me so I think there is something wrong.

Also I'm in the UK and the bot shows a $ sign when it pings to confirm watched item does that matter?

Also when I add proxies then it don't run, But the main thing is I'm not getting any price drop notifications.

Would love to get this working, Thanks in advance.

Paste the contents of your config.json, excluding the token, here:

[{
  "prefix":"!",
  "token":"",
  "minutes_per_check":2,
  "search_response_ms": 30000,
  "url_params":{},
  "guild_item_limit":10,
  "cache_limit": 10,
  "required_perms":["ADMINISTRATOR", "ADMINISTRATOR"],
  "tld":"co.uk",
  "auto_cart_link":true,
  "debug_enabled":true
}]

Provide console output with debug mode enabled:

[LOG]  Checking item prices...
[MESSAGE]  Type: headless
[MESSAGE]  Waiting a couple seconds for JavaScript to load...
[DEBUG]  Got page in 5683ms
[MESSAGE]  Type: pools, hot tubs & supplies

                swimming pools

                 frame pools
[DEBUG]  Detected as a regular item
[DEBUG]  Full object:
[DEBUG]  {
  full_title: 'INTEX 28273NP 177.25in x 86.625in x 33in Rectangular Frame Pool - Blue',
  full_link: 'https://www.amazon.co.uk/dp/B000XO2RV8/??',
  asin: 'B000XO2RV8',
  seller: 'Visit the Intex Store',
  price: '494.95',
  symbol: '£',
  shipping: 'Free with prime',
  rating: '4.5 out of 5 stars',
  features: [
    ' - Approx set-up size: 450cm x 220cm x 84cm',
    ' - Water Capacity(90%): 1,883gal(7,127L)',
    ' - Puncture-resistant 3-ply material',
    ' - Model number: 28273NP'
  ],
  availability: 'Only 2 left in stock.',
  image: 'https://images-na.ssl-images-amazon.com/images/I/511uAALQwyL._AC_SL1024_.jpg'
}
]

PROXY ISSUE: [MESSAGE] Type: proxy [MESSAGE] Selected proxy URL: (DELETED) [ERROR] Error: net::ERR_FAILED at https://www.amazon.co.uk/dp/B000XO2RV8/ at navigate (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:115:23) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async FrameManager.navigateFrame (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:90:21) at async Frame.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:417:16) at async Page.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:784:16) at async Object.exports.getPage (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\util.js:139:3) at async Object.exports.details (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\Amazon.js:104:16) at async Object.module.exports.run (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\commands\watch.js:60:18) at async exec (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\index.js:75:3) [ERROR] $ is not a function [ERROR] TypeError: Cannot read property 'full_link' of undefined at Object.module.exports.run (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\commands\watch.js:64:20) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async exec (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\index.js:75:3) (node:12268) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message at RequestHandler.execute (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:154:13) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async RequestHandler.push (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\discord.js\src\rest\RequestHandler.js:39:14) (Use node --trace-warnings ... to show where the warning was created) (node:12268) 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:12268) [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.

$ SIGN AND NOT £ IMAGE BELOW

Screenshot 2021-06-20 at 03 15 43

mrdubsuk commented 3 years ago

Ok so I did the price check test by changing last price in watchlist and that worked and sent me a ping. Only the proxy issue and $ now to sort.

mrdubsuk commented 3 years ago

Anyone help me out with the proxie issue please?

SpikeHD commented 3 years ago

The bot will not give a price update unless the price actually drops, because it stores the price the item is at when you set it to watch it.

To test the price notifications, you can follow the steps in my comment here.

I’ll take a look at the proxy stuff soon, I just do not work on this project often and therefore issues are a bit slow going.

mrdubsuk commented 3 years ago

Ok thanks,

An item did drop in price and the bot didn't pick it up. Not sure if that's to do with the proxy issue.

SpikeHD commented 3 years ago

That probably does, since its failing to retrieve the new info. Also, the issue of it not using the right currency symbol on the watching message is no big deal and isn't indicative of anything more

mrdubsuk commented 3 years ago

Hi,

Any update on the proxy issue, Please can you see if you can fix it, Would be great if I can get this working properly.

currently getting this message when not using proxies

[WARNING] Detected 7 empty values. Could potentially mean bot was flagged [WARNING] Aborting price update, data not valid [MESSAGE] Type: headless [MESSAGE] Waiting a couple seconds for JavaScript to load... [DEBUG] Got page in 2215ms [MESSAGE] Type: [DEBUG] Detected as a regular item [DEBUG] Full object: [DEBUG] {

And this is the error I get when I use proxies

[ERROR] Error: net::ERR_FAILED at https://www.amazon.co.uk/dp/B0749FLYR8/ at navigate (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:115:23) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async FrameManager.navigateFrame (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:90:21) at async Frame.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:417:16) at async Page.goto (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:784:16) at async Object.exports.getPage (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\util.js:139:3) at async Object.exports.details (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\Amazon.js:104:16) at async doCheck (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\util.js:209:20) (node:11336) UnhandledPromiseRejectionWarning: TypeError: $ is not a function at parse (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\Amazon.js:115:18) at Object.exports.details (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\Amazon.js:111:10) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async doCheck (C:\Users\Administrator\Desktop\Whitelisted Folder\AmazonMonitor-master\common\util.js:209:20) (node:11336) 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: 9)

SpikeHD commented 3 years ago

You’ll have to just be patient, I don’t have the time I used to have to dedicate to this project.

In the meantime, the empty values error is something that happens when Amazing temporarily flags the bot. Why proxies still error, I have yet to investigate.

SpikeHD commented 2 years ago

I know this is from forever ago, but I have moved to a different proxy handling library, so it could potentially start working again

SpikeHD commented 2 years ago

Okay this issue is very old BUT proxies are now confirmed working!