Exchangeにおける複数アイテム取得時の挙動について

63 views
Skip to first unread message

Ikefuji Daichi

unread,
Oct 10, 2024, 1:09:35 AM10/10/24
to GS2 ユーザグループ
お世話になっております。
Exchangeにおける複数アイテム取得時の挙動について相談させてください。

現在、初回ゲーム起動時に1度だけ呼び出す交換処理を作成しております。
交換処理では、アイテムを5種類取得するように設定しております。
以下設定です。
          - name: Initialize
            consumeActions: []
            acquireActions:
              - action: Gs2Inventory:AcquireItemSetByUserId
                request:
                  namespaceName: ${InventoryNamespaceName}
                  inventoryName: ${EquipInventoryName}
                  itemName: "PWE103"
                  userId: "#{userId}"
                  acquireCount: 1
              - action: Gs2Inventory:AcquireItemSetByUserId
                request:
                  namespaceName: ${InventoryNamespaceName}
                  inventoryName: ${EquipInventoryName}
                  itemName: "PWE104"
                  userId: "#{userId}"
                  acquireCount: 1
              - action: Gs2Inventory:AcquireItemSetByUserId
                request:
                  namespaceName: ${InventoryNamespaceName}
                  inventoryName: ${EquipInventoryName}
                  itemName: "PWE105"
                  userId: "#{userId}"
                  acquireCount: 1
              - action: Gs2Inventory:AcquireItemSetByUserId
                request:
                  namespaceName: ${InventoryNamespaceName}
                  inventoryName: ${EquipInventoryName}
                  itemName: "PWE106"
                  userId: "#{userId}"
                  acquireCount: 1
              - action: Gs2Inventory:AcquireItemSetByUserId
                request:
                  namespaceName: ${InventoryNamespaceName}
                  inventoryName: ${EquipInventoryName}
                  itemName: "PWE107"
                  userId: "#{userId}"
                  acquireCount: 1

こちらの処理について、度々以下のエラーが発生しております。

"TransactionCanceledException: Transaction cancelled, please refer cancellation reasons for specific reasons [None, TransactionConflict]\n{\n RespMetadata: {\n StatusCode: 400,\n RequestID: \"H1B4DDOSTIG2MBULO1NJA3CLQVVV4KQNSO5AEMVJF66Q9ASUAAJG\"\n },\n CancellationReasons: [{\n Code: \"None\"\n },{\n Code: \"TransactionConflict\",\n Message: \"Transaction is ongoing for the item\"\n }],\n Message_: \"Transaction cancelled, please refer cancellation reasons for specific reasons [None, TransactionConflict]\"\n}"

これにより5種類のうち1種類のみ受け取れない現象が頻繁に発生しております。
こちらのエラーについて対応方法などございますでしょうか。

以上、よろしくお願いいたします。

丹羽一智

unread,
Oct 10, 2024, 3:46:12 AM10/10/24
to GS2 ユーザグループ, Ikefuji Daichi
https://docs.gs2.io/ja/articles/service_limit/#gs2-inventory
こちらの制限に該当していると思われます。

GS2-JobQueue の自動実行処理が有効になっていれば、自動的にリトライされ数秒以内に全ての処理が完了しているはずです。

Kazutomo Niwa
2024年10月10日 14:09 +0900、Ikefuji Daichi <ikefuj...@gmail.com> のメール:

Ikefuji Daichi

unread,
Oct 19, 2024, 2:51:10 AM10/19/24
to GS2 ユーザグループ, [GS2] 丹羽一智, Ikefuji Daichi
お世話になっております。
上記のエラーについて、GS2-Showcaseについても同じエラーが発生いたしました。
JobQueueのEnableAutoRunはtrueにしているため、リトライが自動で行われるという認識なのですが行われていないような挙動になっております。
その影響で、片方のゲーム内通貨がうまく受け取れないようになってしまっています。
以前何かのチュートリアル(ドキュメント?)で見たのですが、課金通貨購入時に追加で無償通貨を付与することも可能とのことでしたので下記のような形で設定しておりますが、何か設定方法等間違っているのでしょうか。(コンテンツIDは伏せさせていただいております)
以上、よろしくお願いいたします。


                      consumeActions:
                        - action: Gs2Money:RecordReceipt
                          request:
                            namespaceName: ${MoneyNamespaceName}
                            userId: "#{userId}"
                            contentsId: "contentsId"
                            receipt: "#{config000}"
                        - action: Gs2Limit:CountUpByUserId
                          request:
                            namespaceName: ${LimitNamespaceName}
                            limitName: ${LimitNameBuyTwice}
                            counterName: SHP001Twice
                            userId: "#{userId}"
                            countUpValue: 1
                            maxValue: 1
                      acquireActions:
                        - action: Gs2Money:DepositByUserId
                          request:
                            namespaceName: ${MoneyNamespaceName}
                            userId: "#{userId}"
                            slot: 0
                            price: 800
                            count: 800
                        - action: Gs2Money:DepositByUserId
                          request:
                            namespaceName: ${MoneyNamespaceName}
                            userId: "#{userId}"
                            slot: 0
                            price: 0
                            count: 840
                        - action: Gs2Inventory:AcquireItemSetByUserId
                          request:
                            namespaceName: ${InventoryNamespaceName}
                            inventoryName: ${ResourceInventoryName}
                            itemName: SIT005
                            userId: "#{userId}"
                            acquireCount: 80

2024年10月10日木曜日 16:46:12 UTC+9 [GS2] 丹羽一智:

Ikefuji Daichi

unread,
Oct 19, 2024, 5:20:37 AM10/19/24
to GS2 ユーザグループ, Ikefuji Daichi, [GS2] 丹羽一智
追記です。

本日17:00頃から上記の現象が全く発生しなくなったのですが、何か対応していただいたのでしょうか。
また今回のような突然想定の挙動とは異なる現象が発生した場合はどのように対応するのが良いのでしょうか。

以上、お手数をおかけしますがよろしくお願いいたします。

2024年10月19日土曜日 15:51:10 UTC+9 Ikefuji Daichi:

丹羽一智

unread,
Oct 19, 2024, 5:24:05 AM10/19/24
to GS2 ユーザグループ, Ikefuji Daichi
サービス利用料には問い合わせ対応に関する費用は含まれませんので、
問い合わせ対応をご希望の場合は、サポートを契約いただくのが一番よろしいかと思います。

Kazutomo Niwa
2024年10月19日 18:20 +0900, Ikefuji Daichi <ikefuj...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages