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

Closed
brtptrs opened this Issue May 19, 2016 · 24 comments

Projects

None yet

5 participants

@brtptrs
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

@pako81 pako81 added the blue-ticket label May 19, 2016
@PVince81
Collaborator

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
Collaborator

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
Collaborator

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
Collaborator

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
Collaborator

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
pako81 commented May 20, 2016 edited

@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
pako81 commented May 20, 2016 edited

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
Collaborator

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

@pako81
pako81 commented May 20, 2016

ah ok :)

@PVince81
Collaborator

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
brtptrs commented May 20, 2016 edited

@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
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
Collaborator

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
brtptrs commented May 20, 2016 edited

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

@florian0402

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

@PVince81
Collaborator

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

@florian0402

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
Collaborator

@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

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

@PVince81
Collaborator

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
Member
butonic commented Jun 7, 2016

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

@PVince81
Collaborator
PVince81 commented Jun 7, 2016

Yeah, or 50 if that value works better.

@butonic butonic added a commit that referenced this issue Jun 7, 2016
@butonic butonic decrease initial users to load to 50
Prevents timeouts on the initial loading of users. proper fix will be in #10994
Workaround for #24734
2989584
@blizzz blizzz added a commit to nextcloud/server that referenced this issue Jun 9, 2016
@butonic @blizzz butonic + blizzz decrease initial users to load to 50
Prevents timeouts on the initial loading of users. proper fix will be in owncloud/core#10994
Workaround for owncloud/core#24734
75870c9
@PVince81 PVince81 added a commit that referenced this issue Jun 14, 2016
@butonic @PVince81 butonic + PVince81 decrease initial users to load to 50
Prevents timeouts on the initial loading of users. proper fix will be in #10994
Workaround for #24734
a0215b1
@PVince81
Collaborator

Closing. Follow up in the proper fix ticket #9201

@PVince81 PVince81 closed this Jun 15, 2016
@PVince81
Collaborator

The workaround that reduces the page size will be in 9.0.3

@ghost Unknown referenced this issue Jun 20, 2016
Closed

User admin page hangs #25185

@LukasReschke LukasReschke added a commit to nextcloud/server that referenced this issue Jun 20, 2016
@butonic @LukasReschke butonic + LukasReschke decrease initial users to load to 50
Prevents timeouts on the initial loading of users. proper fix will be in owncloud/core#10994
Workaround for owncloud/core#24734
459aa93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment