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

Weird problem installing using occ market:install #486

Closed
davitol opened this issue Jun 12, 2019 · 10 comments
Closed

Weird problem installing using occ market:install #486

davitol opened this issue Jun 12, 2019 · 10 comments

Comments

@davitol
Copy link

davitol commented Jun 12, 2019

When you install enterprise tarball using the CLI (occ market:install), the new version of market app is installing under apps-external folder which folder is the writable one in the config.php and the old version is still remaining under apps folder.

After the installation the ownCloud instance is somehow loading old app's js file. If you remove the old app from apps folder, the problem is solved. We need tp nvestigate the behavior of occ market:install' command.

Tested with tarball 10.2 EE complete and spotted here #468 (comment)

@patrickjahns
Copy link
Contributor

@davitol

Can you reliably reproduce this issue ?

@davitol
Copy link
Author

davitol commented Jun 13, 2019

@patrickjahns I think yes, e.g. using tarball 10.2 EE complete tarball and market:install -l market-0.5.0.tar.gz

@davitol davitol added the bug label Jun 20, 2019
@davitol
Copy link
Author

davitol commented Jun 20, 2019

Reproduced continuously, now with activity app. So no matter which app is the one to be updated

@patrickjahns
Copy link
Contributor

I can reproduce this as well.

@davitol
Can you share your config report? Do you have APCU enabled ?

@patrickjahns
Copy link
Contributor

Running into strange issues as well when testing the 0.5 RC app in the docker container

{"reqId":"cSCUrARlrUFvBB3SZTqb","level":3,"time":"2019-06-21T10:43:37+00:00","remoteAddr":"172.17.0.1","user":"admin","app":"index","method":"GET","url":"\/apps\/market\/apps","message":"Exception: {\"Exception\":\"OC\\\\NeedsUpdateException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php(124): OC_App::loadApp('market')\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(894): OC_App::loadApps()\\n#2 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#3 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/app.php\",\"Line\":188}"}

Initial problem related to fetching old javascript might be because of
https://github.com/owncloud/market/blob/master/templates/index.php#L23

Which leads to https://github.com/owncloud/core/blob/master/lib/private/legacy/template/functions.php#L54-L62 and respective https://github.com/owncloud/core/blob/master/lib/private/legacy/util.php#L522

In the container context - the resources should not be loaded from:

  • owncloud/apps/market/market.bundle.js
    but
  • owncloud/custom/market/market.bundle.js

It seems that owncloud would map it accordingly, if the path couldn't be found in the first route. But leads to weird other parts. Wasn't able to dig deeper into yet

@VicDeo
Copy link
Member

VicDeo commented Jun 21, 2019

@davitol the behavior is correct unless apps directory is marked as writable in config.php
if apps is non-writable we can't do anything with apps inside it and app updates should land into the first writable app directory which is apps-external by default.
See the expectations in owncloud/core#35031

The only issue I see here is

After the installation the ownCloud instance is somehow loading old app's js file.

but it's unrelated to market.

@davitol
Copy link
Author

davitol commented Jun 24, 2019

Do you have APCU enabled ?

Can you share your config report? Do you have APCU enabled ?

APCU not enabled

Config report here:

https://cloud.owncloud.com/index.php/s/oWyWK1MUCnd040S

@VicDeo
Copy link
Member

VicDeo commented Jun 24, 2019

Not a bug. see above. 'writable' => false means "nobody can change anything in this app directory".

        "apps_paths": [
            {
                "path": "\/var\/www\/owncloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/owncloud\/custom",
                "url": "\/custom",
                "writable": true
            }

@davitol
Copy link
Author

davitol commented Jun 24, 2019

After the installation the ownCloud instance is somehow loading old app's js file.

So maybe best solution is to open a new ticket in core for tracking this stuff and close this one

@davitol davitol closed this as completed Jun 24, 2019
@davitol
Copy link
Author

davitol commented Jun 24, 2019

New ticket owncloud/core#35640

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

No branches or pull requests

3 participants