Bug In Tribal Wars 2 Web App - Broken Report Display

bug
tribal-wars-2

#1

People working on automation in the Tribal Wars 2 Web App might find this interesting.

While working on the Tribal Wars 2 Farmbot, we found this bug in the Tribal Wars 2 Web App:

Sometimes, the report display stops working: When clicking the right-side button to get to the next report, nothing happens.
This problem seems to happen when a new battle report appears on the account.

The farmbot will need to adapt to recover from this bug, as it is using the reports to identify farms.

Thank you @otremba, @dapwnerz, @Xeroxo for helping with bug hunting.


Farm Manager - Tribal Wars 2 Farmbot
Farm Manager - Tribal Wars 2 Farmbot
Farm Manager - Tribal Wars 2 Farmbot
Farm Manager - Tribal Wars 2 Farmbot
Farm Manager - Tribal Wars 2 Farmbot
#2

For the farmbot, the approach to recover from this bug is now as follows:

  • Count the number of times we still see the same report after clicking on the button. When this happens three consecutive times, we assume that the report display is now broken and start the process to recover.
  • Open a fresh instance of the report list.
  • Open the first report, just as we do at the beginning of each farming cycle. From this state, we can continue the farming cycle reusing the existing implementation.

The approach outlined above was tested successfully, but the process can be further optimized. Instead of opening the first report as we do at the beginning of each farming cycle, we can scroll down the report list and open the last report we saw before starting the recovery process. This saves us the time to skip through the first reports which we had already looked at in the current cycle.

13:32:29.473 [499] : Clicked on report 'Segundo pueblo de playername ataca (Pueblo bárbaro ) Ayer a 20:26:58'.
13:32:28.904 [498] : scrollOperationsResults: ;;;;;;;;;;;;;;;;;;;;
13:32:23.571 [497] : I start to scroll down....
13:32:23.571 [496] : I start the process to open the report 'Segundo pueblo de playername ataca (Pueblo bárbaro ) Ayer a 20:26:58' which is at position 58 in the report list.
13:32:23.507 [495] : Report item to continue with: 'Segundo pueblo de playername ataca (Pueblo bárbaro ) Ayer a 20:26:58'
13:32:23.465 [494] : I parsed 100 report items.
13:32:11.909 [493] : I parse the reports in there to find the best to continue with.
13:32:05.086 [492] : I clicked the button to open the report list. Next, I set the page size to 100.
13:32:02.811 [491] : I begin the process to restart the report UI and continue at report with time '20:26:58'.
13:32:02.811 [490] : Hey, I have seen a report with the same caption before! This has happened 3 consecutive times. This could be caused by the the bug in the Tribal Wars 2 Web App which breaks reports display (https://forum.botengine.org/t/bug-in-tribal-wars-2-web-app-broken-report-display/1457). I start the process to recover from this bug.
13:32:02.811 [489] : Caption of the current open report: 'Ayer a 20:26:58 - Segundo pueblo de playername ataca (Pueblo bárbaro )'
13:31:59.426 [488] : I click on the button to navigate to the next report.

Farm Manager - Tribal Wars 2 Farmbot