GetLatestAssetVersionAsync throws HTTP 403 if the place is not published

This is reproducible 100% of the time.

Error:

In Studio, attempting to use InsertService:GetLatestAssetVersionAsync will throw an HTTP 403 no matter what, should your place not be published. The ID I used to test this is of a model I published on my own. It seems that this method ignores the current studio user and only looks for a published place.


To Repro:

Step 1: Get the ID of an asset you have uploaded to your profile, or upload a new asset to your profile and get its asset ID. Open a new baseplate in Studio.
Step 2: Ensuring you are logged into studio (This should be implicit due to login requirements of modern studio). Run this in the command bar. This code should throw InsertService getLatestAssetVersion : Request Failed because HTTP 0 (HTTP 403) on an unpublished place.

local InsertService = game:GetService("InsertService")
local AssetVersionId = InsertService:GetLatestAssetVersionAsync(0) -- Replace 0 with your asset's ID.
local Asset = InsertService:LoadAssetVersion(AssetVersionId)
Asset.Parent = workspace

Step 3: Publish the place to your profile. Exit the place instance (Return to studio start screen) and reload the published place. This is done to clear any caches created by the InsertService.
Step 4: Repeat Step 2. This should no longer error.


This behavior goes against what is expected, namely the behavioral example set by LoadAsset which works regardless of whether the place is published or not.

8 Likes

3 posts were merged into an existing topic: Bump posts

If you have no new/useful information to add to this bug report, please just leave a like. There is no need for repeated bumps within minutes of each other.

Unwarranted bumps will be removed and can lead to forum strikes.