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 admin page fails to load properly after upgrade to oc 9.0.2 #24734

Closed
brtptrs opened this issue May 19, 2016 · 25 comments
Closed

User admin page fails to load properly after upgrade to oc 9.0.2 #24734

brtptrs opened this issue May 19, 2016 · 25 comments

Comments

@brtptrs
Copy link

brtptrs commented May 19, 2016

Steps to reproduce

  1. Call user admin page ../settings/users

Expected behaviour

List of users get loaded

Actual behaviour

The page takes minutes to load, and often does not load at all, ending with a js error
"Ein Skript auf dieser Seite ist eventuell beschäftigt oder es antwortet nicht mehr. Sie können das Skript jetzt stoppen, im Debugger öffnen oder weiter ausführen."

Using the ajax search box shows the same behaviour.

Server configuration

Operating system:CentOS

**Web server:**Apache

**Database:**MySQL

**PHP version:**5.6

ownCloud version: OC EE 9.0.2

Updated from an older ownCloud or fresh install: Update from EE 8.2

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

"No errors have been found."

List of activated apps:
Activity
Antivirus App for files
Comments
Deleted files
Enterprise license key
External Sites
External storage support
Federation
File firewall
First Run Wizard
Gallery
Log user and file sharing actions
Mail Template Editor
Notifications
Provisioning API
Share Files
Text Editor
Update notification
Versions
Workflow
Announcement Center

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

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

Are you using encryption: No

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

Client configuration

Browser: Firefox 46 or Chrome 50

Operating system: Ubuntu Linux 15.10

Logs

Web server error log

No errors

ownCloud log (data/owncloud.log)

no erors

Browser log

Insert your browser log here, this could for example include:
ReferenceError: reference to undefined property e.result jquery.min.js:5:16475
ReferenceError: reference to undefined property e.result jquery.min.js:5:14264
Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead jquery.min.js:1:0
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:9730
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:9939
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:9949
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:11225
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:13049
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:14344
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:14901
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:14939
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:15886
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:17980
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:18244
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:18392
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:19440
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:21800
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:21893
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:21953
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:23192
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:23769
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:4:23883
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:4576
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:4994
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:5396
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:7439
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:31638
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:5:31765
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:6:9615
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:6:11691
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:6:13584
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:6:19460
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.min.js:6:20316
ReferenceError: reference to undefined property d.attributes[c].expando jquery.min.js:4:30145
ReferenceError: reference to undefined property e.selector jquery.min.js:4:1634
ReferenceError: reference to undefined property jQuery.migrateMute jquery-migrate.min.js:2:1
ReferenceError: reference to undefined property e.migrateTrace jquery-migrate.min.js:2:565
ReferenceError: reference to undefined property s[n] jquery.min.js:6:3773
ReferenceError: reference to undefined property e[s] jquery.min.js:5:144
ReferenceError: reference to undefined property target[key] jquery-ui.custom.js:460:6
ReferenceError: reference to undefined property p.delegateType jquery.min.js:5:11036
ReferenceError: reference to undefined property $.uiBackCompat jquery-ui.custom.js:9499:1
ReferenceError: reference to undefined property obj[key] underscore.js:127:28
ReferenceError: assignment to undeclared variable dav client.js:1:34
TypeError: variable vars redeclares argument js.js:155:7
ReferenceError: reference to undefined property this._bundles[appName] l10n.js:70:1
TypeError: variable vars redeclares argument octemplate.js:97:6
ReferenceError: reference to undefined property obj[key] underscore.js:108:15
SyntaxError: test for equality (==) mistyped as assignment (=)? jquery.colorbox.js:687:39
SyntaxError: test for equality (==) mistyped as assignment (=)? users.js:210:47
ReferenceError: reference to undefined property locales[name] moment-with-locales.js:264:9
ReferenceError: reference to undefined property names[(i + 1)] moment-with-locales.js:233:13
ReferenceError: reference to undefined property x.event.triggered jquery.min.js:5:12498
ReferenceError: reference to undefined property p.cache jquery.min.js:6:12873
ReferenceError: reference to undefined property x.event.triggered jquery.min.js:5:10803
ReferenceError: reference to undefined property e[x.expando] jquery.min.js:5:1087
ReferenceError: reference to undefined property o.type jquery.min.js:5:6183
ReferenceError: reference to undefined property x.ajaxSettings.traditional jquery.min.js:6:8020
ReferenceError: assignment to undeclared variable GroupDeleteHandler groups.js:272:24
ReferenceError: reference to undefined property u.opts.start jquery.min.js:6:20348
ReferenceError: reference to undefined property u.disabled jquery.min.js:5:14426
ReferenceError: reference to undefined property e[C.status] jquery.min.js:6:12045
ReferenceError: reference to undefined property x[(len >> 5)] md5.js:67:9
ReferenceError: reference to undefined property padded[2] moment-with-locales.js:431:33
ReferenceError: reference to undefined property UserList.isEmpty users.js:177:1
ReferenceError: reference to undefined property output[(i >> 5)] md5.js:182:13
ReferenceError: reference to undefined property e.returnValue jquery.min.js:5:17033
getPreventDefault() sollte nicht mehr verwendet werden. Verwenden Sie stattdessen defaultPrevented. jquery.min.js:5:17117
Error: Script terminated by timeout at:
.buildFragment@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:5:31631
.parseHTML@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:4286
e.fn.init@https://xxxxxxxxxx/core/vendor/jquery-migrate/jquery-migrate.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:2:2820
x@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:225
UserList.add/<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:107:27
.each@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:5345
UserList.add@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:104:3
UserList.update/</<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:418:16
.each@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:5345
UserList.update/<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:414:5
x.Callbacks/c@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:26031
x.Callbacks/p.fireWith@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:26840
k@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:6:14256
.send/r@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:6:18646
 jquery.min.js:5:31631
