Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable9] GDrive stream download with RetryWrapper #23518

Merged
merged 1 commit into from
Mar 31, 2016

Conversation

PVince81
Copy link
Contributor

Backport of #23517 to stable9

@icewind1991 @SergioBertolinSG @Xenopathic

@PVince81 PVince81 added this to the 9.0.1-current-maintenance milestone Mar 23, 2016
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @LukasReschke, @MTGap, @icewind1991 and @Xenopathic to be potential reviewers

@icewind1991
Copy link
Contributor

👍

@SergioBertolinSG
Copy link
Contributor

I'm getting internal server errors while downloading the existing content of google drive mount:

{"reqId":"\/AYYiulO1LZQEnHB0W\/j","remoteAddr":"HIDDEN_IP","app":"webdav","message":"Exception: {\"Message\":\"Error creating resource: [message] fopen(): SSL operation failed with code 1. OpenSSL Error messages:\\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] fopen(): Failed to enable crypto\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] fopen(https:\\\/\\\/doc-00-5g-docs.googleusercontent.com\\\/docs\\\/securesc\\\/8785kct8nhopg7u900qh2mn2ug44rps8\\\/vsst0jju0lgvagihmkg2tbts4bhi5tv7\\\/1459152000000\\\/04098952054795273577\\\/04098952054795273577\\\/0B-1F3b2KzGBacDI1UF9fS2ZWenM?e=download&gd=true): failed to open stream: operation failed\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] Undefined variable: http_response_header\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 407\",\"Exception\":\"GuzzleHttp\\\\Exception\\\\RequestException\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(104): GuzzleHttp\\\\Exception\\\\RequestException::wrapException(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Ring\\\\Exception\\\\RingException))\\n#1 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#2 \\\/opt\\\/owncloud\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#3 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#4 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#5 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(135): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#6 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#7 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#8 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/http\\\/client\\\/client.php(129): GuzzleHttp\\\\Client->get('https:\\\/\\\/doc-00-...', Array)\\n#9 \\\/opt\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/google.php(448): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/doc-00-...', Array)\\n#10 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Google->fopen('t.txt', 'r')\\n#11 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/availability.php(313): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('t.txt', 'r')\\n#12 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->fopen('t.txt', 'r')\\n#13 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/permissionsmask.php(110): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('t.txt', 'r')\\n#14 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(822): OC\\\\Files\\\\Storage\\\\Wrapper\\\\PermissionsMask->fopen('t.txt', 'r')\\n#15 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(890): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->readFirstBlock('t.txt')\\n#16 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(358): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->getHeader('t.txt')\\n#17 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->fopen('t.txt', 'rb')\\n#18 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('t.txt', 'rb')\\n#19 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(1057): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('t.txt', 'rb')\\n#20 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(905): OC\\\\Files\\\\View->basicOperation('fopen', 'GoogleDrive\\\/t.t...', Array, 'rb')\\n#21 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php(304): OC\\\\Files\\\\View->fopen('GoogleDrive\\\/t.t...', 'rb')\\n#22 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#23 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#24 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#25 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#26 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#27 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#28 \\\/opt\\\/owncloud\\\/remote.php(138): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#29 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":51,\"User\":\"admin\"}","level":4,"time":"2016-03-28T09:13:29+00:00","method":"GET","url":"\/remote.php\/webdav\/GoogleDrive\/t.txt","user":"admin"}
{"reqId":"5KaDisckINAKP17RyPN+","remoteAddr":"HIDDEN_IP","app":"webdav","message":"Exception: {\"Message\":\"Error creating resource: [message] fopen(): SSL operation failed with code 1. OpenSSL Error messages:\\nerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] fopen(): Failed to enable crypto\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] fopen(https:\\\/\\\/doc-0c-5g-docs.googleusercontent.com\\\/docs\\\/securesc\\\/8785kct8nhopg7u900qh2mn2ug44rps8\\\/ec494caku87v75seoakn5gjo4kn011hm\\\/1459152000000\\\/04098952054795273577\\\/04098952054795273577\\\/0B-1F3b2KzGBaa0dtOWFPbVFEZHM?e=download&gd=true): failed to open stream: operation failed\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 406\\n[message] Undefined variable: http_response_header\\n[file] \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Client\\\/StreamHandler.php\\n[line] 407\",\"Exception\":\"GuzzleHttp\\\\Exception\\\\RequestException\",\"Code\":0,\"Trace\":\"#0 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(104): GuzzleHttp\\\\Exception\\\\RequestException::wrapException(Object(GuzzleHttp\\\\Message\\\\Request), Object(GuzzleHttp\\\\Ring\\\\Exception\\\\RingException))\\n#1 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(132): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#2 \\\/opt\\\/owncloud\\\/3rdparty\\\/react\\\/promise\\\/src\\\/FulfilledPromise.php(25): GuzzleHttp\\\\RequestFsm->GuzzleHttp\\\\{closure}(Array)\\n#3 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/ringphp\\\/src\\\/Future\\\/CompletedFutureValue.php(55): React\\\\Promise\\\\FulfilledPromise->then(Object(Closure), NULL, NULL)\\n#4 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Message\\\/FutureResponse.php(43): GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureValue->then(Object(Closure), NULL, NULL)\\n#5 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/RequestFsm.php(135): GuzzleHttp\\\\Message\\\\FutureResponse::proxy(Object(GuzzleHttp\\\\Ring\\\\Future\\\\CompletedFutureArray), Object(Closure))\\n#6 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(165): GuzzleHttp\\\\RequestFsm->__invoke(Object(GuzzleHttp\\\\Transaction))\\n#7 \\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Client.php(125): GuzzleHttp\\\\Client->send(Object(GuzzleHttp\\\\Message\\\\Request))\\n#8 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/http\\\/client\\\/client.php(129): GuzzleHttp\\\\Client->get('https:\\\/\\\/doc-0c-...', Array)\\n#9 \\\/opt\\\/owncloud\\\/apps\\\/files_external\\\/lib\\\/google.php(448): OC\\\\Http\\\\Client\\\\Client->get('https:\\\/\\\/doc-0c-...', Array)\\n#10 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Google->fopen('xUnit Test Patt...', 'r')\\n#11 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/availability.php(313): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('xUnit Test Patt...', 'r')\\n#12 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->fopen('xUnit Test Patt...', 'r')\\n#13 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/permissionsmask.php(110): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('xUnit Test Patt...', 'r')\\n#14 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(822): OC\\\\Files\\\\Storage\\\\Wrapper\\\\PermissionsMask->fopen('xUnit Test Patt...', 'r')\\n#15 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(890): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->readFirstBlock('xUnit Test Patt...')\\n#16 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/encryption.php(358): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->getHeader('xUnit Test Patt...')\\n#17 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->fopen('xUnit Test Patt...', 'rb')\\n#18 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/storage\\\/wrapper\\\/wrapper.php(287): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('xUnit Test Patt...', 'rb')\\n#19 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(1057): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->fopen('xUnit Test Patt...', 'rb')\\n#20 \\\/opt\\\/owncloud\\\/lib\\\/private\\\/files\\\/view.php(905): OC\\\\Files\\\\View->basicOperation('fopen', 'GoogleDrive\\\/xUn...', Array, 'rb')\\n#21 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/connector\\\/sabre\\\/file.php(304): OC\\\\Files\\\\View->fopen('GoogleDrive\\\/xUn...', 'rb')\\n#22 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#23 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#24 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#25 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#26 \\\/opt\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#27 \\\/opt\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(55): Sabre\\\\DAV\\\\Server->exec()\\n#28 \\\/opt\\\/owncloud\\\/remote.php(138): require_once('\\\/opt\\\/owncloud\\\/a...')\\n#29 {main}\",\"File\":\"\\\/opt\\\/owncloud\\\/3rdparty\\\/guzzlehttp\\\/guzzle\\\/src\\\/Exception\\\/RequestException.php\",\"Line\":51,\"User\":\"admin\"}","level":4,"time":"2016-03-28T09:13:29+00:00","method":"GET","url":"\/remote.php\/webdav\/GoogleDrive\/xUnit%20Test%20Patterns.pdf","user":"admin"}

