"Unexpected error" occurred when "metafieldsSet" mutation of Admin GraphQL API is executed

I would like to use App-data metafields and tried it. But “Unexpected error” occurred when I executed metafieldsSet mutation according to this document.

The steps are:

  1. Create a Shopify app and create an access token including all access scopes.

  2. Retrieve the app installation ID,

  3. Create an app-data metafield.

  4. GraphQL API returns the error: “Unexpected system error. Try again later.”

I appreciate any help, thank you.

Hi Morishin,

It does look like you’re following the docs correctly, so I’ve reached out to our internal devs to see if there’s an issue on our side. When you get this error is there any response error codes returned too?

Hi Liam,

Thank you for your response!

After adding a code field to userErrors to check the error code, I encountered an “Internal Server Error” from the server. :cry:

Hi again Morishin,

It seems that this is a bug on our side, related to how app reserved namespaces are used with app data metafields. While we work on a fix for this, a workaround would be to specify a non-app reserverved namespace. (for example: “custom”, and not “$app:foo” or “app–{YOURAPPID}–foo”)

Thanks for flagging this,

Hi Liam,

I got it.

That workaround works for me! Thanks a lot.

1 Like

Hello !

Any update on this ?

I have the same issue (getting “Unexpected system error. Try again later.”) using a reserved namespace and while using a non-app reserved namespace work, it’s clearly an issue regarding on critical parts like Checkout Functions (as stated here: https://shopify.dev/docs/apps/functions/input-output/variables-queries)

Thanks in advance !