[SOLVED] Unable to update Market to 0.2.3 or files_antivirus to 0.11.2

update_issue
marketplace
apps
10

#1

Steps to reproduce

  1. Login to owncloud as admin
  2. Click on Market > Updates
  3. Two Updates shown Market and Antivirus Click on Update Button

Expected behaviour

App should update

Actual behaviour

Get an error in lower right corner:
"app can't be installed because of not allowed code in the app"

Server configuration

Operating system:
Debian 9 "Stretch"
Linux cloud 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux

Web server:
Server version: Apache/2.4.25 (Debian)

Database:
mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

PHP version:
PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.19-1, Copyright (c) 1999-2017, by Zend Technologies

ownCloud version: (see ownCloud admin page)
ownCloud 10.0.3 (stable)

Updated from an older ownCloud or fresh install:
Updated

Where did you install ownCloud from:
Can't remember; been years. Started on owncloud 8.1 (I believe). Most likely distro repos when I was on Debian 8 "Jessie" back in 'nam :wink:

Signing status (ownCloud 9.0 and above):
index.php/settings/integrity/failed
No errors have been found.

The content of config/config.php:

{
    "system": {
        "updatechecker": false,
        "instanceid": "ocsp2z56e9ny",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[Internal IP REDACTED]",
            "[FQDN REDACTED]",
            "www.[FQDN REDACTED]"
        ],
        "datadirectory": "\/media\/sdb1\/data",
        "overwrite.cli.url": "http:\/\/[Internal IP REDACTED]\/owncloud",
        "dbtype": "mysql",
        "version": "10.0.3.3",
        "dbname": "[REDACTED]",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "America\/Denver",
        "logfile": "\/var\/log\/owncloud.log",
        "loglevel": 3,
        "installed": true,
        "maintenance": false,
        "theme": "",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "localhost",
            "port": 6379
        },
        "mail_smtpmode": "smtp",
        "mail_from_address": "cloudadmin",
        "mail_domain": "[REDACTED]",
        "appcodechecker": "false",
        "mail_smtphost": "127.0.0.1",
        "mail_smtpport": "[REDACTED]",
        "mail_smtpauthtype": "LOGIN"
    }
}

List of activated apps:
sudo -u www-data php occ app:list
Enabled:
- activity: 2.3.6
- calendar: 1.5.4
- comments: 0.3.0
- configreport: 0.1.1
- contacts: 1.5.3
- dav: 0.3.0
- federatedfilesharing: 0.3.1
- federation: 0.1.0
- files: 1.5.1
- files_antivirus: 0.10.1.0
- files_external: 0.7.1
- files_pdfviewer: 0.8.2
- files_sharing: 0.10.1
- files_texteditor: 2.2.1
- files_trashbin: 0.9.1
- files_versions: 1.3.0
- files_videoplayer: 0.9.8
- firstrunwizard: 1.1
- gallery: 16.0.2
- market: 0.2.2
- notifications: 0.3.1
- provisioning_api: 0.5.0
- systemtags: 0.3.0
- templateeditor: 0.1
- updatenotification: 0.2.1
Disabled:
- encryption
- external
- registration
- theme-byteknight
- theme-example
- user_external

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

Are you using encryption: yes/no
No

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

Client configuration

Browser:
Firefox ESR 52.5.0 (64 bit)

Operating system:
Qubes 3.2

I'm not going to print out the rest of the logs as I feel they are not relevant to the issue...

The main issue is when I run an app:check-code I get the following...

sudo -u www-data php occ app:check-code files_antivirus

Analysing /var/www/owncloud/apps/files_antivirus/appinfo/preupdate.php
3 errors
line 5: OCP\DB - Static method of deprecated class must not be called
line 8: OCP\DB - Static method of deprecated class must not be called
line 13: OCP\DB - Static method of deprecated class must not be called
Analysing /var/www/owncloud/apps/files_antivirus/lib/item.php
7 errors
line 156: OCP\JSON - Static method of deprecated class must not be called
line 181: OCP\DB - Static method of deprecated class must not be called
line 183: OCP\DB - Static method of deprecated class must not be called
line 185: OCP\DB - Static method of deprecated class must not be called
line 187: OCP\DB - Static method of deprecated class must not be called
line 189: OCP\DB - Static method of deprecated class must not be called
line 190: OCP\DB - Static method of deprecated class must not be called
Analysing /var/www/owncloud/apps/files_antivirus/lib/backgroundscanner.php
1 errors
line 200: OC_Util - Static method of private class must not be called
Deprecated file found: /var/www/owncloud/apps/files_antivirus/appinfo/update.php - please use repair steps
App is not compliant

sudo -u www-data php occ app:check-code market

Analysing /var/www/owncloud/apps/market/lib/Controller/LocalAppsController.php
1 errors
line 46: OC_App - Static method of private class must not be called
Analysing /var/www/owncloud/apps/market/lib/MarketService.php
3 errors
line 94: == - is discouraged
line 281: OC_App - Static method of private class must not be called
line 601: OC_App - Static method of private class must not be called
Analysing /var/www/owncloud/apps/market/lib/Notifier.php
1 errors
line 102: OC_App - Static method of private class must not be called
App is not compliant
======================

I've searched far and wide and have not come across anything that helps.

I have tried putting in appcodechecker => false, in the config.php with no luck.

Conversely my upgrade to 10.0.4.4 fails as well (likely due to this market place issue) so I am stuck on 10.0.3 for now. This is a production system btw so "testing" things and full reinstall are not reasonable solutions.

