After the update to Mattermost 3.10 (with the Gtilab 9.3 release) I’m not able to open the Mattermost UI anymore. I get the following JS error:
team_button.jsx:55 Uncaught (in promise) TypeError: Cannot read property 'substring' of undefined
at t.value (team_button.jsx:55)
at d._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:803)
at d._renderValidatedComponent (ReactCompositeComponent.js:826)
at d.performInitialMount (ReactCompositeComponent.js:366)
at d.mountComponent (ReactCompositeComponent.js:262)
at Object.mountComponent (ReactReconciler.js:50)
at h.mountChildren (ReactMultiChild.js:242)
at h._createInitialChildren (ReactDOMComponent.js:701)
at h.mountComponent (ReactDOMComponent.js:520)
at Object.mountComponent (ReactReconciler.js:50)
I am the admin of the Mattermost server and team. Other users don’t see this issue.
what browser/version are you using? what OS? cause if I understand correctly this is happening only to you in your org, have you tried in different browsers?
I did try different browsers and all of them showed the same behavior. My guess is that all other users do not have the rights to create new teams on the server so they wont see the team sidebar.
When I try to open the System Console I still the the following error:
admin_navbar_dropdown.jsx:89 Uncaught TypeError: Cannot read property 'name' of undefined
at n.value (admin_navbar_dropdown.jsx:89)
at d._renderValidatedComponentWithoutOwnerOrContext (ReactCompositeComponent.js:803)
at d._renderValidatedComponent (ReactCompositeComponent.js:826)
at d.performInitialMount (ReactCompositeComponent.js:366)
at d.mountComponent (ReactCompositeComponent.js:262)
at Object.mountComponent (ReactReconciler.js:50)
at h.mountChildren (ReactMultiChild.js:242)
at h._createInitialChildren (ReactDOMComponent.js:701)
at h.mountComponent (ReactDOMComponent.js:520)
at Object.mountComponent (ReactReconciler.js:50)
I dug around in the database a bit and found that the user affected was still a member of a channel which belonged to a deleted team. Deleting the channelusers entry for the channel in question solved the problem.
It seems that this not the only problem to be fixed. Going into the system console is still impossible. In the end I started looking into the database to search for anything that had to do with teams. I know Troubleshooting Mattermost issues — Mattermost documentation but what else to do?
In the database I found 16 unknown teams in my case:
select id, teamid, name from channels where not teamid=‘’ and teamid not in (select id from teams) order by teamid, name;
I did not track down where MM selects the list of teams, but I now assume the channels-table is used. This explains the undefined name in javascript.
USE BELOW FIX AT YOUR OWN RISK! I’m not explaining how to get to the database, so I’m sure you know what you do. I did a reconfigure and the problem did not come back. If this doesn’t work, it could be that you also need to clean up the teams form other tables - that’s what I tried before. Make sure you made a backup with pg_dump:
delete from channels where not teamid=‘’ and teamid not in (select id from teams);
Still an open question. There are also these entries:
select id, teamid, name, substring(name from 1 for 26), substring(name from 29 for 26) from channels where teamid=‘’;
Anybody have an idea if these would need attention now?