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

apiMain/external-storage.feature:52 failed in nightly and needs further investigation #746

Closed
sushmita56 opened this issue Jul 15, 2022 · 17 comments
Assignees
Labels

Comments

@sushmita56
Copy link

sushmita56 commented Jul 15, 2022

The following scenario failed in nightly build at Suite core-apiAll-e-UK-20-3-latest-mysql8.0-php7.3 with internal server error

  Scenario: Copy a file into storage                                                                           # /var/www/owncloud/testrunner/tests/acceptance/features/apiMain/external-storage.feature:52
    Given these users have been created with default attributes and small skeleton files:                      # FeatureContext::theseUsersHaveBeenCreated()
      | username |
      | Alice    |
    And user "Alice" has created folder "/local_storage/foo1"                                                  # FeatureContext::userHasCreatedFolder()
    When user "Alice" copies file "/textfile0.txt" to "/local_storage/foo1/textfile0.txt" using the WebDAV API # FeatureContext::userCopiesFileUsingTheAPI()
    Then the HTTP status code should be "201"                                                                  # FeatureContext::thenTheHTTPStatusCodeShouldBe()
      HTTP status code 500 is not the expected value 201
      Failed asserting that 500 matches expected '201'.
    And as "Alice" file "/local_storage/foo1/textfile0.txt" should exist                                       # FeatureContext::asFileOrFolderShouldExist()
    And as "Alice" file "/textfile0.txt" should exist  
@sushmita56 sushmita56 changed the title Scenario Copy a file into storage failed in nighttly build apiMain/external-storage.feature:52 failed in nightly and needs further investigation Jul 15, 2022
@kiranparajuli589 kiranparajuli589 self-assigned this Jul 15, 2022
@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 15, 2022

Server log during the failure:

{"reqId":"tsLvrUkdQFp4LhxlFskn","level":3,"time":"2022-07-15T02:13:21+00:00","remoteAddr":"192.168.28.9","user":"Alice","app":"PHP","method":"COPY","url":"\/remote.php\/webdav\/textfile0.txt","message":"fclose() expects parameter 1 to be resource, string given at \/var\/www\/owncloud\/server\/lib\/private\/Files\/Storage\/Wrapper\/Encryption.php#818"}
{"reqId":"tsLvrUkdQFp4LhxlFskn","level":4,"time":"2022-07-15T02:13:21+00:00","remoteAddr":"192.168.28.9","user":"Alice","app":"webdav","method":"COPY","url":"\/remote.php\/webdav\/textfile0.txt","message":"Exception: multikeydecrypt with share key failed:error:0E06D06C:configuration file routines:NCONF_get_string:no value: {\"Exception\":\"OCA\\\\Encryption\\\\Exceptions\\\\MultiKeyDecryptException\",\"Message\":\"multikeydecrypt with share key failed:error:0E06D06C:configuration file routines:NCONF_get_string:no value\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/KeyManager.php(418): OCA\\\\Encryption\\\\Crypto\\\\Crypt->multiKeyDecrypt('\\\\xC0?\\\\xCELu\\\\x9F\\\\x1E\\\\xC7\\\\xBFF\\\\xC5\\\\xA1&\\\\xAD\\\\xA9...', '\\\\x13\\\\x0E\\\\x8A\\\\xFBz\\\\x96\\\\xE0-\\\\xCB\\\\xFC\\\\xAD\\\\xF6\\\\xA4C\\\\xFE...', '-----BEGIN PRIV...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Encryption.php(191): OCA\\\\Encryption\\\\KeyManager->getFileKey('\\\/Alice\\\/files\\\/lo...', 'Alice')\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(262): OCA\\\\Encryption\\\\Crypto\\\\Encryption->begin('\\\/Alice\\\/files\\\/lo...', 'Alice', 'w', Array, Array, NULL)\\n#3 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_open('ocencryption:\\\/\\\/', 'w', 0, NULL)\\n#4 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(204): fopen('ocencryption:\\\/\\\/', 'w', false, Resource id #64)\\n#5 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(186): OC\\\\Files\\\\Stream\\\\Encryption::wrapSource(Resource id #63, Resource id #64, 'ocencryption', 'OC\\\\\\\\Files\\\\\\\\Stream...', 'w')\\n#6 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(479): OC\\\\Files\\\\Stream\\\\Encryption::wrap(Resource id #63, 'foo1\\\/textfile0....', '\\\/Alice\\\/files\\\/lo...', Array, 'Alice', Object(OCA\\\\Encryption\\\\Crypto\\\\Encryption), Object(OC\\\\Files\\\\Storage\\\\Local), Object(OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption), Object(OC\\\\Encryption\\\\Util), Object(OC\\\\Encryption\\\\File), 'w', 0, 0, 0, true, NULL)\\n#7 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(811): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->fopen('foo1\\\/textfile0....', 'w')\\n#8 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(686): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyBetweenStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....', false, false)\\n#9 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(565): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#10 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(565): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#11 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/View.php(991): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#12 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(*** sensitive parameters replaced ***)\\n#13 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/View.php(1032): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'copy')\\n#14 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php(249): OC\\\\Files\\\\View->copy('textfile0.txt', 'local_storage\\\/f...')\\n#15 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(655): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->copy('textfile0.txt', 'local_storage\\\/f...')\\n#16 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpCopy(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit('method:COPY', Array)\\n#18 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#19 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(321): Sabre\\\\DAV\\\\Server->start()\\n#20 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(67): Sabre\\\\DAV\\\\Server->exec()\\n#21 \\\/var\\\/www\\\/owncloud\\\/server\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#22 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Crypt.php\",\"Line\":674}"}

