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

Failed to make link: Cannot read property 'users' of undefined #636

Closed
cryptix opened this issue Nov 12, 2021 · 5 comments
Closed

Failed to make link: Cannot read property 'users' of undefined #636

cryptix opened this issue Nov 12, 2021 · 5 comments

Comments

@cryptix
Copy link

cryptix commented Nov 12, 2021

Describe the bug

I'm unable to finalize the integration on the slack channel selection screen.

"List Channels" of the slack workspace works but when I select the channel that should be bridge to the element room I get the error message in the title: Failed to make link: Cannot read property 'users' of undefined

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add widges, bridges & bots' in the element room settings
  2. Click through to the Slack in Bridge
  3. Click "Add bridge"
  4. "Add to Slack" and go through the OAuth install on slack.com and see the "integration succesfull - you can close this window" page from element/matrix
  5. go back to the bridge integration in the element client and click "List Channels" on the added slack team
  6. see the populated list of channels in the slack workspace
  7. click the desired channel
  8. the error message appears

Expected behavior
The bridging starts working.

Screenshots
Screenshot 2021-11-12 at 09 19 46

Desktop (please complete the following information):

  • OS: macOS
  • Standalone version 1.9.4

Additional context

@slack:matrix.org did join the element room and the room was set to public with full history.

This might be a duplicate of #398 but contrary to that issue my element account is on the matrix.org homeserver.

The slack workspace is a free trial but we also tried with a paid one, same result.

@nik0kin
Copy link

nik0kin commented Nov 14, 2021

This occurred for me with the EMS Slack bridge integration today too

@tibeer
Copy link

tibeer commented Nov 18, 2021

Having the same issue here. This does not seem to be related to the client at all, but rather looks like something in the background changed on matrix which requires now some "users" variable.

@cryptix
Copy link
Author

cryptix commented Nov 25, 2021

I drilled the error down to this line in vendors~init.js which is a gigantic minified file who's source i have yet to determine...

Thanks to the devtools re-pretty printing I dug up this:

if ((i.content.users && i.content.users[n] || i.content.users_default || 0) >= r)

Screenshot 2021-11-25 at 15 49 59

I think this is the check if the bot joined and has the right power/moderator level and AFAICT it shouldn't check for i.content.users[n] but i.users[n].

ps: this was on desktop element 1.9.5

@cryptix
Copy link
Author

cryptix commented Nov 25, 2021

I also tested Element Nightly, same result but somehow the source map worked and I was able to pinpoint the code to here:

https://github.com/matrix-org/matrix-react-sdk/blob/ea97c416f5a7e288780aa8aa8bc137306fa99a43/src/ScalarMessaging.ts#L476-L478

I also consulted the client server specs that are commented above there and I can confirm that my result has no content object.

And I just found matrix-org/matrix-react-sdk#7179 - so I hope this will fixed soon.

@cryptix
Copy link
Author

cryptix commented Nov 25, 2021

And I guess this is a duplicate of element-hq/element-web#19845 then.. tracking that one instead now.

@cryptix cryptix closed this as completed Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants