DawnbrandBots / deck-transfer-for-master-duel

A browser extension to import and export Yu-Gi-Oh! decks from Master Duel and Neuron, and download public decks from the official card database.
https://ygoprodeck.com/decks/transfer-tool/
GNU General Public License v3.0
9 stars 0 forks source link

Deck containing card not yet released in English fails to export to YGOPRODECK #18

Open kevinlul opened 2 months ago

kevinlul commented 2 months ago

Actual behaviour

  1. Attempt to "Export to YGOPRODECK" for https://www.db.yugioh-card.com/yugiohdb/member_deck.action?ope=1&wname=MemberDeck&ytkn=6b30f387b69c2524e84ae5f0a9e5366fb113aa88ba5d39de044d846f926f907b&cgid=c42baa47b8670a7d3ae426989a9b4843&dno=128&request_locale=en
  2. The deck builder is opened with https://ygoprodeck.com/deckbuilder/?utm_source=storm-access&y=4GakAOBmpAARtIkBEbSJARG0iQHkuA4D5LgOA%2BS4DgO3HUMFTGhJAExoSQCF1okFhdaJBYXWiQUo9ZkBsCPeALAj3gCwI94AKpVlASqVZQEqlWUBqfKzBaCUBAIDwk4EqKXeBail3gWopd4Fx6sgA8erIAOYGscAmBrHAP7WVAJqSB4AakgeAGpIHgAAAAAAAAAAAAAAAAAAAAAAHjeCAeqY0QRr%2FyQFIkiZACJImQAiSJkAUr0tAw%3D%3D!iptnBEiIswBr1MwEa9TMBDW0vgQ1tL4E0fqMBQAAAAAAAAAA66qLBc3gIQCNJ5gD3PhoAdcV3wUAAAAA!%2FomcBf6JnAX%2BiZwF1xqfAdcanwEAAAAAAAAAAAAAAACEJX4AhCV%2BAIQlfgD73BQBXWneAl1p3gJ%2BiUMD!%E7%B2%9B%E5%A3%B0%E3%82%A2%E3%82%B6%E3%83%9F%E3%83%8A%E3%83%89%E3%83%A9%E3%82%B0%E3%83%9E
  3. Export fails. The deck builder logs Could not start the application! TypeError: Could not find card for passcode '0'.

Expected behaviour

Export should not flake.

Browser, and version if you know

Firefox 130.0b9 (64-bit)

Operating system and version

Windows 10

kevinlul commented 2 months ago

image

Bad URL: ydke://4GakAOBmpAARtIkBEbSJARG0iQHkuA4D5LgOA+S4DgO3HUMFTGhJAExoSQCF1okFhdaJBYXWiQUo9ZkBsCPeALAj3gCwI94AKpVlASqVZQEqlWUBqfKzBaCUBAIDwk4EqKXeBail3gWopd4Fx6sgA8erIAOYGscAmBrHAP7WVAJqSB4AakgeAGpIHgAAAAAAAAAAAAAAAAAAAAAAHjeCAeqY0QRr/yQFIkiZACJImQAiSJkAUr0tAw==!iptnBEiIswBr1MwEa9TMBDW0vgQ1tL4E0fqMBQAAAAAAAAAA66qLBc3gIQCNJ5gD3PhoAdcV3wUAAAAA!/omcBf6JnAX+iZwF1xqfAdcanwEAAAAAAAAAAAAAAACEJX4AhCV+AIQlfgD73BQBXWneAl1p3gJ+iUMD!

kevinlul commented 2 months ago
# 粛声アザミナドラグマ
# https://www.db.yugioh-card.com/yugiohdb/member_deck.action?ope=1&wname=MemberDeck&ytkn=6b30f387b69c2524e84ae5f0a9e5366fb113aa88ba5d39de044d846f926f907b&cgid=c42baa47b8670a7d3ae426989a9b4843&dno=128&request_locale=en
#main
10774240
10774240
25801745
25801745
25801745
51296484
51296484
51296484
88284599
4810828
4810828
92919429
92919429
92919429
26866984
14558128
14558128
14558128
23434538
23434538
23434538
95679145
33854624
72270339
98477480
98477480
98477480
52472775
52472775
13048472
13048472
39114494
1984618
1984618
1984618

25311006
80845034
86310763
10045474
10045474
10045474
53329234
#extra
73898890
11765832
80532587
80532587
79606837
79606837
93125329

93039339
2220237
60303245
23656668
98506199

!side
94145022
94145022
94145022
27204311
27204311

8267140
8267140
8267140
18144507
48130397
48130397
54757758

blank lines present

kevinlul commented 2 months ago

Likely a data issue with the Konami IDs not being present in the API

kevinlul commented 3 weeks ago

Using https://www.db.yugioh-card.com/yugiohdb/member_deck.action?ope=1&wname=MemberDeck&ytkn=3aaf665b32f8c90fd1dac0ba5e584e4030f94d8256df61e1bb5a39c32ffd5d91&cgid=bea9ee95592a8073b38bb8e7a7daa9ba&dno=62&request_locale=en as recent demo

kevinlul commented 3 weeks ago

Mitigation: filter out undefined from the arrays here https://github.com/DawnbrandBots/deck-transfer-for-master-duel/blob/24dc28e040a4ebcd0b27b535446f0adfc45393fb/src/yugioh-card.js#L243-L248

Proper fix: improve data quality of API

kevinlul commented 3 weeks ago

Tests still fail because they're not expecting to read an export with under 40 cards.