https://drone.owncloud.com/owncloud/user_ldap/4031/127/14 L-400

@phil-davis
Copy link
Contributor

Note: this was in a pipeline running with user-key encryption.

@kiranparajuli589
Copy link
Contributor

@phil-davis I'm getting this server log while logging in with a just created user

{
  "reqId": "YtEDjvuDjma3wKUJB1Gw5gAAAAU",
  "level": 3,
  "time": "2022-07-15T06:05:02+00:00",
  "remoteAddr": "::1",
  "user": "uu1",
  "app": "no app in context",
  "method": "POST",
  "url": "/owncloud/core/index.php/login",
  "message": "multikeyencryption failed error:0480006C:PEM routines::no start line"
}

Server-side encryption is enabled with Default encryption module as User Specific Key
content of config php: https://gist.github.com/kiranparajuli589/c41c5056ba046df08419c1a8deca7cde
Is there some configuration mistake with the setup?

@kiranparajuli589
Copy link
Contributor

Note: this was in a pipeline running with user-key encryption.

yes, and with php7.3

@phil-davis
Copy link
Contributor

I wonder if we should spend much time investigating this. I think that I have seen user-key encryption failures like this sometimes in CI. User-key-encryption is a deprecated feature these days.

The log above might be enough for a developer to have a look and see what might go wrong. The various $this->fopen() methods in the code can return a proper handle to the file, or false to indicate a problem. Above where the exception happened, there is no code that checks the fopen() return value, and all the later code assumes that it is an object that is a handle to the file.

I will ping for some developer input.

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 15, 2022

Sure philJi. I've restarted the build to see if it passes on a re-try.
Build running at: https://drone.owncloud.com/owncloud/user_ldap/4034/1/1

@kiranparajuli589 kiranparajuli589 removed their assignment Jul 15, 2022
@kiranparajuli589
Copy link
Contributor

