Any time I have the new hub option selected (which is checked by default) it doesn't return anything and then doesn't load anything up. Any way I could even start debugging this?

{success: false, message: "Couldn't communicate with the H5P Hub. Please try again later.",…}
errorCode
:
"NO_RESPONSE"
message
:
"Couldn't communicate with the H5P Hub. Please try again later."
success
:
false
CommentFileSizeAuthor
#7 Screen Shot 2017-05-18 at 9.35.14 AM.png235.77 KBCGLDevel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

btopro created an issue. See original summary.

icc’s picture

Do you get any messages in your web server's error_log file? Are you running on Window or Linux?

btopro’s picture

linux. Ubuntu 16 and RHEL 6 boxes

icc’s picture

Do you get any messages in your web server's error_log file? Are you able to ping h5p.org from your server?

btopro’s picture

nope, nothing. able to ping yes.

icc’s picture

Ok, you can try to print the error message directly to figure out what's going wrong.wrong.
Locate the following line in the h5p.classes.inc file: (it should be close to the top)

  public function fetchExternalData($url, $data = NULL, $blocking = TRUE, $stream = NULL) {
    ...

    $response = drupal_http_request($url, $options);

    ...
  }

And then you add the following right after the line:

    if (!empty($response->error)) { print $response->error; exit; }

Now, try to enable the hub again and you should get the error.

CGLDevel’s picture

This is the response printout from line 36. The http request is returning status code 200 in Chrome; however -- the code return in h5p module is returning code 0 (which does not exist). The drupal_htttp_request does not return an error...Here's a screenshot of the output.

icc’s picture

That's really strange. I'm not able to reproduce this on any of my systems. Are you using some sort of special build of PHP?

Edit:
Do you know if the openssl extension is enabled or not?

btopro’s picture

PHP 7.1 I believe, nope just Ubuntu 16 w/ PHP 7

icc’s picture

Do you know if the openssl extension is enabled or not?

btopro’s picture

Yes it is enabled

dfusco’s picture

Bump for this. When trying to use the hub on this same system, I am getting "Loading, please wait..." when trying to add a given resource. It never responds with a timeout or error. Pic attached. Please advise on next steps for testing.

https://dl.dropboxusercontent.com/u/33170273/Screen%20Shot%202017-06-18%...

icc’s picture

@dfusco This sounds like different issue to me. Check your browser's console(Ctrl+Shift+J in Chrome) for any error messages.

paalj’s picture

@btopro: did you ever find a solution to this issue?

btopro’s picture

I think i narrowed in on the cause but not a real fix. I noticed issues w/ making SSL calls out to other services as well. If I used drupal_http_request a call would only go through occationally. If I used a php curl_init and structured the same call but via curl then it would go through. It seems to be an issue with php socket connections on some configurations of SSL between servers. You don't happen to use cloudflare or some other DDNS do you? Have noticed issues w/ that an cert decryption from my testing of other services.

icc’s picture

Very strange.
No there's no CloudFlare or DDNS.

You could try temporarily disabling the openssl extension and see if it makes a difference.

zhinio’s picture

I am having the same Issue. Couldn't communicate with the H5P Hub. Please try again later.
h5p-content:1 Uncaught (in promise) {success: false, message: "Couldn't communicate with the H5P Hub. Please try again later.", errorCode: "NO_RESPONSE"}errorCode: "NO_RESPONSE"message: "Couldn't communicate with the H5P Hub. Please try again later."success: false__proto__: constructor: ƒ Object()hasOwnProperty: ƒ hasOwnProperty()isPrototypeOf: ƒ isPrototypeOf()propertyIsEnumerable: ƒ propertyIsEnumerable()toLocaleString: ƒ toLocaleString()toString: ƒ toString()valueOf: ƒ valueOf()__defineGetter__: ƒ __defineGetter__()__defineSetter__: ƒ __defineSetter__()__lookupGetter__: ƒ __lookupGetter__()__lookupSetter__: ƒ __lookupSetter__()get __proto__: ƒ __proto__()set __proto__: ƒ __proto__()
Promise rejected (async)
value @ h5p-hub-client.js?oupxln:8
e @ h5p-hub-client.js?oupxln:8
e @ h5p-hub-client.js?oupxln:8
ns.SelectorHub @ h5peditor-selector-hub.js?oupxln:19
ns.LibrarySelector @ h5peditor-library-selector.js?oupxln:43
(anonymous) @ js_buaGpRGpA-QMdiBVtMs4OW38lwc3C-byVCnX4nhiCj4.js:3830
c @ jquery.js?oupxln:2
fireWith @ jquery.js?oupxln:2
k @ jquery.js?oupxln:4
r @ jquery.js?oupxln:4
XMLHttpRequest.send (async)
send @ jquery.js?oupxln:4
ajax @ jquery.js?oupxln:4
(anonymous) @ js_buaGpRGpA-QMdiBVtMs4OW38lwc3C-byVCnX4nhiCj4.js:3824
dispatch @ js_buaGpRGpA-QMdiBVtMs4OW38lwc3C-byVCnX4nhiCj4.js:226
v.handle @ js_buaGpRGpA-QMdiBVtMs4OW38lwc3C-byVCnX4nhiCj4.js:226

The strange thing is that it works fine on my local machine.

zhinio’s picture

I tracked the problem to httprl module.
I disabled it and now it works fine.

btopro’s picture

ugh, your right that fixes it lol

zhinio’s picture

If you are still set on using httprl, u still can. Just need to uncheck "Use httprl to handle drupal_http_request." and it should work fine.

paalj’s picture

zhinio: thanks alot for figuring this one out, and sharing the solution with us!

I will add some documentation about your findings to h5p.org.

paalj’s picture

Status: Active » Closed (works as designed)