CookieMonsterTeam / CookieMonster

Addon for Cookie Clicker that offers a wide range of tools and statistics to enhance the game
MIT License
488 stars 200 forks source link

Uncaught TypeError: Cannot read properties of undefined (reading 'bonus') #1170

Open triffid opened 9 months ago

triffid commented 9 months ago

Bug description

Tried shift-clicking one mind to vault it, but that didn't work - however when I moused over normal upgrades, CC stalled out, PP colour squares disappeared from all items in upgrades pane, and this dropped in the JS console:

Upgrade.js:24 Uncaught TypeError: Cannot read properties of undefined (reading 'bonus')
    at Upgrade.js:24:78
    at Ca (UpdateTooltips.js:27:7)
    at Ia (Tooltip.js:127:3)
    at Object.<anonymous> (TooltipUpgrades.js:18:41)
    at Object.eval [as updateMod] (eval at mn (CookieMonster.js?v=1695998877431:1:1), <anonymous>:93:27)
    at Game.tooltip.update (ReplaceNative.js:51:29)
    at Game.Logic (main.js?v=10:16597:76)
    at Game.Logic (ReplaceNative.js:134:21)
    at Game.Loop (main.js?v=10:16771:8)
Upgrade.js:24 Uncaught TypeError: Cannot read properties of undefined (reading 'bonus')
    at Upgrade.js:24:78
    at Ca (UpdateTooltips.js:27:7)
    at Ia (Tooltip.js:127:3)
    at Object.<anonymous> (TooltipUpgrades.js:18:41)
    at Object.eval [as drawMod] (eval at mn (CookieMonster.js?v=1695998877431:1:1), <anonymous>:19:27)
    at Game.tooltip.draw (ReplaceNative.js:43:29)
    at l.onmouseover.l.onmouseover (TooltipUpgrades.js:18:24)
Upgrade.js:24 Uncaught TypeError: Cannot read properties of undefined (reading 'bonus')
    at Upgrade.js:24:78
    at Ca (UpdateTooltips.js:27:7)
    at Ia (Tooltip.js:127:3)
    at Object.text (TooltipUpgrades.js:18:41)
    at Object.eval [as drawMod] (eval at mn (CookieMonster.js?v=1695998877431:1:1), <anonymous>:19:27)
    at Game.tooltip.draw (ReplaceNative.js:43:29)
    at l.onmouseover.l.onmouseover (TooltipUpgrades.js:18:24)
(anonymous) @   Upgrade.js:24
Ca  @   UpdateTooltips.js:27
Ia  @   Tooltip.js:127
(anonymous) @   TooltipUpgrades.js:18
eval    @   VM55:19
Game.tooltip.draw   @   ReplaceNative.js:43
l.onmouseover.l.onmouseover @   TooltipUpgrades.js:18

It spits a new exception every time I mouse over upgrades.

To reproduce

Not sure how repeatable this is, but I think the pathway was 1) have 'buy all upgrades' perk, 2) research one mind, 3) shift-click one mind, 4) mouse over other upgrades.

I haven't tested other researchable upgrades, it may work on earlier ones too

Screenshot

screenshot-20231003-100651_cropped

The screenshot doesn't seem too helpful, but all timer-based stuff has stopped completely - while the UI remains responsive, no cookies are being generated and the frenzy isn't counting down, etc

Save file

No response

Browser / Steam / Version

Browser, Google Chrome Version 116.0.5845.187 (Official Build) (64-bit)