hmm, failed again at the same scenario, same step :(

@phil-davis
Copy link
Contributor

hmm, failed again at the same scenario, same step :(

that's surprising! We will get more nightly runs over the weekend. And there should be a similar pipeline in encryption nightly that runs this with user-key encryption. We can look for that and see the results.

@kiranparajuli589 kiranparajuli589 self-assigned this Jul 15, 2022
@SwikritiT
Copy link
Contributor

hmm, failed again at the same scenario, same step :(

that's surprising! We will get more nightly runs over the weekend. And there should be a similar pipeline in encryption nightly that runs this with user-key encryption. We can look for that and see the results.

Failed in https://drone.owncloud.com/owncloud/user_ldap/4038/127/20 yesterday's nightly too.

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 18, 2022

Failed on today's nightly too. Build: https://drone.owncloud.com/owncloud/user_ldap/4039/127/20

Server Log:

{"reqId":"yC7LoaEnA4zT6gQxvckh","level":3,"time":"2022-07-18T02:14:08+00:00","remoteAddr":"192.168.29.9","user":"Alice","app":"PHP","method":"COPY","url":"\/remote.php\/webdav\/textfile0.txt","message":"fclose() expects parameter 1 to be resource, string given at \/var\/www\/owncloud\/server\/lib\/private\/Files\/Storage\/Wrapper\/Encryption.php#818"}
{"reqId":"yC7LoaEnA4zT6gQxvckh","level":4,"time":"2022-07-18T02:14:08+00:00","remoteAddr":"192.168.29.9","user":"Alice","app":"webdav","method":"COPY","url":"\/remote.php\/webdav\/textfile0.txt","message":"Exception: multikeydecrypt with share key failed:error:0909006C:PEM routines:get_name:no start line: {\"Exception\":\"OCA\\\\Encryption\\\\Exceptions\\\\MultiKeyDecryptException\",\"Message\":\"multikeydecrypt with share key failed:error:0909006C:PEM routines:get_name:no start line\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/KeyManager.php(418): OCA\\\\Encryption\\\\Crypto\\\\Crypt->multiKeyDecrypt(''H\\\\t\\\\xD3\\\\xA2\\\\xFA,.Z\\\\x02\\\\x13\\\\xEF\\\\x19\\\\x01\\\\xCC...', '\\\\xA1h$SF_\\\\xD8\\\\xF7\\\\xEB\\\\xFD \\\\xE7\\\\x80\\\\xFD3...', '-----BEGIN PRIV...')\\n#1 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Encryption.php(191): OCA\\\\Encryption\\\\KeyManager->getFileKey('\\\/Alice\\\/files\\\/lo...', 'Alice')\\n#2 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(262): OCA\\\\Encryption\\\\Crypto\\\\Encryption->begin('\\\/Alice\\\/files\\\/lo...', 'Alice', 'w', Array, Array, NULL)\\n#3 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_open('ocencryption:\\\/\\\/', 'w', 0, NULL)\\n#4 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(204): fopen('ocencryption:\\\/\\\/', 'w', false, Resource id #64)\\n#5 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Stream\\\/Encryption.php(186): OC\\\\Files\\\\Stream\\\\Encryption::wrapSource(Resource id #63, Resource id #64, 'ocencryption', 'OC\\\\\\\\Files\\\\\\\\Stream...', 'w')\\n#6 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(479): OC\\\\Files\\\\Stream\\\\Encryption::wrap(Resource id #63, 'foo1\\\/textfile0....', '\\\/Alice\\\/files\\\/lo...', Array, 'Alice', Object(OCA\\\\Encryption\\\\Crypto\\\\Encryption), Object(OC\\\\Files\\\\Storage\\\\Local), Object(OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption), Object(OC\\\\Encryption\\\\Util), Object(OC\\\\Encryption\\\\File), 'w', 0, 0, 0, true, NULL)\\n#7 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(811): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->fopen('foo1\\\/textfile0....', 'w')\\n#8 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Encryption.php(686): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyBetweenStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....', false, false)\\n#9 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(565): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Encryption->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#10 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(565): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#11 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/View.php(991): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->copyFromStorage(Object(OCA\\\\Files_Trashbin\\\\Storage), 'files\\\/textfile0...', 'foo1\\\/textfile0....')\\n#12 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(50): OC\\\\Files\\\\View->OC\\\\Files\\\\{closure}(*** sensitive parameters replaced ***)\\n#13 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/private\\\/Files\\\/View.php(1032): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'copy')\\n#14 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/ObjectTree.php(249): OC\\\\Files\\\\View->copy('textfile0.txt', 'local_storage\\\/f...')\\n#15 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(655): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\ObjectTree->copy('textfile0.txt', 'local_storage\\\/f...')\\n#16 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpCopy(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#17 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit('method:COPY', Array)\\n#18 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#19 \\\/var\\\/www\\\/owncloud\\\/server\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(321): Sabre\\\\DAV\\\\Server->start()\\n#20 \\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(67): Sabre\\\\DAV\\\\Server->exec()\\n#21 \\\/var\\\/www\\\/owncloud\\\/server\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#22 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/server\\\/apps\\\/encryption\\\/lib\\\/Crypto\\\/Crypt.php\",\"Line\":674}"}

@phil-davis
Copy link
Contributor

OK - then maybe it is a real new failure, which I guess will be related to some recent change merged to core master.
Can someone please try to reproduce this locally?
It will be3 a bit tricky, because it might need LDAP and user-key encryption all happening together.

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 18, 2022

I was trying to reproduce it locally but ran into another problem with encryption.

With these encryption settings:

"encryption": {
            "recoveryKeyId": "recoveryKey_ba14c271",
            "publicShareKeyId": "pubShare_ba14c271",
            "masterKeyId": "master_ba14c271",
            "installed_version": "1.5.2",
            "types": "filesystem",
            "enabled": "yes",
            "userSpecificKey": "1"
        },

Upload is always failing with 503 and log:

{
  "reqId": "YtTfhVxfKAqcWtvdCxnDOAAAAAI",
  "level": 4,
  "time": "2022-07-18T04:20:21+00:00",
  "remoteAddr": "127.0.0.1",
  "user": "Alice",
  "app": "webdav",
  "method": "PUT",
  "url": "/owncloud/core/remote.php/webdav/textfile0.txt",
  "message": "Caused by: {\"Exception\":\"OCA\\\\Encryption\\\\Exceptions\\\\MultiKeyEncryptException\",\"Message\":\"multikeyencryption failed error:0480006C:PEM routines::no start line\",\"Code\":0,\"Trace\":\"#0 \\/home\\/kiran\\/www\\/owncloud\\/core\\/apps-external\\/encryption\\/lib\\/Crypto\\/Encryption.php(293): OCA\\\\Encryption\\\\Crypto\\\\Crypt->multiKeyEncrypt()\\n#1 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/private\\/Files\\/Stream\\/Encryption.php(424): OCA\\\\Encryption\\\\Crypto\\\\Encryption->end()\\n#2 [internal function]: OC\\\\Files\\\\Stream\\\\Encryption->stream_close()\\n#3 \\/home\\/kiran\\/www\\/owncloud\\/core\\/apps\\/files_external\\/3rdparty\\/icewind\\/streams\\/src\\/Wrapper.php(96): fclose()\\n#4 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/private\\/Files\\/Stream\\/Checksum.php(174): Icewind\\\\Streams\\\\Wrapper->stream_close()\\n#5 [internal function]: OC\\\\Files\\\\Stream\\\\Checksum->stream_close()\\n#6 \\/home\\/kiran\\/www\\/owncloud\\/core\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/File.php(209): fclose()\\n#7 \\/home\\/kiran\\/www\\/owncloud\\/core\\/apps\\/dav\\/lib\\/Connector\\/Sabre\\/Directory.php(173): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put()\\n#8 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(1098): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile()\\n#9 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/CorePlugin.php(504): Sabre\\\\DAV\\\\Server->createFile()\\n#10 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/event\\/lib\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\CorePlugin->httpPut()\\n#11 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(472): Sabre\\\\DAV\\\\Server->emit()\\n#12 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#13 \\/home\\/kiran\\/www\\/owncloud\\/core\\/lib\\/composer\\/sabre\\/dav\\/lib\\/DAV\\/Server.php(321): Sabre\\\\DAV\\\\Server->start()\\n#14 \\/home\\/kiran\\/www\\/owncloud\\/core\\/apps\\/dav\\/appinfo\\/v1\\/webdav.php(67): Sabre\\\\DAV\\\\Server->exec()\\n#15 \\/home\\/kiran\\/www\\/owncloud\\/core\\/remote.php(165): require_once('\\/home\\/kiran\\/www...')\\n#16 {main}\",\"File\":\"\\/home\\/kiran\\/www\\/owncloud\\/core\\/apps-external\\/encryption\\/lib\\/Crypto\\/Crypt.php\",\"Line\":738}"
}

I'll try a bit more today.

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 18, 2022

I'll try a bit more today.

Cannot run this locally with 7.3 and encryption. every time I get the same error (as reported above) during upload :(.

@kiranparajuli589
Copy link
Contributor

Failed again at today's nightly: https://drone.owncloud.com/owncloud/user_ldap/4039/127/20

@kiranparajuli589
Copy link
Contributor

kiranparajuli589 commented Jul 19, 2022

Tried locally with:

  • oC core: https://download.owncloud.com/server/stable/owncloud-latest.tar.bz2 & latest master
  • PHP: 7.3 & 7.4
  • Apps: testing, user_ldap, encryption, files_external
  • Apache:
    Server version: Apache/2.4.52 (Ubuntu)
    Server built:   2022-06-14T12:30:21
    
  • Encryption-type: User-Keys

Issue

  • every time a PUT request is sent on the server to upload something, it exits with:
    Request-response info
      ❯ curl -v -XPUT -uadmin:admin http://cloud.owncloud.test/core/remote.php/dav/files/admin/test.txt -d 'something'
      *   Trying 127.0.0.1:80...
      * Connected to cloud.owncloud.test (127.0.0.1) port 80 (#0)
      * Server auth using Basic with user 'admin'
      > PUT /core/remote.php/dav/files/admin/test.txt HTTP/1.1
      > Host: cloud.owncloud.test
      > Authorization: Basic YWRtaW46YWRtaW4=
      > User-Agent: curl/7.81.0
      > Accept: */*
      > Content-Length: 9
      > Content-Type: application/x-www-form-urlencoded
      > 
      * Mark bundle as not supporting multiuse
      < HTTP/1.1 503 Service Unavailable
      < Date: Tue, 19 Jul 2022 07:17:58 GMT
      < Server: Apache/2.4.52 (Ubuntu)
      < X-Content-Type-Options: nosniff
      < X-XSS-Protection: 0
      < X-Robots-Tag: none
      < X-Frame-Options: SAMEORIGIN
      < X-Download-Options: noopen
      < X-Permitted-Cross-Domain-Policies: none
      < Set-Cookie: ocv07flrkkyx=ejeno8gnbsth7osc0qvo0fhpsh; path=/core; HttpOnly; SameSite=Strict
      < Expires: Thu, 19 Nov 1981 08:52:00 GMT
      < Cache-Control: no-store, no-cache, must-revalidate
      < Pragma: no-cache
      < Set-Cookie: oc_sessionPassphrase=%2Bm6n6AJl9E7%2BfQZEdt65Mgaoxr3OZMYHC8ydQHqcK%2B5D4QeKymxF%2BksoXSeLilbron2UniArvx3K45w4KkpNJ4GnTfTyRqwNm47fMZLLgw%2FVMrUf67cLFVhgzuaQLY93; expires=Tue, 19-Jul-2022 07:37:58 GMT; Max-Age=1200; path=/core; HttpOnly; SameSite=Strict
      < Content-Security-Policy: default-src 'none';
      < Set-Cookie: ocv07flrkkyx=hosmmii2l4ffh05huj2j50emv9; path=/core; HttpOnly; SameSite=Strict
      < Set-Cookie: cookie_test=test; expires=Tue, 19-Jul-2022 08:17:58 GMT; Max-Age=3600
      < Content-Length: 292
      < Connection: close
      < Content-Type: application/xml; charset=utf-8
      < 
      
      
        Sabre\DAV\Exception\ServiceUnavailable
        Encryption not ready: multikeyencryption failed error:0480006C:PEM routines::no start line
      
      * Closing connection 0
      
  • Failure with the CI is a bit different. In the CI, there is no problem with uploading. It fails only when some file is being copied into local storage
  • the error message for both case includes problem with multikeyencryption
    cc @phil-davis

@kiranparajuli589
Copy link
Contributor

The issue can be reproduced with this drone yml: https://gist.github.com/kiranparajuli589/f0eb9bcbf4da9043fab7b1804d31a27d
Steps to reproduce:

  1. download the drone yml in your local machine
  2. install the drone cli in your host machine if not already installed
  3. install docker & docker compose in you host machine if not already installed
  4. execute the drone pipeline on your machine as
    drone exec --pipeline core-apiAll-e-UK-latest-mysql8.0-php7.3 /path/to/yml

@kiranparajuli589
Copy link
Contributor

more detailed issue is created here #747

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants