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

User trapped in app management screen #23482

Closed
nickvergessen opened this issue Mar 22, 2016 · 9 comments · Fixed by #23487
Closed

User trapped in app management screen #23482

nickvergessen opened this issue Mar 22, 2016 · 9 comments · Fixed by #23487

Comments

@nickvergessen
Copy link
Contributor

Steps to reproduce

  1. Open app management index.php/settings/apps
  2. Try to click the cloud, or any app menu, or browser bookmark to switch the page

Expected behaviour

The page should load

Actual behaviour

App management reloads

Server configuration

Operating system: Linux Mint 17.3

PHP version: php 5.5.32

ownCloud version: master

Updated from an older ownCloud or fresh install: fresh

Where did you install ownCloud from: git

List of activated apps:

Enabled:
  - activity: 2.3.0
  - announcementcenter: 1.2.0
  - comments: 0.3.0
  - dav: 0.2.2
  - federatedfilesharing: 0.2.0
  - files: 1.5.1
  - files_sharing: 0.10.0
  - files_texteditor: 2.1
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.0
  - workflow: 0.2.0

The content of config/config.php:

{
    "system": {
        "debug": true,
        "trusted_domains": [
            "localhost",
            "owncloudmaster.local"
        ],
        "apps_paths": {
            "0": {
                "path": "\/home\/nickv\/ownCloud\/master\/core\/apps",
                "url": "\/apps",
                "writable": false
            },
            "1": {
                "path": "\/home\/nickv\/ownCloud\/master\/noapps",
                "url": "\/..\/noapps",
                "writable": true
            }
        },
        "loglevel": 1,
        "logtimezone": "UTC",
        "log_rotate_size": 52428,
        "appstore.experimental.enabled": true,
        "appstoreenabled": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "9.1.0.0",
        "dbname": "oc_temp",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "ocz6xyesfky4",
        "maintenance": false
    }
}

Are you using external storage, if yes which one: local

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Firefox 45

Operating system: Linux Mint 17.3

Logs

Web server error log

--- empty ---

ownCloud log (data/owncloud.log)

--- empty ---

Browser log

Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
Content Security Policy: Die Einstellungen der Seite haben das Laden einer Ressource auf self blockiert ("script-src http://localhost 'unsafe-eval'"). apps
Deprecation warning: tipsy is deprecated. Use tooltip instead. js.js:2183:2

@schiesbn can reproduce this as well on Iceweasle/Firefox 44

@nickvergessen nickvergessen modified the milestones: 9.1-current, 9.0.1-current-maintenance Mar 22, 2016
@PVince81 PVince81 self-assigned this Mar 22, 2016
@oparoz
Copy link
Contributor

oparoz commented Mar 22, 2016

Probably related to #23178

@nickvergessen
Copy link
Contributor Author

Works after reverting #16783

@PVince81
Copy link
Contributor

Commenting out the global ajax error handler makes the problem disappear: https://github.com/owncloud/core/blob/v9.0.0/core/js/js.js#L1441

I suspect that when leaving the page, the ajax call might be receiving an error.

@PVince81
Copy link
Contributor

Looks like we get statusCode 0 and statusText "error" in the global handler when the user navigates away while ajax calls are running.

That code is responsible for detecting either a 401 error or a cross-domain redirect caused by SSO token timeout. Problem is, that one also returns a status code of 0.

@PVince81
Copy link
Contributor

Just tested with a cross-domain redirect, and it also returns "0" and "error" 😦
This will be tricky to detect.

@PVince81
Copy link
Contributor

@PVince81
Copy link
Contributor

That's a real nightmare... also need to detect whether an app is using "beforeunload" and the dialog pops up, and detect whether the user cancelled navigating away, and then reset the flag.
The horror: http://stackoverflow.com/a/25765797

Doesn't work very well... I'll just put a higher timeout value.

@PVince81
Copy link
Contributor

Fix is here: #23487
Protect your eyes, there are some horrors in there (with explanations inline)

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants