Skip to content

Can't install apps in OC 8.0.2 #14840

Closed
Closed

Description

@agherzan

Steps to reproduce

  1. apps
  2. install contacts

Expected behaviour

Should install app

Actual behaviour

App does not provide an info.xml file

Server configuration

Fedora21

Web server:
apache

Database:
mysql

PHP version:

ownCloud version: (see ownCloud admin page)
8.0.2

Updated from an older ownCloud or fresh install:
7.0.X

List of activated apps:
nothing/defaults

The content of config/config.php:

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

run: sqlite3 data/owncloud.db
then execute:  select * from oc_appconfig where appid='user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:
chrome

Operating system:
win/fedora21

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

{"reqId":"6904790b403e371bf4085202f73bc485","remoteAddr":"130.226.142.243","app":"PHP","message":"ZipArchive::extractTo(): Invalid or uninitialized Zip object at \/var\/www\/html\/owncloud\/lib\/private\/archive\/zip.php#135","level":3,"time":"2015-03-12T18:15:28+00:00"}
{"reqId":"6904790b403e371bf4085202f73bc485","remoteAddr":"130.226.142.243","app":"core","message":"App does not provide an info.xml file","level":3,"time":"2015-03-12T18:15:28+00:00"}

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...

Activity

  1. LukasReschke commented on Mar 12, 2015

    @LukasReschke
    Contributor

    Do you have the PHP cURL extension installed?

  2. agherzan commented on Mar 12, 2015

    @agherzan
    Author

    Yes:
    ; Enable curl extension module
    extension=curl.so

  3. kneiser commented on Mar 12, 2015

    @kneiser

    I am having the same issue here is what I have in my owncloud log:
    Error core App does not provide an info.xml file 2015-03-12T18:27:14+00:00
    Error PHP ZipArchive::extractTo(): Invalid or uninitialized Zip object at /var/www/html/owncloud/lib/private/archive/zip.php#135 2015-03-12T18:27:14+00:00
    Error core App does not provide an info.xml file

    Any apps in "Recommended that I try to enable display this error. Yes I have curl installed.

  4. StephanMeijer commented on Mar 12, 2015

    @StephanMeijer

    Same issue here, cURL installed as well.

  5. R1tschY commented on Mar 12, 2015

    @R1tschY

    Same here. I investigated: In https://github.com/owncloud/core/blob/master/lib/private/installer.php#L247:

    \OC_Util::getUrlContent($data['href']) returns:

     <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>400 Bad Request</title> </head><body> <h1>Bad Request</h1> <p>Your browser sent a request that this server could not understand.<br /> </p> </body></html> 
    

    $data['href'] is for example: http://apps.owncloud.com/CONTENT/content-files/168711-documents.zip

    Get file with wget from server is working. It redirects to https://apps.owncloud.com/CONTENT/content-files/168711-documents.zip

  6. added this to the milestone on Mar 12, 2015
  7. DeepDiver1975 commented on Mar 12, 2015

    @DeepDiver1975
    Contributor

    @R1tschY thanks - this is actually pretty helpful. Looks like the http->https redirect is not working on your installation.

  8. karlitschek commented on Mar 12, 2015

    @karlitschek
    Contributor

    @R1tschY Can you try again please? I think we just fixed a bug there.

  9. DeepDiver1975 commented on Mar 12, 2015

    @DeepDiver1975
    Contributor

    Adding curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); in https://github.com/owncloud/core/blob/master/lib/private/httphelper.php#L73 solved it for me.

    @LukasReschke @karlitschek something wrong again with our ssl cert? 🙊

  10. LukasReschke commented on Mar 12, 2015

    @LukasReschke
    Contributor

    SSL setup looks good to me. Best bet: @R1tschY is using a distribution that ships an outdated or none certificate bundle at all.

    In my opinion it's the administrators' task to ensure that the cURL certificate bundle is properly configured. It's not like you would expect an usual desktop software to come with all certificates on their own.

    That said, as there really seem to be a lot of distributions and people doing it wrong a possibility for us would be to make the HTTPHelper use a bundled set of all root certificates. However, this obviously requires us to keep track of the newest bundles 🙈

    I can take a look tomorrow…

  11. karlitschek commented on Mar 12, 2015

    @karlitschek
    Contributor

    Just to be clear. What I fixed is that the app store returns an https download url now.

  12. R1tschY commented on Mar 12, 2015

    @R1tschY

    It is very mysterious. I used following php script on the server:

    <?php
    
    $curl = curl_init();
    
    curl_setopt($curl, CURLOPT_HEADER, 0);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10);
    curl_setopt($curl, CURLOPT_URL, 'https://apps.owncloud.com/CONTENT/content-files/168711-documents.zip');
    curl_setopt($curl, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
    curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
    
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($curl, CURLOPT_MAXREDIRS, 10);
    curl_exec($curl);
    echo curl_getinfo($curl, CURLINFO_HTTP_CODE);
    

    It prints the status code 200 (OK) and not the status code 400 (Bad Request). @LukasReschke local curl installation seems good. What does owncloud different?

    Before downloading the app, owncloud for example requests https://api.owncloud.com/v1/content/download/168711/1 with status code 200. Okay, https requests to api.owncloud.com are working.

    Sometimes the view with recommended apps is blank: Calls to for example https://api.owncloud.com/v1/content/data/166043 fails with status code 400. Error messages in log: Trying to get property of non-object at /var/www/virtual/captian7/html/o6d/lib/private/ocsclient.php#180 two times and Invalid OCS content returned for app 166043. I don't known for what reason it fails sometimes with status code 400. But https://apps.owncloud.com/CONTENT/content-files/168711-documents.zip always gets status code 400 from within owncloud (besides curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); is used).

  13. LukasReschke commented on Mar 13, 2015

    @LukasReschke
    Contributor

    @R1tschY If you add curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true); does it work then with your test script? – Also what setup is that? Which distribution / PHP version? Would be probably easier if I fire up a VM with the same settings.

  14. 20 remaining items

  15. removed this from the milestone on Mar 30, 2015
  16. DeepDiver1975 commented on Mar 30, 2015

    @DeepDiver1975
    Contributor

    Oh ... no ... this is for 8.0.3.

    in this case we cannot - in case the issue is still popping up for our users running 8.0 - customer patching is required - #14840 (comment)

    closing therefore

  17. davidtacheny commented on Mar 31, 2015

    @davidtacheny

    Yup this worked for me: New Install, CentOS 7, with https redirect:
    Adding curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); in https://github.com/owncloud/core/blob/master/lib/private/httphelper.php#L73 solved it for me.

  18. nhymxu commented on Apr 10, 2015

    @nhymxu
  19. tomck commented on Apr 20, 2015

    @tomck

    Just wanted to confirm that the solution @nhymxu posted above worked for me, and I'm using CentOS 6.6 with the php54w item from the webtatic repo. File is /var/www/html/owncloud/lib/private/httphelper.php for those who arrive via Google.

  20. nexflo commented on May 7, 2015

    @nexflo

    @DeepDiver1975
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    also fixed it for me on CentOS 6.6

  21. ConsciousUniverse commented on May 26, 2015

    @ConsciousUniverse

    Ditto; adding curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false) to /[installation_root]/lib/private/httphelper.php is a workaround on
    ownCloud 8.0.3 (stable), CentOS 7.1.1503, PHP 5.4.16, curl 7.29.0, Nginx 1.8.0

  22. jolorant commented on Jun 9, 2015

    @jolorant

    Turning off certificate validation will break the code validity chain. That's not a solution and people should not insert the line into the code running on their servers.

  23. jolorant commented on Jun 9, 2015

    @jolorant

    owncloud should also switch from returning a non-verifiable HTTP URL to the apps repository to an HTTPS URL that can be verified without redirection. That would solve this problem correctly.

  24. jbnance commented on Jun 28, 2015

    @jbnance

    There is something more going on here. I'm also using CentOS 7 with the stock PHP 5.4.16. I have installed the GoDaddy root certificates and validated that they are being used, but the same errors are being spit out:

    Error core App does not provide an info.xml
    Error PHP ZipArchive::extractTo(): Invalid or uninitialized Zip object at /var/www/html/owncloud/lib/private/archive/zip.php#135
    Error core App does not provide an info.xml file
    

    Disabling certificate validation is not the way. You've made a great product, but do you really want people to think that you solve issues by making your product less secure? If you feel the issue is that CentOS / RHEL isn't shipping a recent enough set of CA provide the steps for for augmenting those. But I'm here to tell you that isn't the problem.

    BTW, here's the way to add the GoDaddy certificates to EL7:

    From https://certs.godaddy.com/repository, download:

    gdig2.crt
    gdroot-g2.crt
    

    Place those files in:

    /etc/pki/ca-trust/source/anchors/
    

    Execute the following:

    # update-ca-trust extract
    

    Restart Apache:

    # systemctl restart httpd
    

    As I said, however, this doesn't solve the problem. I'm more than happy to help debug this further but need your instructions.

  25. locked as resolved and limited conversation to collaborators on Aug 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions