Skip to main content
Question

[Bug] getDevResourcesAsync() returns empty [] on Instances in Dev Mode, despite resources being visible in UI (Regression)

  • January 30, 2026
  • 0 replies
  • 18 views

Konstantinos Tsirakos

I am developing a Dev Mode plugin that manages Dev Resources. I have encountered a critical issue where the Plugin API fails to retrieve inherited Dev Resources from a component instance in a consuming file, even though those resources are clearly visible in the Dev Mode UI.

This workflow was functioning correctly previously, suggesting a recent regression in the Plugin API or Dev Mode permissions.

My Setup:

  • User Role: Dev Mode (View-only / Dev Seat). No Edit access.

  • Workflow: Cross-file library usage (File A has Main Component, File B has Instance).

Steps to Reproduce:

  1. In File A (Published Library): Create a Component.

  2. Use a plugin to add a Dev Resource to this component programmatically (addDevResourceAsync).

  3. In File B (Consumer): Insert an instance of that component.

  4. Select the instance in Dev Mode.

  5. Observe the "Dev Resources" panel in the UI. (Result: The resources are visible and correct).

  6. Run the following code via the same plugin used in step 2:

    const node = figma.currentPage.selection[0];
    const resources = await node.getDevResourcesAsync();
    console.log(resources);

 

Expected Behavior: The API should return an array containing the Dev Resource objects (inherited from the Main Component), matching what is displayed in the Dev Mode UI.

Actual Behavior: The API returns an empty array [].

Visual Evidence (Attached):

  • Screenshot 1 (Console): Shows the plugin output returning [] for both the instance (selectionDevResources) and the main component reference.

    Console log on File B (Consumer) via the plugin
  • Screenshot 2 (Instance UI): Shows the Instance in File B clearly displaying "docs" and "My Resource" in the Dev Mode panel.

    UI Dev resources on File B (Consumer)
  • Screenshot 3 (Main Component UI): Shows the original Main Component in File A with the same resources.

    UI Dec resources on File A (Published Library)

Additional Notes:

  • Sync is working: If I rename a resource in the Main Component (File A), the name and url updates in the Instance UI (File B) without publishing. This confirms the data is syncing correctly across files.

  • Regression: This API behavior was working correctly recently.