TypeError: this.sink is null network-monitor.js:277:5

@PVince81
Copy link
Contributor

Important info from the other ticket, reposting:

This does not seem to be related to the number of groups only. We have this problem although we have 330 users in only 5 groups.
Everything worked fine on OC 8.x enterprise
After upgrading to 9.0.2 EE the user admin page can not be used any more.

Now with only 5 groups the page shouldn't be that slow. With 330 users, the ajax call should only load the first 20 users. So far I don't see what could be causing the JS code to slow down.

@PVince81
Copy link
Contributor

I see the JS stack trace about adding users, let's check the code to find more clues:

.buildFragment@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:5:31631
.parseHTML@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:4286
e.fn.init@https://xxxxxxxxxx/core/vendor/jquery-migrate/jquery-migrate.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:2:2820
x@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:225
UserList.add/<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:107:27
.each@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:5345
UserList.add@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:104:3
UserList.update/</<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:418:16
.each@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:5345
UserList.update/<@https://xxxxxxxxxx/settings/js/users/users.js?v=0ca4514e0bfd81dd11f45309c85251a0:414:5
x.Callbacks/c@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:26031
x.Callbacks/p.fireWith@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:4:26840
k@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:6:14256
.send/r@https://xxxxxxxxxx/core/vendor/jquery/jquery.min.js?v=0ca4514e0bfd81dd11f45309c85251a0:6:18646
 jquery.min.js:5:3163

It is unlikely to be due to slow ajax because then there wouldn't be a JS timeout.
It seems there is something that makes the JS code take longer than necessary.

@PVince81 PVince81 added this to the 9.0.3-current-maintenance milestone May 20, 2016
@PVince81
Copy link
Contributor

Interesting, the stack above points at the code that renders the subadmin groups dropdown.

@pako81 are there special characters in group names ? Are there many subadmins ? Trying to find out the relationship between users/groups/subadmins. Maybe a screenshot from when the page loaded could help from the rare times where the page does load properly (share privately on S3 in case of confidential info, I do want to have a look at the group names too for clues).

@PVince81
Copy link
Contributor

I did the following test locally:

  • created 350 users "user1...user5"
  • created 5 groups "group1...group5"
  • assigned the groups to some users
  • set some users as subadmin of one or multiple groups

It looks like now in 9.0.2 the page loads 300 entries at once instead of 20, maybe because people complained about the pagination being too small. On my env it takes 4-5 seconds to render the page in Firefox, I'm not getting any JS timeouts.

I do notice that there are a few seconds where the spinner stops moving, which is usually a sign of JS code blocking the browser.

@PVince81
Copy link
Contributor

Quick workaround: edit https://github.com/owncloud/core/blob/v9.0.2/settings/js/users/users.js#L17 and set the value to a smaller one like 50 or 100.

Still, I find that the fact that it's taking minutes for JS suspicious, maybe there are some extra processing triggered by a specific configuration/combination of groups.

@pako81
Copy link
Contributor

pako81 commented May 20, 2016

@pako81 are there special characters in group names ? Are there many subadmins ? Trying to find
out the relationship between users/groups/subadmins. Maybe a screenshot from when the page
loaded could help from the rare times where the page does load properly (share privately on S3 in
case of confidential info, I do want to have a look at the group names too for clues).

@PVince81 not sure. @brtptrs could you please comment here ? You could also send the screenshot from when the page loaded to my personal email (in case of confidential info) and I will take care to upload it to S3.

Quick workaround: edit https://github.com/owncloud/core/blob/v9.0.2/settings/js/users/users.js#L17 > and set the value to a smaller one like 50 or 100.

@brtptrs could you also try the suggested workaround and see if this helps in speeding up the loading of the page ?

@pako81
Copy link
Contributor

pako81 commented May 20, 2016

It looks like now in 9.0.2 the page loads 300 entries at once instead of 20, maybe because people
complained about the pagination being too small. On my env it takes 4-5 seconds to render the page > in Firefox, I'm not getting any JS timeouts.

@PVince81 yes, did the same test yesterday in 9.0.2 with more than 300 users and they were all displayed at once. I was however not able to find the PR where we changed the pagination settings..
Also for me it took a couple of seconds to render the page in comparison to 8.2.x where it was almost instantaneous

@PVince81
Copy link
Contributor

@pako81 here is the PR by @butonic that changed the minimum value: #20108

@pako81
Copy link
Contributor

pako81 commented May 20, 2016

ah ok :)

@PVince81
Copy link
Contributor

Note: that change is only in 9.0. The backport was denied due to other perf regressions in 8.2 due to avatars and other stuff.

@brtptrs
Copy link
Author

brtptrs commented May 20, 2016

@PVince81 Yes, there are special characters all over the place, is't German, but no subadmins. I'll try the workaround and report back.

@brtptrs
Copy link
Author

brtptrs commented May 20, 2016

@PVince81 the workaround solves the problem for me. Thanks!
I've set "initialUsersToLoad" to 50 and now the page loads in 2 to 3 seconds, and the search field reacts smoothly.

@PVince81
Copy link
Contributor

Hmmm ok... Is that Firefox running on an older/slower machine perhaps ?
I suspect that the rendering of all the group dropdowns is what is making it slow, even if there aren't many groups. (something that the fix for #9201 would address)

@brtptrs
Copy link
Author

brtptrs commented May 20, 2016

Not really old
Intel® Core™ i7-3770 CPU @ 3.40GHz × 8
16 GB Ram
GeForce GT 630/PCIe/SSE2

@florian0402
Copy link

workaround doesn't work for me. is tehre any chance for a solution?

@PVince81
Copy link
Contributor

@florian0402 what are your symptoms before and after the workaround ?

@florian0402
Copy link

everytime i want to load the users page, the js error appears. i get the same error like @brtptrs (before and after the workaround)

@PVince81
Copy link
Contributor

@florian0402 does it happen if you set the user limit to 20 ? This was the original value in the old version.

So far I'm still surprised that it's that slow even with less users.

@florian0402
Copy link

@PVince81 it's getting better. it's not really fast, but it works with 20!

@PVince81
Copy link
Contributor

The ultimate fix will be #9201 but it isn't ready as it's bigger changes. The users page is quite old and uses unefficient ways to load groups, that PR improves that.

@butonic
Copy link
Member

butonic commented Jun 7, 2016

@PVince81 should we decrease to 20 again until #10994 is done?

@PVince81
Copy link
Contributor

PVince81 commented Jun 7, 2016

Yeah, or 50 if that value works better.

butonic added a commit that referenced this issue Jun 7, 2016
Prevents timeouts on the initial loading of users. proper fix will be in #10994
Workaround for #24734
blizzz pushed a commit to nextcloud/server that referenced this issue Jun 9, 2016
Prevents timeouts on the initial loading of users. proper fix will be in owncloud/core#10994
Workaround for owncloud/core#24734
PVince81 pushed a commit that referenced this issue Jun 14, 2016
Prevents timeouts on the initial loading of users. proper fix will be in #10994
Workaround for #24734
@PVince81
Copy link
Contributor

Closing. Follow up in the proper fix ticket #9201

@PVince81
Copy link
Contributor

The workaround that reduces the page size will be in 9.0.3

@ghost ghost mentioned this issue Jun 20, 2016
LukasReschke pushed a commit to nextcloud/server that referenced this issue Jun 20, 2016
Prevents timeouts on the initial loading of users. proper fix will be in owncloud/core#10994
Workaround for owncloud/core#24734
@lock
Copy link

lock bot commented Aug 4, 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 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants