Error with Profit-Taker Heist Stage 1 #1964

Closed
opened 2025-05-02 14:00:14 -07:00 by VampireKitten · 2 comments
Contributor

I... don't believe it's supposed to return NaN rotations?

2025-05-02T22:58:42:879 [0.1.0] debug:  generating random mission rewards {
  rewardManifests: [
    '/Lotus/Types/Game/MissionDecks/HeistJobMissionRewards/HeistTierATableARewards'
  ],
  rotations: [ NaN ]
}
2025-05-02T22:58:42:881 [0.1.0] error:  TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request
    at getRewardAtPercentage (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:25:14)
    at SRng.randomReward (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:158:37)
    at getRandomRewardByChance (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:107:25)
    at <anonymous> (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1535:34)
    at Array.forEach (<anonymous>)
    at getRandomMissionDrops (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1525:25)
    at addMissionRewards (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:842:46)
    at missionInventoryUpdateController (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\controllers\api\missionInventoryUpdateController.ts:83:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-05-02T22:58:42:883 [0.1.0] http:   POST /api/missionInventoryUpdate.php?accountId=67bcb55f31fac393062d59a0&nonce=7206727101922283&ct=MSI&xpBasedLevelCapDisabled=1 500 77.121 ms - -
I... don't believe it's supposed to return NaN rotations? ``` 2025-05-02T22:58:42:879 [0.1.0] debug: generating random mission rewards { rewardManifests: [ '/Lotus/Types/Game/MissionDecks/HeistJobMissionRewards/HeistTierATableARewards' ], rotations: [ NaN ] } 2025-05-02T22:58:42:881 [0.1.0] error: TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request at getRewardAtPercentage (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:25:14) at SRng.randomReward (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:158:37) at getRandomRewardByChance (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:107:25) at <anonymous> (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1535:34) at Array.forEach (<anonymous>) at getRandomMissionDrops (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1525:25) at addMissionRewards (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:842:46) at missionInventoryUpdateController (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\controllers\api\missionInventoryUpdateController.ts:83:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2025-05-02T22:58:42:883 [0.1.0] http: POST /api/missionInventoryUpdate.php?accountId=67bcb55f31fac393062d59a0&nonce=7206727101922283&ct=MSI&xpBasedLevelCapDisabled=1 500 77.121 ms - - ```
Sainan added the
bug
label 2025-05-02 15:07:31 -07:00
Sainan added the
pr'd for
label 2025-05-02 17:49:42 -07:00
Author
Contributor

Reopening this issue because the previous fix has created an entirely different problem.

2025-05-04T18:07:45:896 [0.1.0] debug:  generating random mission rewards {
  rewardManifests: [
    '/Lotus/Types/Game/MissionDecks/HeistJobMissionRewards/HeistTierATableARewards'
  ],
  rotations: [ 2 ]
}
2025-05-04T18:07:45:897 [0.1.0] error:  TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request
    at getRewardAtPercentage (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:25:14)
    at SRng.randomReward (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:158:37)
    at getRandomRewardByChance (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:107:25)
    at <anonymous> (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1539:34)
    at Array.forEach (<anonymous>)
    at getRandomMissionDrops (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1529:25)
    at addMissionRewards (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:842:46)
    at missionInventoryUpdateController (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\controllers\api\missionInventoryUpdateController.ts:85:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2025-05-04T18:07:45:899 [0.1.0] http:   POST /api/missionInventoryUpdate.php?accountId=67bcb55f31fac393062d59a0&nonce=1339495154560886&ct=MSI&xpBasedLevelCapDisabled=1 500 73.617 ms - -
Reopening this issue because the previous fix has created an entirely *different* problem. ``` 2025-05-04T18:07:45:896 [0.1.0] debug: generating random mission rewards { rewardManifests: [ '/Lotus/Types/Game/MissionDecks/HeistJobMissionRewards/HeistTierATableARewards' ], rotations: [ 2 ] } 2025-05-04T18:07:45:897 [0.1.0] error: TypeError: Cannot read properties of undefined (reading 'length') while processing /api/missionInventoryUpdate.php request at getRewardAtPercentage (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:25:14) at SRng.randomReward (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\rngService.ts:158:37) at getRandomRewardByChance (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:107:25) at <anonymous> (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1539:34) at Array.forEach (<anonymous>) at getRandomMissionDrops (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:1529:25) at addMissionRewards (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\services\missionInventoryUpdateService.ts:842:46) at missionInventoryUpdateController (C:\Games\Warframe - Server Emulator\SpaceNinjaServer\src\controllers\api\missionInventoryUpdateController.ts:85:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2025-05-04T18:07:45:899 [0.1.0] http: POST /api/missionInventoryUpdate.php?accountId=67bcb55f31fac393062d59a0&nonce=1339495154560886&ct=MSI&xpBasedLevelCapDisabled=1 500 73.617 ms - - ```
Author
Contributor

Given this code, I presume the issue is that we're passing the job stage as the rotation, but the profit-taker heists only give rewards at the end of the bounty, so they have only one reward table per bounty with one rotation, leading to the error.

                        if (job.xpAmounts.length > 1) {
                            rotations = [RewardInfo.JobStage! % (job.xpAmounts.length - 1)];
                        } else {
                            rotations = [RewardInfo.JobStage!];
                        }
Given this code, I presume the issue is that we're passing the job stage as the rotation, but the profit-taker heists only give rewards at the *end* of the bounty, so they have only one reward table per bounty with one rotation, leading to the error. ``` if (job.xpAmounts.length > 1) { rotations = [RewardInfo.JobStage! % (job.xpAmounts.length - 1)]; } else { rotations = [RewardInfo.JobStage!]; } ```
Sainan removed the
pr'd for
label 2025-05-04 17:28:20 -07:00
Sainan added the
pr'd for
label 2025-05-04 17:53:40 -07:00
Sign in to join this conversation.
No description provided.