Thorium-Sim / thorium-nova

Next-generation Spaceship Controls
https://thoriumsim.com
Apache License 2.0
342 stars 14 forks source link

Deck Editor: Navigation to Deck URL fails occasionally #622

Closed ollixx closed 2 months ago

ollixx commented 4 months ago

Describe the bug

After renaming or creating decks in the ship map editor, the editor does a navigation to the deck's URL. This navigation fails quite often, but not always.

This kind of behaviour usually happens, if there is a race condition. Here is seems to be a race between the navigation and a "push" update in the background, after the changes were sent to the server.

To Reproduce Steps to reproduce the behavior:

  1. Go to the 'Ship's Config' and Choose 'Ship Map'
  2. Choose a deck
  3. rename the deck using the "Rename Deck" button
  4. An error page shows up
  5. Do a Reload
  6. The updated deck config shows up correctly

Alternative

  1. Go to the 'Ship's Config' and Choose 'Ship Map'
  2. Click the "Create Deck" Button
  3. An error page shows up
  4. Do a Reload
  5. The updated deck config shows up correctly

Expected behavior

The navigation, i.e. the update of the page after renaming o creating a deck should just work without an error.

Screenshots**

Error Page

image