UPDATE
Figured it out...

Had to remove following line in config.php and restart apache

"appcodechecker": "false",

[SOLVED] Market stopped working after upgrade 10.0.9 --> 10.0.10. Something wrong with certificate?
#2

Maybe delete the app folders and download the apps freshly from https://marketplace.owncloud.com/ ?


#3

Thanks, tried that already. Same outcome...

I also created a new server in non-production environment from scratch and get the same outcome when I check the code. Believe this is a problem with the app(s) itself. I would contact the developer, but the dev is listed as "owncloud" so hope this is posted in the right location.

pwd
/var/www/html/owncloud/apps/files_antivirus
root@cloud:/var/www/html/owncloud/apps/files_antivirus# less ./appinfo/info.xml | grep version
0.11.2 <<<--------Latest version in brand new build...

Note: Install from admin web page never worked, had to install manually using method here:
https://doc.owncloud.org/server/10.0/admin_manual/installation/apps_management_installation.html
To install an app manually (locally), instead of by using the Appstore, copy the app into the ownCloud app folder (/path/to/owncloud/apps). The folder name of the app and the name of the app must be identical.
Command used: git clone https://github.com/owncloud/files_antivirus.git

Not just this app btw, all apps do not install using the Market page from admin login on a brand new build. I shouldn't have to install all the apps manually using git or similar... When I click on the Install button it simply spins, shows "Loading" then returns to the blue Install button. No errors are returned. Checked my firewall and nothing is getting blocked going in or out.

=================
date;sudo -u www-data php occ app:check-code files_antivirus
Sun Dec 10 15:53:09 MST 2017
Analysing /var/www/html/owncloud/apps/files_antivirus/lib/BackgroundScanner.php
1 errors
line 200: OC_Util - Static method of private class must not be called
Analysing /var/www/html/owncloud/apps/files_antivirus/lib/Item.php
7 errors
line 156: OCP\JSON - Static method of deprecated class must not be called
line 181: OCP\DB - Static method of deprecated class must not be called
line 183: OCP\DB - Static method of deprecated class must not be called
line 185: OCP\DB - Static method of deprecated class must not be called
line 187: OCP\DB - Static method of deprecated class must not be called
line 189: OCP\DB - Static method of deprecated class must not be called
line 190: OCP\DB - Static method of deprecated class must not be called
Analysing /var/www/html/owncloud/apps/files_antivirus/appinfo/preupdate.php
3 errors
line 5: OCP\DB - Static method of deprecated class must not be called
line 8: OCP\DB - Static method of deprecated class must not be called
line 13: OCP\DB - Static method of deprecated class must not be called
Deprecated file found: /var/www/html/owncloud/apps/files_antivirus/appinfo/update.php - please use repair steps
App is not compliant
====================


#4

Had the same problem. Update of Owncloud from 10.0.3 to 10.0.4 solved that problem. After Update all market app were updated also!


#5

Thank you for the reply, but as I already stated in my original post, I cannot update to 10.0.4 because it gives me errors about updating the market. Furthermore, when I created a brand new install with 10.0.4 I am still experiencing similar error with code-check of the app. Therefore, I do not believe an upgrade will solve this, nor is it even feasible as the upgrade failed.


#6

WORKAROUND ("mostly" working now) putting this here for posterity...

So I installed owncloud from scratch on a new server. Careful to follow all instructions found here.
Verified I could install apps from marketplace, etc. Everything checked out

Tar and zipped owncloud directory

cd /var/www/html/owncloud
tar -zcvf owncloud.tar.gz owncloud
==========

Moved zip over to production server

sftp user@10.X.X.X
get owncloud.tar.gz
==========

Backed up current owncloud directory

service apache2 stop
cd /var/www
mv owncloud owncloud_bkp
==========

Unzipped tar from other server

tar -zxvf owncloud.tar.gz
cp owncloud_bkp/config/config.php owncloud/config/
service apache2 start

Went to webpage, saw it needed to update to 10.4 (most likely because I forgot to change the version in my config.php)so I clicked the Upgrade button.
Upgrade was complete, successfully updated schema in database.

Logged in and went to marketplace...got this error:
"No marketplace connection: cURL error 77: error setting certificate verify locations: CAfile: /media/data/files_external/rootcerts.crt CApath: /etc/ssl/certs"

Researched a bit and decided to move the rootcerts.crt in the data/files_external and restart apache based on Internet search findings...

cd /media/sdb1/data/files_external
mv rootcerts.crt rootcerts.crt.orig
service apache2 restart
(rootcerts.crt wasn't generated right away)

Had to login to owncloud webpage as admin, go to Market and it came up no error displayed. rootcerts.crt was re-created but missing a lot of data from the previous one.

Now, I'm getting same issue I got last time I installed from scratch...

When I click on ANY app to install it doesn't do anything...just changes the 'Install' button to 'Loading' then returns back to the Blue 'Install' button.

No errors, so I checked the log and see this message:
{"reqId":"d64aBJBMyKoxobnzbaKt","level":3,"time":"2017-12-10T21:49:17-07:00","remoteAddr":"[Default Gateway IP ADDRESS]","user":"[USERNAME]","app":"PHP","method":"POST","url":"\/owncloud\/index.php\/apps\/market\/apps\/rainloop\/install","message":"Class 'OC\CodeChecker' not found at \/var\/www\/owncloud\/lib\/private\/Installer.php#587"}

Anyone smarter than me know how to install that "Class" that appears to be missing?

Fixed the OC\CodeChecker error by removing following line from config.php file
"appcodechecker": "false",