JustArchiNET/ArchiSteamFarm · warning · NotSupportedException

last_assetid is null!

Error message

last_assetid is null!

What it means

Pagination guard in GetMyInventoryAsync: when response.Body.more_items is true (Steam says there is another page) but response.Body.last_assetid is 0, ASF cannot form the next request's start_assetid and throws a NotSupportedException ('last_assetid is null!'). It refuses to silently loop or skip items.

Source

Thrown at ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:328

				}

				foreach (CEcon_Asset? asset in response.Body.assets.Where(asset => assetIDs.Add(asset.assetid))) {
					InventoryDescription? description = descriptions.GetValueOrDefault((asset.classid, asset.instanceid));

					// Extra bulletproofing against Steam showing us middle finger
					if ((tradableOnly && (description?.Tradable != true)) || (marketableOnly && (description?.Marketable != true))) {
						continue;
					}

					yield return new Asset(asset, description);
				}

				if (!response.Body.more_items) {
					yield break;
				}

				if (response.Body.last_assetid == 0) {
					throw new NotSupportedException(Strings.FormatErrorObjectIsNull(nameof(response.Body.last_assetid)));
				}

				request.start_assetid = response.Body.last_assetid;
			}
		} finally {
			InventorySemaphore.Release();
		}
	}

	[PublicAPI]
	public async Task<Dictionary<uint, string>?> GetOwnedGames(ulong steamID) {
		if ((steamID == 0) || !new SteamID(steamID).IsIndividualAccount) {
			throw new ArgumentOutOfRangeException(nameof(steamID));
		}

		if (Client == null) {
			throw new InvalidOperationException(nameof(Client));
		}

View on GitHub (pinned to fe57c4129f)

Solutions

  1. Retry the request; pagination cursor issues are usually transient.
  2. Reduce itemsCountPerRequest so each page is smaller and more likely to include a valid cursor.
  3. If persistent for a specific account, fall back to the ArchiWebHandler HTTP inventory path.
  4. Report upstream — a non-zero more_items with zero cursor is a Steam-side contract violation.
Defensive patterns

Strategy: fallback

Validate before calling

// Prefer smaller pages so a valid last_assetid cursor is returned.
ushort pageSize = Math.Min(itemsCountPerRequest, (ushort) 2000);

Try / catch

try { await foreach (var a in handler.GetMyInventoryAsync(itemsCountPerRequest: 2000)) { /* ... */ } }
catch (NotSupportedException ex) when (ex.Message.Contains("last_assetid")) {
    // pagination broken; retry or fall back to HTTP path
}

Prevention

When it happens

Trigger: Steam marks the inventory page as having more items (more_items == true) but omits/zeroes the last_assetid cursor, so the next page request would be malformed or repeat the first page.

Common situations: Steam GC pagination bug under load; very large inventories where cursor handling breaks; partial response cut off mid-page.

Related errors


AI-assisted analysis of JustArchiNET/ArchiSteamFarm@fe57c4129f (2026-08-13). Data as JSON: /api/errors/dece4d9a986c01a1. Report an issue: GitHub.