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

TypeError: Cannot convert undefined or null to object #108

Closed DuhVinci85 closed 7 months ago

DuhVinci85 commented 7 months ago

Describe the issue:

whenever u try to run any command on the bot except for help command it gives out "TypeError: Cannot convert undefined or null to object" or "ProtocolError: Target.createTarget timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed."

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

{ "prefix":"!", "token":"sus", "minutes_per_check":2, "seconds_between_check": 5, "url_params":{}, "guild_item_limit":5, "cache_limit": 10, "required_perms":["PermissionsBitField.Flags.SendMessages"], "tld":"com", "auto_cart_link":true, "debug_enabled":true, "custom_chromium_exec":"" }

[!details https://www.amazon.com/BISSELL-Cleanview-Upright-Bagless-2252/dp/B07F6N3RT6/?_encoding=UTF8&pd_rd_i=B07F6N3RT6&pd_rd_w=QWvSG&content-id=amzn1.sym.027708f5-a26d-4238-b7b5-ae4b23b6d141&pf_rd_p=027708f5-a26d-4238-b7b5-ae4b23b6d141&pf_rd_r=E724WKBA0ENNTJWWCN16&pd_rd_wg=Mtgpi&pd_rd_r=85d0480e-1f85-46e6-897d-483864adaa12

or

!search iphone12

]

Provide console output with debug mode enabled:

[[ERROR]  TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at Object.run (c:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\commands\details.ts:25:10)
    at exec (c:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\index.ts:104:3)]

    or 
[ERROR]  ProtocolError: Target.createTarget timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
    at Callback.<instance_members_initializer> (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Connection.ts:66:12)
    at Callback (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Connection.ts:71:3)
    at CallbackRegistry.create (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Connection.ts:127:22)
    at Connection._rawSend (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Connection.ts:278:22)
    at Connection.send (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Connection.ts:266:17)
    at CDPBrowser._createPageInContext (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Browser.ts:432:47)
    at CDPBrowserContext.newPage (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Browser.ts:721:26)
    at CDPBrowser.newPage (C:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\node_modules\puppeteer-core\src\common\Browser.ts:425:33)
    at getPage (c:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\common\browser.ts:35:38)
    at search (c:\Users\hassa\Downloads\AmazonMonitor-master (1)\AmazonMonitor-master\common\amazon.ts:15:19)
SpikeHD commented 7 months ago

What's your NodeJS version (output from node -v)? Are you using proxies?

SpikeHD commented 7 months ago

I've updated dependencies, including Puppeteer which is where that error originates from, and I cannot reproduce

DuhVinci85 commented 7 months ago

Yes sorry I forgot to update. The puppeteer was outdated. I manually updated it and it worked like a charm Thanks a bunch

On Mon, Feb 5, 2024 at 12:10 AM SpikeHD @.***> wrote:

I've updated dependencies, including Puppeteer which is where that error originates from, and I cannot reproduce

— Reply to this email directly, view it on GitHub https://github.com/SpikeHD/AmazonMonitor/issues/108#issuecomment-1925884856, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFEOW26CLRKTQZR2YKUEPULYR7MKJAVCNFSM6AAAAABCTDK4YKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVHA4DIOBVGY . You are receiving this because you authored the thread.Message ID: @.***>