Wp-calypso: Pexels Free Photo Library not Pulling Image Options with Searches

Created on 22 Feb 2019  Â·  17Comments  Â·  Source: Automattic/wp-calypso

Please Note: This is a _sporadic issue_ unrelated to which site we're on. Individual confirmations that it works or doesn't work won't provide any additional information sadly.

Steps to reproduce

  1. Starting at URL: https://wordpress.com/media/
  2. Click on the Free Photo library option.
  3. Attempt to Search for any term as usual (examples: business, cat, tree, dog)
  4. No image options are returned.

What I expected

I expected to see results of images to choose from to add to my media library.

What happened instead

No options were returned.

Seemingly no matter the search term the results say No media files match your search for...

Browser / OS version

Chrome, Version 71.0.3578.98 (Official Build) (64-bit)

Screenshot / Video

pexelssearching

Context / Source

dogfooding, #manual-testing, #user-report

Media [Type] Bug

Most helpful comment

@aamills can you verify if searches are working now? I'm no longer able to reproduce with Simple Sites.

All 17 comments

Same report: #30968

Another case: #10441720-hc

Mentioned this in the other issue, but I'm experiencing this too and it's pretty frustrating. Can reproduce in Gutenberg, Classic and Media Library so that doesn't seem to make a difference.

cc @notnownikki any chance you could help debug here? Do our requests look incorrect, or is there an issue on the pexels side?

The response is a 200, with 0 results.

FWIW, this plugin is still working fine (on a JN site): https://wordpress.org/plugins/wp-pexels-free-stock-photos/

dsfgfgsdsdfgfgsd

Identical to the results here: https://www.pexels.com/search/Cat/

@aamills can you verify if searches are working now? I'm no longer able to reproduce with Simple Sites.

Another case: #10673441-hc

Broken for me again too...it was working last night after it was broken to begin with.

Edit: aaaand now it's working again

1824462-zen still has issues as well.

@gwwar Does seem that it's working again for simple sites.

customer reported this issue on an Atomic site. I was able to reproduce by logging in and searching for basically anything (dog, space, cat, person).

I also tested this on a Simple site in Calypso and it does not return any results for searches.

From the console:

{
    code: 200,
    headers: [ {
        name: "Content-Type",
        value: "application/json"
    } ],
    …
}

body: {
    found: 0,
    media: [],
    meta: {
        next_page: false
    }
}

code: 200

headers: [ {
    name: "Content-Type",
    value: "application/json"
} ]

Some preliminary information from debugging this:

  • the code does not involve the blog site and so we're probably seeing sporadic results rather than anything relating to Simple Sites vs. Atomic, etc… this API call is proxied on the public-api.wordpress.com server.
  • we're getting a successful response showing no results when we get empty list of images. this means that our code path to Pexels is working fine. when I send the same request but change the security token I get an authorization error, confirming that our code path is right
  • there is a rate limit on Pexels' service but we don't appear to be anywhere near hitting it. also, I confirmed sporadic behavior here _while_ positively confirming that we're under our rate-limit threshold
  • Pexels has no "uptime or availability guarantee. Some features may change in the future."

My assessment is that Pexels is undergoing some kind of partial service outage but I'm not sure how to verify other than contacting them directly.

cc: @johngodley @notnownikki

As Dennis states, a correct response is being returned by our API so it is very unlikely this is anything other than a problem with Pexels. The sporadic nature of the problem also indicates the same. There is no difference between Atomic/Simple etc - the code is the same on our end.

I've been unable to reproduce the issue myself.

As a follow-up, I've randomly tested Pexels since this issue was first reported and have not been able to reproduce an issue. Usage of the feature has not been affected in any significant way, so it seems like this was an intermittent issue.

We'll need to confirm this with Pexels, but at the moment it looks like the issue is fixed.

I had a case on Friday -- hc-10126376 -- but it seems to be working for this user now!

Encountered this issue over the weekend on #1828437-zen

Reporting no issues since 2/24/2019

Please see the note in the summary: this is an intermittent issue and so there's no need to continue adding mentions that it does or doesn't work.

I'm closing this for now since nothing is technically broken that is fixable. Status will be pending some updates hopefully that we receive from Pexels and their API support.

Was this page helpful?
0 / 5 - 0 ratings