DoctorMcKay / node-steam-tradeoffer-manager

Simple and sane Steam trade offer management
https://dev.doctormckay.com/forum/9-node-steam-tradeoffer-manager/
MIT License
510 stars 134 forks source link

Error parsing description #321

Open JustAzul opened 2 years ago

JustAzul commented 2 years ago

The node process crashes, even using a a VPS with a huge amount of RAM.

The issue is related to Steam Event Cards, i.e Winter Sale Cards.
Error Screenshot ![image](https://user-images.githubusercontent.com/30638036/147425401-bc5cdf19-5ecc-4e0f-a42f-587bec73bd02.png)
Tested versions - [v2.9.5](https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/releases/tag/v2.9.5) - [v2.10.4](https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/releases/tag/v2.10.4)
nolddor commented 2 years ago

I can confirm the problem within trade offers, Im suffering OOM errors due to incoming offers from time to time since few days ago.

JustAzul commented 2 years ago

This error is prompted here: https://github.com/DoctorMcKay/node-steam-tradeoffer-manager/blob/c32dc5762ac4dd519837160f9c1f7b48598883c3/lib/assets.js#L197

For testing purposes, here is a raw JSON example, of 2022 SteamSale.

{
    "icon_url": "IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NsPxnIEnT4QPivs0XEwRuljKt_OwR2wguOfGD_TbTvQLmfQEV9vGL5ZMW_Q9zCmsL_FQjvJErsoRAANf6oDp2MfaMrfakA51tJd-zXtwRB-UBw4dYNEfx2_z2YsOLAkzyRPJp5bmSTxd53Y11kxYEdtWezuX-mWaoKglS0gVUtvHqAdbYqTviLv8ImxNKCQa_U18FWtDtA",
    "icon_url_large": "IzMF03bk9WpSBq-S-ekoE33L-iLqGFHVaU25ZzQNQcXdA3g5gMEPvUZZEfSMJ6dESN8p_2SVTY7V2NsPxnIEnT4QPivs0XEwRuljKt_OwR2wguOfGD_TbTvQLmfQEV9vGL5ZMW_Q9zCmsL_FQjvJErsoRAANf6oDp2MfaMrfakA51tJd-zXtwRB-UBw4dYNEfx2_z2YsOLAkzyRPJp5bmSTxd53Y11kxYEdtWezuX-mWaoKglS0gVUtvHqAdbYqTviLv8ImxNKCQa_U18FWtDtA",
    "icon_drag_url": "",
    "name": "Clorthax Card Delta",
    "market_hash_name": "2021850-Clorthax Card Delta",
    "market_name": "Clorthax Card Delta",
    "name_color": "",
    "background_color": "",
    "type": "Steam 3000 Trading Card",
    "tradable": "1",
    "marketable": "1",
    "commodity": "1",
    "market_fee_app": "2021850",
    "market_tradable_restriction": "7",
    "market_marketable_restriction": "7",
    "cache_expiration": "2022-08-07T16:00:00Z",
    "item_expiration": "2022-08-07T16:00:00Z",
    "descriptions": {
        "0": {
            "type": "text",
            "value": ""
        },
        "1": {
            "type": "text",
            "value": "Valid until [date]1659888000[/date]",
            "color": "A75124"
        }
    },
    "owner_descriptions": {
        "0": {
            "type": "text",
            "value": "Received for completing your discovery queue during the sale.",
            "color": "9C9C9C"
        }
    },
    "owner_actions": {
        "0": {
            "name": "#Profile_ViewBadgeProgress",
            "link": "https://steamcommunity.com/my/gamecards/2021850/"
        },
        "1": {
            "name": "#TradingCards_GrindIntoGoo",
            "link": "javascript:GetGooValue( '%contextid%', '%assetid%', 2021850, 5, 0 )"
        }
    },
    "tags": {
        "0": {
            "internal_name": "droprate_0",
            "name": "Common",
            "category": "droprate",
            "category_name": "Rarity"
        },
        "1": {
            "internal_name": "app_2021850",
            "name": "Steam 3000",
            "category": "Game",
            "category_name": "Game"
        },
        "2": {
            "internal_name": "summersale2022",
            "name": "Summer Sale 2022",
            "category": "Event",
            "category_name": "Event"
        },
        "3": {
            "internal_name": "cardborder_0",
            "name": "Normal",
            "category": "cardborder",
            "category_name": "Card Border"
        },
        "4": {
            "internal_name": "item_class_2",
            "name": "Trading Card",
            "category": "item_class",
            "category_name": "Item Type"
        }
    },
    "classid": "4890576591",
    "instanceid": "1449747935",
    "appid": 753
}