Fatal error when \OC\Files\Filesystem::resolvePath does not return a storage object.
This PHP error appear during file cache update, and it break the cache update:
Mar 15 11:02:06 php5 www: PHP Fatal error: Call to a member function getId() on a non-object in /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php on line 121 Mar 15 11:02:06 php5 www: PHP Stack trace: Mar 15 11:02:06 php5 www: PHP 1. {main}() /opt/owncloud/cloud.biapy.fr/index.php:0 Mar 15 11:02:06 php5 www: PHP 2. OC::handleRequest() /opt/owncloud/cloud.biapy.fr/index.php:28 Mar 15 11:02:06 php5 www: PHP 3. OC_Router->match() /opt/owncloud/cloud.biapy.fr/lib/base.php:606 Mar 15 11:02:06 php5 www: PHP 4. call_user_func() /opt/owncloud/cloud.biapy.fr/lib/router.php:127 Mar 15 11:02:06 php5 www: PHP 5. OC::loadAppScriptFile() /opt/owncloud/cloud.biapy.fr/lib/router.php:127 Mar 15 11:02:06 php5 www: PHP 6. require_once() /opt/owncloud/cloud.biapy.fr/lib/base.php:672 Mar 15 11:02:06 php5 www: PHP 7. OC\Files\Cache\Upgrade->upgradePath() /var/lib/owncloud/cloud.biapy.fr/apps/files/ajax/upgrade.php:17 Mar 15 11:02:06 php5 www: PHP 8. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:44 Mar 15 11:02:06 php5 www: PHP 9. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 10. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 11. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 12. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 13. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 14. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 15. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 16. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 17. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 18. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 19. OC\Files\Cache\Upgrade->upgradeChilds() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:58 Mar 15 11:02:06 php5 www: PHP 20. OC\Files\Cache\Upgrade->getNewData() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:54 Mar 15 11:02:06 php5 www: PHP 21. OC\Files\Cache\Upgrade->getNumericId() /opt/owncloud/cloud.biapy.fr/lib/files/cache/upgrade.php:105
I'm investigating the trigger conditions.
@icewind1991
This totally stops owncloud from working. I'm using nginx in front of it, and the "trick" in https://github.com/owncloud/core/issues/2300#issuecomment-14950005 does not work.
Same problem here, with Fedora 17 and apache.
debian squeeze/apache/mysql
upgrade from 4.5.7 to 5.0
first got maintenance mode...
which when turned to false in config.php leads to ...
"upgrading filesystem cache" for files
stops permanently on this screen.
log shows... Error core storage backend \OC\Files\Storage\Archive not found March 16, 2013 18:17 Error core storage backend \OC\Files\Storage\Archive not found March 16, 2013 18:17 Error core storage backend \OC\Files\Storage\Archive not found March 16, 2013 18:17 Error core storage backend \OC\Files\Storage\Archive not found March 16, 2013 18:17 Fatal PHP Call to a member function getId() on a non-object at /var/www/clients/client4/web23/web/lib/files/cache/upgrade.php#121 ...etc
Any further info which might help just send me a message and I'll be glad to supply whatever needed to help diagnose this.
Cheers.
Do you have external storage mounted?
Can you investigate what path is not returning a storage object. It appears from your backtrace that the file cache was properly upgraded for a few paths.
MTGap, Hi, I have no external storage mounted if that is relevant, but I think you were asking the original poster? Thomas
@MTGap,
no, i've got no external storage mounted. My server is divided in / and /var partitions, but it is all. I have not been able to reproduce the error and determine witch file trigger the problem.
I can confirm that disabling the Archive application fix the cache update problem.
Hot damn, disabled archive app as suggested in previous comment and the upgrade completed. I am now seeing what re-enabling archive does. Thanks.
Cheers.
Thanks guys, I'm testing the upgrade now with archive enabled.
Update: I can reproduce this.
Well it is failing because files_archive was not packaged with ownCloud 5 and so the old app is still on your instances and breaking your upgrades.
@karlitschek Why wasn't it packaged?
I have got the same problem - I reinstalled files_archive from a backup, tried to enable and disable it again, deleted the files_archive folder from the apps-folder - Nothing happened. The problem still exists.
The upgrade.php file in Pull Request #2383 doesn't work either. The problem is away, sure; but I can't see me files....
Edit: The error says that I don't have write permissions...
@TeGuy Notice #2383 said error handling, not fix.
Sounds like you have a different issue then this, maybe #2086
the upgrade to php5 worked fine, even with the original upgrade.php
If you are using Ubuntu 10.04 LTS you have to upgrade php5 - this is really weak for owncloud....
MTGap, Thanks mate. Cheers.
@MTGap We have ongoing quality problems and bugs with files_archive so we decided to go without it for now. The normal way to update is to replace ownCloud but keep only config and data so an old version should be removed. And even if the old files_archive is still there then ownCloud should disable it during upgrade automatically. At least in theory. If this is the problem here then we have to build a workaround somehow for 5.0.1 Any ideas?
Once again: There seems to be two different bugs with the same error: On the one hand an activated old files_archive-module - on the other hand the problem with PHP 5.3 on Ubuntu 10.04 LTS
@TeGuy The Ubuntu 10.04 issue was discussed over here #2310
@karlitschek The app version compatibility check was changed just recently #1903 #1888 I think we only have minimum version checking right now. Quick fix is shipping a changed app.php file with a bogus version for required.
"Ubuntu 10.04" is incorrect. I have the same problem on 12.04:
"PHP Fatal error: Call to a member function getId() on a non-object in ..."
I have read tons of googlets but couldn't find a solution. What to do?