Last modified: 2013-10-16 05:48:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44468, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42468 - "http-curl-error" when uploading from Flickr from https
"http-curl-error" when uploading from Flickr from https
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
master
All All
: High major (vote)
: ---
Assigned To: Bryan Davis
:
Depends on: 40596
Blocks: 43450
  Show dependency treegraph
 
Reported: 2012-11-27 01:08 UTC by Sumana Harihareswara
Modified: 2013-10-16 05:48 UTC (History)
12 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Sumana Harihareswara 2012-11-27 01:08:05 UTC
At https://test.wikipedia.org/wiki/Special:UploadWizard and https://test2.wikipedia.org/wiki/Special:UploadWizard I tried to add images from Flickr using the "Add images from Flickr" button.

I tried the following URLs to photos:

https://secure.flickr.com/photos/library_of_congress/8211550552/

http://www.flickr.com/photos/quimgil/8220094378/in/photostream

https://secure.flickr.com/photos/quimgil/8220094378/in/photostream

In all cases, at the next step (Uploading...), the file seemed to fail to download, but the title got captured, e.g.:

  Parliament of Catalonia - Elections.jpg
  Unknown error: "http-curl-error".

Kaldari thinks it sounds like a problem with the proxy.
Comment 1 Ryan Kaldari 2012-11-27 01:28:33 UTC
Looks like switching the API URL to secure causes Flickr to return secure URLs for the images, which then breaks our proxy downloading. (The Wikimedia proxy server currently can't handle HTTPS requests.)
Comment 2 Ryan Kaldari 2012-11-27 01:58:11 UTC
Fixed in https://gerrit.wikimedia.org/r/#/c/35339/.

Issue with proxy server should be filed as a separate bug.
Comment 3 Sumana Harihareswara 2012-11-27 02:41:03 UTC
Can this fix be backported so that I can test the Flickr upload on test & test2, and see whether the proxy server issue is still reproducible?
Comment 4 Antoine "hashar" Musso (WMF) 2012-11-27 08:57:19 UTC
Change https://gerrit.wikimedia.org/r/#/c/35339/ from comment #2 has been reverted because it got merged but has not been deployed.  The revert is https://gerrit.wikimedia.org/r/#/c/35359/

Reopening bug.
Comment 5 Sumana Harihareswara 2012-11-27 22:50:57 UTC
Error is still reproducible on test2, which is predictable because the fix needs to be backported to the branch that's deployed right now (1.21wmf5).
Comment 6 Sumana Harihareswara 2012-11-27 22:53:29 UTC
Ryan, can you re-deploy your fix?  This is a blocker for tomorrow's 1.21wmf5 deployment to Commons.  Thanks!
Comment 7 Sam Reed (reedy) 2012-11-27 23:26:24 UTC
(In reply to comment #6)
> Ryan, can you re-deploy your fix?  This is a blocker for tomorrow's 1.21wmf5
> deployment to Commons.  Thanks!

Not really, the feature isn't enabled on Commons

'wgAllowCopyUploads' => array(
	'default' => false,
	'testwiki' => true,
	'test2wiki' => true,
//	'commonswiki' => true, // disabled until flickr interface is ready --kaldari
),
Comment 8 Sumana Harihareswara 2012-11-27 23:47:18 UTC
Sorry for misunderstanding.  Removing deployment blocker bug.
Comment 9 Ryan Kaldari 2012-11-28 00:24:00 UTC
Fixed, deployed, and verified on test.wiki.
Comment 10 Nischay Nahata 2012-11-28 19:17:31 UTC
On my local wiki I still get the same error on the master branch. My config file has 
	'flickrApiUrl' => 'http://api.flickr.com/services/rest/?',

Not sure if this should open this bug, please test.
Comment 11 Sumana Harihareswara 2012-12-09 05:08:17 UTC
Still happening on test.wikipedia.org.  Marking as blocking deployment (to Commons) since https://gerrit.wikimedia.org/r/#/c/37353/1/wmf-config/InitialiseSettings.php has been merged and thus this feature would go live to Commons on Wednesday.
Comment 12 Ryan Kaldari 2012-12-10 21:42:23 UTC
I cannot reproduce this bug using the steps from comment #1. Are you still seeing it using those exact steps?
Comment 13 Ryan Kaldari 2012-12-11 21:35:24 UTC
Looks like this error is caused by the 'HTTPS everywhere' Firefox add-on. There are two ways this could be fixed:
1. Add HTTPS support to the WMF proxy server that pulls the images from Flickr
2. Change UploadWizard to use Flickr's secure API and add a hack to UploadWizard that rewrites all the secure image URLs returned from the API into non-secure URLs.
Comment 14 Platonides 2012-12-11 21:41:51 UTC
How hard would it be to do 1?
Doesn't the proxy accept connect? curl should be able to make a tls request on its own.
Comment 15 Ryan Kaldari 2012-12-11 22:03:39 UTC
In the meantime, we should at least detect for the 'http-curl-error' and return a better error message. Something like "Error: Could not retrieve file from remote host. You may need to turn off the HTTPS Everywhere browser extension."
Comment 16 Nemo 2013-01-02 15:32:26 UTC
I'm using Firefox with HE on fedora 17. Sometimes a file out of a dozen fails and I've encountered a couple other bugs, but no http-curl-error anywhere.
Comment 17 Nemo 2013-02-06 17:23:01 UTC
Removing HE from summary: it never happened to me when using FF lately, but it happened just now with a "clean" Chromium.
Comment 18 Nischay Nahata 2013-02-07 10:30:54 UTC
Able to reproduce today. Some debugging info I could gather from mw.IframeTransport :


The response of the Api request made by the Iframe is

error: Object-?
0: "Operation timed out after 25007 milliseconds with 431627 out of 1937071 bytes received"
code: "http-curl-error"
info: "Error fetching file from remote source"


Apparently ui.showError doesn't identify this code and outputs the default message it should.
Comment 19 Nischay Nahata 2013-02-07 11:09:45 UTC
I tried to upload directly by using the Upload Api and got the same error but in more detail.

{"error":{"code":"http-curl-error","info":"Error fetching file from remote source","0":"SSL certificate problem, verify that the CA cert is OK. Details:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"}}

Shouldn't this be moved to core?
Comment 20 Nemo 2013-02-07 13:32:37 UTC
(In reply to comment #19)
> {"error":{"code":"http-curl-error","info":"Error fetching file from remote
> source","0":"SSL certificate problem, verify that the CA cert is OK.
> Details:\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
> verify failed"}}

Argh, is this bug 42441 striking again? Is $sslVerifyHost overridden somewhere else or what?
Last time I got this error, I wasn't even on https...
Comment 21 Nischay Nahata 2013-02-07 14:17:16 UTC
(In reply to comment #20)
> Argh, is this bug 42441 striking again? Is $sslVerifyHost overridden
> somewhere
> else or what?
> Last time I got this error, I wasn't even on https...

I don't think so, the problem is that curl is failing to verify the host.
Maybe UW uses https flickr links to upload via the Upload Api, thus you are not on https but still see the error.

Also we should show better error messages, currently we are showing the error code but we should show the info associated with it.
We might also want to catch errors from bad internet connectivity.I found two more possible errors (see below) with same code, here displaying the info on UW would be more helpful.

{"error":{"code":"http-curl-error","info":"Error fetching file from remote source","0":"couldn't connect to host"}}

{"error":{"code":"http-curl-error","info":"Error fetching file from remote source","0":"Could not resolve host: secure.flickr.com; Host not found"}}


I have made a change for the error message https://gerrit.wikimedia.org/r/#/c/47868/
Comment 22 Nemo 2013-02-07 14:28:07 UTC
(In reply to comment #21)
> I don't think so, the problem is that curl is failing to verify the host.
> Maybe UW uses https flickr links to upload via the Upload Api, thus you are
> not
> on https but still see the error.

Ahem, my bad: I probably pasted an https flickr URL in UW, as I copied it from Firefox.
Comment 23 Bryan Davis 2013-08-22 22:28:04 UTC
Note to self: see if this got magically fixed or not. May need some ops love if not.
Comment 24 Bryan Davis 2013-08-27 20:47:08 UTC
I didn't capture any specific error messages, but this seems to still fail. See https://commons.wikimedia.org/wiki/File:Stormy_sky,_Danarau_Marina,_Fiji for my attempt that did get meta data from flickr but no image.
Comment 25 Bryan Davis 2013-09-17 23:51:30 UTC
So apparently my file did get uploaded: https://commons.wikimedia.org/wiki/File:Stormy_sky,_Danarau_Marina,_Fiji.jpg. Commons has both meta data and image content. This upload was done with the toolslab.org tool and not upload wizard however.

I tried to follow Sumana's original issue instructions and can't even get as far as she did. The initial javascript ajax call to https://api.flickr.com/services/rest/ seems to timeout in my browser. If I manually visit the api.flickr url it redirects to secure.flickr and returns a seemingly valid json blob.
Comment 26 Rob Lanphier 2013-10-10 17:41:31 UTC
*** Bug 54468 has been marked as a duplicate of this bug. ***
Comment 27 Bryan Davis 2013-10-15 22:10:11 UTC
I was able to import https://secure.flickr.com/photos/fabola/9743350532/ as https://test.wikipedia.org/wiki/File:Fabola-9743350532.jpg with no issues using Chrome 30.0.1599.69 on OS X. I did however need to switch to a profile that does not have the HTTPS Everywhere extension installed.

With HTTPS Everywhere installed/enabled I get an error in the local browser when an XHR request is made for https://api.flickr.com/services/rest/?&nojsoncallback=1&method=flickr.photos.licenses.getInfo&api_key=e9d8174a79c782745289969a45d350e8&format=json. This error seems to stop the entire Upload Wizard process.
Comment 28 Bryan Davis 2013-10-15 23:37:01 UTC
I was also able to import multiple files to test2 using https://secure.flickr.com source URLs as long as HTTPS Everywere is not running. I'm going to reopen the bug more specifically about that issue and close this one.

The SSL root certificates currently used in the cluster are fine with Flickr's certificate.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links