ninjawithkillmoon / gloomhaven-thearcanelibrary

The Arcane Library - a Gloomhaven campaign tracker
https://ninjawithkillmoon.github.io/
36 stars 16 forks source link

Dropbox save/load is broken #24

Closed ssabo closed 7 years ago

ssabo commented 7 years ago

I am importing my older file from local system, saving to dropbox, refreshing (ctrl + shift + r) and loading. Loading is giving the following error:

Error: missing data
    at http://thearcane.li/static/js/main.36bd6b1d.js:13:19638
    at <anonymous>

Local Save File - gloomhaven_save_20170709_1007.txt Dropbox save file - gloomhaven_save_20170710_2040.txt

ssabo commented 7 years ago

I just tried downloading the save file from dropbox manually and importing. This appeared to work correctly.

ninjawithkillmoon commented 7 years ago

User on BGG having similar issue: https://boardgamegeek.com/article/26337319#26337319

ninjawithkillmoon commented 7 years ago

Issue seems to be with party notes being empty.

ninjawithkillmoon commented 7 years ago

DropboxChooser.js:

      // quick check that the text content is actually a save game
      if (data.name && data.partyNotes) {
        // load the game into the browser
        GameActions.loadGame(data);
      }
      else {
        // show an error message indicating that this is not the content that we expected
        throw new Error("missing data");
      }

needs to just change into this:

        // load the game into the browser
        GameActions.loadGame(data);

thus removing this check entirely. I can't fix until later today.

ssabo commented 7 years ago

Submitted https://github.com/ninjawithkillmoon/gloomhaven-thearcanelibrary/pull/25 per your recommendation.

ninjawithkillmoon commented 7 years ago

This is now deployed and looks to be working for me. Can you confirm? (if it still doesn't work, just change the query string to something like this http://thearcane.li/?randomquerystringbollocks to make sure you're running the latest version - sometimes GitHub caches aggressively).

ninjawithkillmoon commented 7 years ago

Closing, presumed working now. Thanks for providing the files - they helped find the issue.