"Go Fetch" seems to be broken


My son is using code combat and there seems to be some sort of bug in “Go Fetch”. Looking in the developer console it looks like there is some error when the pet tries to pick up the potion. Here is the stack:

|Lua's Cheryl| Non-UserCodeError: TypeError: this.target.cancelCollisions is not a function
TypeError: this.target.cancelCollisions is not a function
    at t.Container.doPickUpItem (eval at module.exports.World.loadClassFromCode (https://codecombat.com/javascripts/world.js:1192:30), <anonymous>:106:21)
    at t.Fetches.update (eval at module.exports.World.loadClassFromCode (https://codecombat.com/javascripts/world.js:1192:30), <anonymous>:55:12)
    at t.e.exports.t.callChainedMethod (https://codecombat.com/javascripts/world.js:769:5)
    at t.s [as update] (https://codecombat.com/javascripts/lodash.js:116:27)
    at Existence.update (eval at module.exports.World.loadClassFromCode (https://codecombat.com/javascripts/world.js:1192:30), <anonymous>:91:15)
    at t.e.exports.t.getNextFrame (https://codecombat.com/javascripts/world.js:1446:14)
    at World.module.exports.World.getFrame (https://codecombat.com/javascripts/world.js:1054:43)
    at World.module.exports.World.loadFrames (https://codecombat.com/javascripts/world.js:1081:248)
    at https://codecombat.com/javascripts/world.js:1076:215

Not sure what to tell him. I think he is just going to continue on to the next level.

I should add – this is on Chrome Version 55.0.2883.95 (64-bit) on macOS 10.12.2. He is using python and the code being run is:

def goFetch():
    while True:
        potion = hero.findNearestItem()
        if potion:

pet.on("spawn", goFetch)
1 Like

Your code looks correct and it works for me. Maybe it’s a “seed” problem. Could you send the sessionID for this level (you can find it in the developer console) or an username which you are using in CodeCombat. I’ll try to research the problem. You can use a direct message here or by email team@codecombat.com

1 Like

Bryukh let me know the bug and I think I’ve found the fix. Can you try clearing your browser cache and giving the level another shot?


I had to clear the cache and close/load the tab, but it looks like things are working now! Thanks!

1 Like