502 error retrieving thumbnails
-
I have just updated to the latest version (1.9.2) and I’m now getting bad gateway errors (502) when retrieving all thumbnail images. I notice the latest review says the same thing.
Possibly a bug, or coincidence? I’m not sure where to start diagnosing.
-
Hi
Is the bad gateway error on your own site or on Instagram? Can you find the PHP logs for your site and post back anything referring to the Instagram widget.The latest review pre-dates this release (1.9.2) and does not coincide with any other release so I have no idea what the problem is there.
Ah, I didn’t notice the review date, sorry.
Instagram looks fine, it is getting the image from instagram that generates the 502 error. The errors show in the developer tools console:
GET http://scontent.cdninstagram.com/s160x160/… 502 (Bad Gateway)
There are no errors in the log file.
Can you provide a link to your Instagram account so I can test it. It sounds like your images are using a different CDN url format. If you could provide a link to your site that would be good too.
It’s a client’s instagram: https://www.instagram.com/ollystabler/ and his site is http://www.ollystabler.com/ (see footer, right)
Just ran quick test on my local setup and the username is working for me: https://dl.dropboxusercontent.com/u/3019972/screenshots/160111-161608.png
I would recommend flushing your transients, there is a plugin to help with that: https://wordpress.org/plugins/artiss-transient-cleaner/
Thanks for your efforts Scott.
Transients flushed, but still the same unfortunately. Here is the generated HTML of the first thumbnail:
<img src="////scontent.cdninstagram.com/s160x160/hphotos-xpf1/t51.2885-15/s640x640/sh0.08/e35/12393624_1027999930577038_1127942759_n.jpg" alt="Behind the scenes from today's shoot" title="Behind the scenes from today's shoot" class="">This is the HTML I am seeing generated for the first image on my local account:
<img src="//scontent-lhr3-1.cdninstagram.com/hphotos-xpf1/t51.2885-15/s160x160/sh0.08/e35/12393624_1027999930577038_1127942759_n.jpg" alt="Behind the scenes from today's shoot" title="Behind the scenes from today's shoot" class="">So the difference here is the CDN partly (mine is at LHR), yours seems more generic and possibly missing something. You also have far too many forward slashes at the start which is unusual.
For now I would roll back the plugin to this version: https://github.com/scottsweb/wp-instagram-widget/blob/c66550eded59bd51f508f304a85a3e031ac4044c/wp-instagram-widget.php
Thanks Scott, v 1.9.1 gives no 502 errors, and the thumbnails appear fine. For reference, the generated code is:
<img src="//scontent.cdninstagram.com/hphotos-xpf1/t51.2885-15/s160x160/sh0.08/e35/12393624_1027999930577038_1127942759_n.jpg" alt="Behind the scenes from today's shoot" title="Behind the scenes from today's shoot" class="">As you say, there are two extra forward slashes. Very strange.
Very odd, I have tried hard coding your good URL into my local version running 1.9.2 and I still get the expected result – a working URL at the end:
In:
https://scontent.cdninstagram.com/hphotos-xpf1/t51.2885-15/sh0.08/e35/12393624_1027999930577038_1127942759_n.jpgOut:
<img src="//scontent.cdninstagram.com/hphotos-xpf1/t51.2885-15/s160x160/sh0.08/e35/12393624_1027999930577038_1127942759_n.jpg" alt="Behind the scenes from today's shoot" title="Behind the scenes from today's shoot" class="">I am completely confused. Let’s see if more people report bugs.
Thanks for your efforts and quick response Scott – really appreciated.
Hey Scott, I’m getting the same issue in the footer here: http://ericmoss.ca
I am going to need some help debugging this from all you folks that encounter this issue. Due to my geographic location I am seeing images served from Instagram on different URLs and it is making it very hard to debug.
Firstly I would like you to try this version of the plugin: https://github.com/scottsweb/wp-instagram-widget/blob/master/wp-instagram-widget.php
I have just reverted some of the changes I made yesterday, I hoping it catches it. If not we will need to go through a number of debugging steps.
Let me know how you get on
I’m getting the same issue on my client’s blog:
http://shradersworld.com/clients/caroline/blog/I’m a developer (though new-ish to PHP) and would love to help you debug this. Let me know what I can do to help.
@brianshrader great! thank you. Please can you try this version of the plugin: https://github.com/scottsweb/wp-instagram-widget/blob/master/wp-instagram-widget.php
and report back your findings.
Hi Scott,
I had the same problem (502 error) but only when I switched the photo size format (i.e. from Large to Thumbnail, or Small). With the new version everything works as it should.
If you need more testing done let me know 🙂
The topic ‘502 error retrieving thumbnails’ is closed to new replies.