Same problem when uploading a file and trying to download it. 👎

@PVince81
Copy link
Contributor Author

@SergioBertolinSG try again... possibly a GDrive SSL glitch, unrelated to this R. I also got this one once in the past.

@SergioBertolinSG
Copy link
Contributor

Retried:

<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>GuzzleHttp\Exception\RequestException</s:exception>
<s:message>
Error creating resource: [message] fopen(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed [file] /opt/owncloud/3rdparty/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 406 [message] fopen(): Failed to enable crypto [file] /opt/owncloud/3rdparty/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 406 [message] fopen(https://doc-0o-5g-docs.googleusercontent.com/docs/securesc/8785kct8nhopg7u900qh2mn2ug44rps8/b29a9ne10far3bkv1hspamp6pai9cmep/1459332000000/04098952054795273577/04098952054795273577/0B-1F3b2KzGBaYlZVaU9kVnZLYWs?e=download&amp;gd=true): failed to open stream: operation failed [file] /opt/owncloud/3rdparty/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 406 [message] Undefined variable: http_response_header [file] /opt/owncloud/3rdparty/guzzlehttp/ringphp/src/Client/StreamHandler.php [line] 407
</s:message>
</d:error>

Error not being well displayed because of #23500

@LukasReschke
Copy link
Member

@SergioBertolinSG #23660 probably fixes your problem as well.

@PVince81 PVince81 force-pushed the stable9-gdrive-stream-download branch from 4878940 to 99843c0 Compare March 30, 2016 16:43
@SergioBertolinSG
Copy link
Contributor

Yes it did. With web ui I've seen no problem so far. I'll check tomorrow with the desktop client.

@SergioBertolinSG
Copy link
Contributor

This has the same bug as master PR #23517 (comment)

The desktop test worked fine.

@SergioBertolinSG
Copy link
Contributor

👍

1 similar comment
@LukasReschke
Copy link
Member

👍

@DeepDiver1975 DeepDiver1975 merged commit e3cc82d into stable9 Mar 31, 2016
@DeepDiver1975 DeepDiver1975 deleted the stable9-gdrive-stream-download branch March 31, 2016 21:14
@lock
Copy link

lock bot commented Aug 6, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants