Skip to content

Conversation

@nwjgit
Copy link
Contributor

@nwjgit nwjgit commented Dec 13, 2025

Description:

Return trip breaks when minion gets a new CL. Noticed this in test environment so unsure if its only on my side but thought i'd may aswell PR.

Changes:

  • Update newlyCompletedCLs

Other checks:

  • I have tested all my changes thoroughly.

This is the error I get when a minion gets a new cl slot:

[1] TypeError: cl.items.values(...).some is not a function
[1]     at <anonymous> (P:\oldschool.gg\oldschoolbot\src\lib\handleNewCLItems.ts:93:22)
[1]     at Array.filter (<anonymous>)
[1]     at handleNewCLItems (P:\oldschool.gg\oldschoolbot\src\lib\handleNewCLItems.ts:91:46)
[1]     at async unqueuedTransactItems (P:\oldschool.gg\oldschoolbot\src\lib\util\transactItemsFromBank.ts:152:3)
[1]     at async MUserClass.transactItems (P:\oldschool.gg\oldschoolbot\src\lib\MUser.ts:562:15)
[1]     at async UpdateBank.transact (P:\oldschool.gg\oldschoolbot\src\lib\structures\UpdateBank.ts:63:28)
[1]     at async Object.run (P:\oldschool.gg\oldschoolbot\src\tasks\minions\monsterActivity.ts:528:25)
[1]     at async SActivityManager.completeActivity (P:\oldschool.gg\oldschoolbot\src\lib\ActivityManager.ts:59:4)
[1]     at async Promise.all (index 0)
[1]     at async SActivityManager.processPendingActivities (P:\oldschool.gg\oldschoolbot\src\lib\ActivityManager.ts:90:4)
[1] TypeError: cl.items.values(...).some is not a function
[1]     at <anonymous> (P:\oldschool.gg\oldschoolbot\src\lib\handleNewCLItems.ts:93:22)
[1]     at Array.filter (<anonymous>)
[1]     at handleNewCLItems (P:\oldschool.gg\oldschoolbot\src\lib\handleNewCLItems.ts:91:46)
[1]     at async unqueuedTransactItems (P:\oldschool.gg\oldschoolbot\src\lib\util\transactItemsFromBank.ts:152:3)
[1]     at async MUserClass.transactItems (P:\oldschool.gg\oldschoolbot\src\lib\MUser.ts:562:15)
[1]     at async UpdateBank.transact (P:\oldschool.gg\oldschoolbot\src\lib\structures\UpdateBank.ts:63:28)
[1]     at async Object.run (P:\oldschool.gg\oldschoolbot\src\tasks\minions\monsterActivity.ts:528:25)
[1]     at async SActivityManager.completeActivity (P:\oldschool.gg\oldschoolbot\src\lib\ActivityManager.ts:59:4)
[1]     at async Promise.all (index 0)
[1]     at async SActivityManager.processPendingActivities (P:\oldschool.gg\oldschoolbot\src\lib\ActivityManager.ts:90:4)
[1] {"type":"ERROR","error":"TypeError: cl.items.values(...).some is not a function\n    at <anonymous> (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\handleNewCLItems.ts:93:22)\n    at Array.filter (<anonymous>)\n    at handleNewCLItems (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\handleNewCLItems.ts:91:46)\n    at async unqueuedTransactItems (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\util\\transactItemsFromBank.ts:152:3)\n    at async MUserClass.transactItems (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\MUser.ts:562:15)\n    at async UpdateBank.transact (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\structures\\UpdateBank.ts:63:28)\n    at async Object.run (P:\\oldschool.gg\\oldschoolbot\\src\\tasks\\minions\\monsterActivity.ts:528:25)\n    at async SActivityManager.completeActivity (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\ActivityManager.ts:59:4)\n    at async Promise.all (index 0)\n    at async SActivityManager.processPendingActivities (P:\\oldschool.gg\\oldschoolbot\\src\\lib\\ActivityManager.ts:90:4)","info":{},"time":"2025-12-13T19:31:32.933Z"}

@gc
Copy link
Collaborator

gc commented Dec 24, 2025

This seems definitely like an issue with your local code, running this doesnt give any errors:

for (const x of allCollectionLogsFlat) {
	if (!(x.items instanceof Set)) throw new Error('Not a set');
	if (!(x.items.values().some(x => x > 0))) throw new Error('Not a set');
	if (!(x.allItems instanceof Set)) throw new Error('Not a set');
}
allCollectionLogsFlat.filter(_cl => _cl.items.values().some(i => i > 0));

Also if this error was happening, I'm fairly sure it would be faily every integration test run (because definitely minions are getting new cl items in those).

Maybe you added/changed something with CLs, not sure.

@nwjgit
Copy link
Contributor Author

nwjgit commented Dec 24, 2025

This seems definitely like an issue with your local code, running this doesnt give any errors:

for (const x of allCollectionLogsFlat) {
	if (!(x.items instanceof Set)) throw new Error('Not a set');
	if (!(x.items.values().some(x => x > 0))) throw new Error('Not a set');
	if (!(x.allItems instanceof Set)) throw new Error('Not a set');
}
allCollectionLogsFlat.filter(_cl => _cl.items.values().some(i => i > 0));

Also if this error was happening, I'm fairly sure it would be faily every integration test run (because definitely minions are getting new cl items in those).

Maybe you added/changed something with CLs, not sure.

Yeah the minion still gets the cl item/loot to there bank the bot just never posts a return trip message. Might just be a weird error on the test env side not sure either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants