Re: [BUG] Subscription with local pickup returns GQL API Internal server error

Solved

[BUG] Subscription with local pickup returns GQL API Internal server error

Brian_S
Shopify Partner
170 21 43

I don't know if this is related to the new release of Local Pickup options being available for subscriptions or not but since this is one of the first subscriptions I've seen with local pickup selected as the delivery method it makes me thing it might be. 

 

I can't do a simple `subscriptionContract` query with `deliveryMethod` as one of the fields I'm requesting.  This also makes me think it's related to the fact that it's local delivery.

 

This request fails:

query getSubscriptionContract($id: ID!) {
	subscriptionContract(id: $id) {
		id
		deliveryMethod {
			__typename			
		}
	}
}

 

this request returns fine: 

query getSubscriptionContract($id: ID!) {
	subscriptionContract(id: $id) {
		id
	}
}

 

 

When I test on a subscription that does not have local delivery as the delivery method both requests pass

 

 

Here's an example failed response with the request ID for further investigation.

{
	"errors": [
		{
			"message": "Internal error. Looks like something went wrong on our end.\nRequest ID: 36322b71-2464-4605-a4ce-6e07a386b5e1 (include this in support requests).",
			"extensions": {
				"code": "INTERNAL_SERVER_ERROR",
				"requestId": "36322b71-2464-4605-a4ce-6e07a386b5e1"
			}
		}
	]
}

 

Thanks in advance! this is preventing some of our merchants from performing standard customer support  

 

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
Accepted Solution (1)
JoshArnold
Shopify Staff
30 7 6

This is an accepted solution.

Hi @Brian_S !

You are correct that this is related to the new release and we have a fix that has just been released a few moments ago. Could you confirm it is working for you now in 2022-07?

The expected behavior when retrieving a Local Delivery or Pickup deliveryMethod on an older API Version than 2022-10 would be that it is returned as null.

 

Best,

Josh

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 6 (6)

Brian_S
Shopify Partner
170 21 43

I should have added that this is only a problem when using API Version 2022-07 and fixes itself when I switch to version 2022-10 (which we are in the process of doing) but since I am using 2022-07 I should be ok to make this request still

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic
JoshArnold
Shopify Staff
30 7 6

This is an accepted solution.

Hi @Brian_S !

You are correct that this is related to the new release and we have a fix that has just been released a few moments ago. Could you confirm it is working for you now in 2022-07?

The expected behavior when retrieving a Local Delivery or Pickup deliveryMethod on an older API Version than 2022-10 would be that it is returned as null.

 

Best,

Josh

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

haptt
Shopify Partner
2 0 0

Hi Masterchief, we also had a issue related to SubscriptionDeliveryMethodPickupOption. When we try to get the location information in the pickupOption object, the result is "Internal error. Looks like something went wrong on our end.\nRequest ID: 1f4cdaab-a9b1-4e1e-9766-cc6d7131ef12 (include this in support requests)."
We are using api version 2022-10.

query subscriptionContract($id: ID!) {
  subscriptionContract(id: $id) {
    deliveryMethod {
      ... on SubscriptionDeliveryMethodPickup {
        __typename
        pickupOption {
          title
          code
          description
          presentmentTitle
          location {
            __typename
            id
            name
            address {
              __typename
              address1
              address2
              city
              country
              countryCode
              formatted
              latitude
              longitude
              phone
              province
              provinceCode
              zip
            }
          }
        }
      }
    }
  }
}

  Could you please check this for me?

JoshArnold
Shopify Staff
30 7 6

Hello @haptt!

 

Could you please send me a private message with the subscription contract ID you are making this query for, and the Shop this is for? I tested this on one of our test stores without any issue, so I suspect it is something specific to your Shop's data, whether that's at the subscription or location level, I'm not sure yet.

Josh (aka Master Chief) | Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

dwyckoff
Shopify Staff
15 1 3

Hey Brian! Thanks for the quick comment here.
We took swift action and this bug should now be resolved in production. You should find a null delivery method surfaced, rather than an exception, until you update to 2022-10.
Please post again if you spot anything else while working with Local Delivery or Pickup!

To learn more visit the Shopify Help Center or the Community Blog.

Brian_S
Shopify Partner
170 21 43

Thanks for the quick turnaround! I can confirm that the bug's been resolved 🙌

Brian Singer
CTO & Cofounder of Subscription Service - Awtomic