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

Argument 1 passed to OC\Group\MetaData::generateGroupMetaData() must implement interface OCP\IGroup, null given #5636

Closed
MorrisJobke opened this Issue Jul 6, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@MorrisJobke
Member

MorrisJobke commented Jul 6, 2017

  • opening the users page and getting following error:
Argument 1 passed to OC\Group\MetaData::generateGroupMetaData() must implement interface OCP\IGroup, null given, called in lib/private/Group/MetaData.php on line 92

#0 lib/private/Group/MetaData.php(92): OC\Group\MetaData->generateGroupMetaData(NULL, '')
#1 settings/users.php(69): OC\Group\MetaData->get()
#2 lib/private/Route/Route.php(155) : runtime-created function(1): require_once('...')
#3 [internal function]: __lambda_func()
#4 lib/private/Route/Router.php(299): call_user_func('\x00lambda_1280', Array)
#5 lib/base.php(1010): OC\Route\\Router->match('/settings/users')
#6 index.php(40): OC::handleRequest()
#7 {main}

"File":"lib/private/Group/MetaData.php",
"Line":160

@icewind1991 @blizzz @nickvergessen I can't find any code trace that would return a null group. Do you have any idea or should we just skip this case for now and then log something there?

https://support.nextcloud.com/#ticket/zoom/618

@blizzz

This comment has been minimized.

Show comment
Hide comment
@blizzz

blizzz Jul 7, 2017

Member

So this part gets input from getGroups.

If the logged in user is an admin, it just returns the result from IGroupManager::search. This one makes sure that IGroup[] is returned, nothing else is added to the result array. We can exclude this.

So, leaves us the option when the user is not an admin. SubAdmin::getSubAdminsGroups() returns groups, too, the difference is that is does not check for IGroup, but only rules out that groups can be null. The groups are provided by the group manager and might be cached. Either way it either returns Group instances, or null. Also this is perfectly valid and should not cause the observed behaviour, thus

I can't find any code trace that would return a null group.

is the same for me. However, I also cannot reproduce it.

@MorrisJobke useful debug info might be:

  • which backends are enabled
  • is the logged in user an admin or subadmin
  • what does $this->getGroups($groupSearch) de facto return?
Member

blizzz commented Jul 7, 2017

So this part gets input from getGroups.

If the logged in user is an admin, it just returns the result from IGroupManager::search. This one makes sure that IGroup[] is returned, nothing else is added to the result array. We can exclude this.

So, leaves us the option when the user is not an admin. SubAdmin::getSubAdminsGroups() returns groups, too, the difference is that is does not check for IGroup, but only rules out that groups can be null. The groups are provided by the group manager and might be cached. Either way it either returns Group instances, or null. Also this is perfectly valid and should not cause the observed behaviour, thus

I can't find any code trace that would return a null group.

is the same for me. However, I also cannot reproduce it.

@MorrisJobke useful debug info might be:

  • which backends are enabled
  • is the logged in user an admin or subadmin
  • what does $this->getGroups($groupSearch) de facto return?
@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Jul 11, 2017

Member
sudo -u apache php occ app:list
Enabled:
- activity: 2.4.1
- comments: 1.1.0
- dav: 1.1.1
- documents: 0.15.0
- federatedfilesharing: 1.1.1
- federation: 1.1.1
- files: 1.6.1
- files_pdfviewer: 1.0.1
- files_reader: 1.0.4
- files_sharing: 1.1.1
- files_texteditor: 2.2
- files_trashbin: 1.1.0
- files_versions: 1.4.0
- files_videoplayer: 1.0.0
- gallery: 16.0.0
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- nextcloud_announcements: 1.0
- notifications: 1.0.1
- password_policy: 1.1.0
- provisioning_api: 1.1.0
- serverinfo: 1.1.1
- sharebymail: 1.0.1
- survey_client: 0.1.5
- systemtags: 1.1.3
- templateeditor: 0.2
- theming: 1.1.1
- tubitcli: 0.0.2
- twofactor_backupcodes: 1.0.0
- updatenotification: 1.1.1
- user_ldap: 1.1.2
- workflowengine: 1.1.1
Disabled:
- admin_audit
- bookmarks
- calendar
- contacts
- encryption
- external
- files_accesscontrol
- files_automatedtagging
- files_external
- files_retention
- firstrunwizard
- music
- passman
- user_external
- user_saml

it's a local admin - not an LDAP provisioned user.

Member

MorrisJobke commented Jul 11, 2017

sudo -u apache php occ app:list
Enabled:
- activity: 2.4.1
- comments: 1.1.0
- dav: 1.1.1
- documents: 0.15.0
- federatedfilesharing: 1.1.1
- federation: 1.1.1
- files: 1.6.1
- files_pdfviewer: 1.0.1
- files_reader: 1.0.4
- files_sharing: 1.1.1
- files_texteditor: 2.2
- files_trashbin: 1.1.0
- files_versions: 1.4.0
- files_videoplayer: 1.0.0
- gallery: 16.0.0
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- nextcloud_announcements: 1.0
- notifications: 1.0.1
- password_policy: 1.1.0
- provisioning_api: 1.1.0
- serverinfo: 1.1.1
- sharebymail: 1.0.1
- survey_client: 0.1.5
- systemtags: 1.1.3
- templateeditor: 0.2
- theming: 1.1.1
- tubitcli: 0.0.2
- twofactor_backupcodes: 1.0.0
- updatenotification: 1.1.1
- user_ldap: 1.1.2
- workflowengine: 1.1.1
Disabled:
- admin_audit
- bookmarks
- calendar
- contacts
- encryption
- external
- files_accesscontrol
- files_automatedtagging
- files_external
- files_retention
- firstrunwizard
- music
- passman
- user_external
- user_saml

it's a local admin - not an LDAP provisioned user.

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke
Member

MorrisJobke commented Jul 18, 2017

@blizzz @rullzer @icewind1991 Any other ideas?

@blizzz

This comment has been minimized.

Show comment
Hide comment
@blizzz

blizzz Jul 19, 2017

Member

Need to prepare a debug patch

Member

blizzz commented Jul 19, 2017

Need to prepare a debug patch

@rullzer

This comment has been minimized.

Show comment
Hide comment
@rullzer
Member

rullzer commented Jul 20, 2017

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Jul 20, 2017

Member

This was introduced with #3884

Member

MorrisJobke commented Jul 20, 2017

This was introduced with #3884

@MorrisJobke

This comment has been minimized.

Show comment
Hide comment
@MorrisJobke

MorrisJobke Jul 20, 2017

Member

Fix is in #5813

Member

MorrisJobke commented Jul 20, 2017

Fix is in #5813

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