Solved

Logged in customer can't see order details (Getting error 502 Bad Gateway)

BWV831
Shopify Partner
5 0 3

Hi,

We're working on a custom theme for one of our customers. While designing the pages required for Shopify's customer mechanism, I came across a strange behavior. So far, I've finished implentations of login(customer/login.liquid), account(account.liquid) and order(order.liquid) pages. While I was working on the implentation of the order page, everything was working smoothly. But after a while, while I was in another test phase I noticed that I could login to my test account and view my account details with my orders. But when I clicked on the order link to see the order details, I got 502 Bad Gateway error. Before I hadn't been getting such an error. I haven't added any extra script that could break the mechanism. I compared the code with default Dawn theme and there's nothing that could cause such a problem. I'm just redirecting with an anchor tag to the related order's details by using the 'order.customer_url' property. Strangely, it works with Dawn, but ours gets the mentioned error. What can cause such a behavior? As I mentioned before, there's no scripts interfering scripts like REST requests etc. I'm just redirecting to the link as does Dawn. Help would be appreciated. Thanks.

Accepted Solution (1)

odessy1
Shopify Partner
2 1 1

This is an accepted solution.

If you have the additional checkout code loading on the page maybe in a cart drawer this seems to trigger the error.

 

{% if additional_checkout_buttons %}
<div class="additional-checkout-buttons">
{{ content_for_additional_checkout_buttons }}
</div>
{% endif %}

 

View solution in original post

Replies 15 (15)

HandHugs
Shopify Expert
198 1 60

My shopify clients are also having this issue. Something must be wrong!

HandHugs
Shopify Expert
198 1 60

Are you using the Impulse theme as a base by chance? Wondering if there is a theme issue ... 

BWV831
Shopify Partner
5 0 3

No, not Impulse. Actually, we are writing the theme from scratch for some optimization issues. Tho, we are doing nothing special at that point. We just add the customer_url property that Shopify provides us in the order object to get redirected to the order detail page. And also, it was working at the beginning.

MayankV
Tourist
6 0 1

I am facing the exact same issue with Impulse theme. It does work with Dawn though. 

tenaka999
Shopify Partner
4 0 1

Same issue here with all of our shops on Archetype Themes (Impulse / Motion / Expanse) 😕 What can we do ???

Airman235
Visitor
1 0 0

I submitted a ticket with Archetype for this issue.
https://archetypethemes.co/pages/support

ayrity
Excursionist
35 0 25

I'm having the same issue. Plus support said it was one of my apps, but after removing the app and it's source code fully, the issue persists. I think it might be something more native to shopify seeing others having the same issue at the same time. Just started today for me as far as I can tell. Anyone have any other clues? Using venture theme here.

CraigRR
Shopify Partner
3 0 2

We are having the same problem (Motion theme). When customers click on an order number in the order summary to see the order details, the screen goes blank. At the bottom, we see different messages such as,  "waiting for cp.boldapps.net" and "waiting for a.clarity.ms..."  and "waiting for fast.klaviyo.com." (it's NOT the same message each time). After 10-15 seconds, we get the 502 "Bad Gateway" error.  When testing the behavior on the Dawn theme (as a "preview" inside our admin) we do not see the problem behavior.  Not sure this helps, but I hope it's another clue.

odessy1
Shopify Partner
2 1 1

This is an accepted solution.

If you have the additional checkout code loading on the page maybe in a cart drawer this seems to trigger the error.

 

{% if additional_checkout_buttons %}
<div class="additional-checkout-buttons">
{{ content_for_additional_checkout_buttons }}
</div>
{% endif %}

 

HandHugs
Shopify Expert
198 1 60

@odessy1 HOW DID YOU FIND THAT CORRELATION?? This fixed our issue when I removed those dang buttons! 

odessy1
Shopify Partner
2 1 1

A few minutes digging through the source code for Dawn and comparing it to our theme.

MayankV
Tourist
6 0 1

I got a reply from Archetype on the ticket i created... Can anyone from Shopify support confirm this 

 

We're able to confirm that this is an issue happening from Shopify's backend. They're still investigating this matter, but no worries, our development team is also looking into this. We'll definitely send you an update once this is resolved.

HandHugs
Shopify Expert
198 1 60

@BWV831 You should mark @odessy1 's answer as the accepted solution. I am sure removing this code from your theme will solve your problem 🙂 

BWV831
Shopify Partner
5 0 3

Well done, mate! That worked for me as well. But now, comes the next question. How do we implement additional checkout buttons, then? Aren't we allowed to add it into our dynamic cart drawer?

RCosmin
Excursionist
11 0 4

The same problem was just reported by one of our clients - we have confirmed the issue on a test account. Using Kalles theme. We don't have any additional checkout code..

Did anyone got an update from shopify?

Later update:

Is an issue known by shopify and they are working on it. Need to wait an update from them.