The YouTube video ID is invalid or the video was deleted.

is the error I see.

elseif ($response->code != 200) {
      dpm($response);
      throw new MediaInternetValidationException('The YouTube video ID is invalid or the video was deleted.');
    }

The error is in fact -110, or Connection Time Out. So the module is fine, there's no id bug, but my connection to YouTube is the issue.

Good to know :D

Maybe we should add a case where if it's not a recognized error, we provide the error code for the user/developer?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mcdoolz created an issue. See original summary.

mcdoolz’s picture

Issue summary: View changes
joseph.olstad’s picture

Please submit a patch that handles error code 110

opdavies’s picture

I've had the same issue. Here is a patch that throws the same MediaInternetValidationException, just with a different error message.

joseph.olstad’s picture

Status: Needs review » Reviewed & tested by the community

thanks!
RTBC

joseph.olstad’s picture

ok should commit this soon.

AaronELBorg’s picture

Not really the same issue but I ran into an issue where the request was returning a 404. Seems like a strange timing issue.

Attached patch seems to do the trick.

opdavies’s picture

If #7 is a fixing a different thing, it should probably be in it's own issue instead of adding to this one.

stovak’s picture

Google as a company is deprecating "http" on all API's. All these API's need to be 100% https.

MediaYouTubeStreamWrapper -> validId

makes a http call that almost always times out. Creating a new ticket to fix this.

  • joseph.olstad committed eed415d on 7.x-3.x authored by opdavies
    Issue #2893112 by opdavies, joseph.olstad, mcdoolz: Connection timed out...
joseph.olstad’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mikeytown2’s picture

Heads up that Google now will always return a 200, thus you need to look at the headers vs http status code.