geordanr / xwing

Squad builder for the First Edition X-Wing Miniatures game by Fantasy Flight Games.
http://geordanr.github.io/xwing
MIT License
97 stars 153 forks source link

Can't load saved squads #603

Closed oschrenk closed 5 years ago

oschrenk commented 5 years ago

YASB (First Edition) Bug Report

This bug report filer is for First Edition X-Wing only!

Note: If you are experiencing problems with the permalink URL when you have Maul or Bomblet Generator in your list, this is a known issue. For more information please see https://www.reddit.com/r/XWingTMG/comments/7c4q6h/yet_another_squad_builder_problems_with_maul/

Expected Behavior

To Load saved squads

Actual Behavior

Screen flickers, but no squad is loaded

Language

English

Errors

I see the following console errors in Safari during startup. Noe error message during loading,

not-loading
[Error] Error adding card "Heavy Scyk" Interceptor (title) from C-ROC Cruiser Expansion Pack
    setupCardData (xwing.min.js:5:8493)
    English (xwing.min.js:13:27246)
    loadCards (xwing.min.js:39:13240)
    setupTranslationSupport (xwing.min.js:39:14420)
    (anonymous function) (xwing:40)
    j (jquery.min.js:2:26931)
    fireWith (jquery.min.js:2:27740)
    ready (jquery.min.js:2:29544)
    I (jquery.min.js:2:29729)
[Error] Error adding card "Heavy Scyk" Interceptor (title) from C-ROC Cruiser Expansion Pack
    setupCardData (xwing.min.js:5:8493)
    English (xwing.min.js:13:27246)
    loadCards (xwing.min.js:39:13240)
    (anonymous function) (xwing.min.js:39:14180)
    g (xwing.min.js:39:14131)
    (anonymous function) (xwing.min.js:39:14135)
    (anonymous function) (xwing.min.js:39:14139)
    dispatch (jquery.min.js:3:6472)
    handle (jquery.min.js:3:3247)
    trigger (jquery.min.js:3:5580)
    (anonymous function) (jquery.min.js:3:11550)
    each (jquery.min.js:2:2887)
    each (jquery.min.js:2:852)
    trigger (jquery.min.js:3:11523)
    setupTranslationSupport (xwing.min.js:39:14455)
    (anonymous function) (xwing:40)
    j (jquery.min.js:2:26931)
    fireWith (jquery.min.js:2:27740)
    ready (jquery.min.js:2:29544)
    I (jquery.min.js:2:29729)
[Error] Failed to load resource: the server responded with a status of 404 () (xwing.min.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (favicon.ico, line 0)
[Error] Error adding card "Heavy Scyk" Interceptor (title) from C-ROC Cruiser Expansion Pack
    setupCardData (xwing.min.js:5:8493)
    English (xwing.min.js:13:27246)
    loadCards (xwing.min.js:39:13240)
    (anonymous function) (xwing.min.js:39:14180)
    g (xwing.min.js:39:14131)
    (anonymous function) (xwing.min.js:39:13965)
    trampoline (xwing.min.js:1:1115)
    j (xwing.min.js:39:13942)
    _fulfill (xwing.min.js:1:815)
    (anonymous function) (xwing.min.js:39:14122)
    g (xwing.min.js:39:14125)
    (anonymous function) (xwing.min.js:39:13965)
    trampoline (xwing.min.js:1:1115)
    j (xwing.min.js:39:13942)
    _fulfill (xwing.min.js:1:815)
    (anonymous function) (xwing.min.js:39:14122)
    g (xwing.min.js:39:14125)
    (anonymous function) (xwing.min.js:39:13965)
    trampoline (xwing.min.js:1:1115)
    j (xwing.min.js:39:13942)
    _fulfill (xwing.min.js:1:815)
    (anonymous function) (xwing.min.js:39:14122)
    g (xwing.min.js:39:14125)
    (anonymous function) (xwing.min.js:39:14135)
    (anonymous function) (xwing.min.js:39:14139)
    dispatch (jquery.min.js:3:6472)
    handle (jquery.min.js:3:3247)
    trigger (jquery.min.js:3:5580)
    (anonymous function) (jquery.min.js:3:11550)
    each (jquery.min.js:2:2887)
    each (jquery.min.js:2:852)
    trigger (jquery.min.js:3:11523)
    (anonymous function) (xwing:143)
    (anonymous function) (xwing.min.js:1:23347)
    _fulfill (xwing.min.js:1:815)
    (anonymous function) (xwing.min.js:1:1030)
    (anonymous function) (xwing.min.js:1:22628)
    j (jquery.min.js:2:26931)
    fireWith (jquery.min.js:2:27740)
    x (jquery.min.js:4:11265)
    (anonymous function) (jquery.min.js:4:14767)
geordanr commented 5 years ago

Is this still occurring? There was a widespread outage earlier today that may have been related.

oschrenk commented 5 years ago

Yes. It still doesn't work. When I click "Load" on one of my squads, I just see "undefined" being printed to console but no outgoing network request.

oschrenk commented 5 years ago

I’m drilling down the app and so far I’m into a.prototype.loadFromSerialized = function(a) {...} which is called with a = "v5!s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:"


* *[“v5!s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”, “5”, “s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”, index: 0, input: “v5!s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”, groups: undefined]*
    * 0:”v5!s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”
1:”5”
2:”s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”
groups:undefined
index:0
input:”v5!s!199:123,112,26,-1:;210:-1,-1,-1,-1:;165:-1,-1,14,-1,-1,-1:;229:-1:”
length:3
__proto__:Array(0)

I think it has something to do that somewhere down the line h = parseInt(c[1]) is 5 , which does not seem to be handled.

geordanr commented 5 years ago

That must be a new serialization version in YASB 2.0; since the database of squads is shared between the two, I'm guessing that you have a mix of 1.0 and 2.0 squads and YASB 1.0 doesn't know how to deal with serialization versions after 4. I'll have 1.0 skip those later versions.

geordanr commented 5 years ago

Or maybe not. I tried saving a later serialization in YASB 2.0, and I can see it in the list of saved squads in 1.0 (but can't load it, which is expected).

Does this happen in all browsers? Different devices?

oschrenk commented 5 years ago

Maybe I am just confused by the offering of the various websites - and it has been a while since I used them or played X-Wing.

I can create/load these squads with https://raithos.github.io/ but not with https://geordanr.github.io

I also wasn't aware from the website itself that it's not supporting 2.0.