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

Webex SDK 3.3.1 | TypeError: Cannot read properties of undefined (reading 'internal') #3757

Open
vishalyadaviit opened this issue Aug 3, 2024 · 4 comments
Assignees
Labels
bug Bug

Comments

@vishalyadaviit
Copy link

Webex SDK throwing | TypeError: Cannot read properties of undefined (reading 'internal')

Somehow the this loses the scope it has initially.

To Reproduce
Node Version: v20.12.2
UI Framework: Vue: v3.4.29
Webex SDK: v3.3.1
Steps to reproduce the behavior:

<script crossorigin src="https://unpkg.com/[email protected]/umd/webex.min.js"></script>
  1. I made a very basic component, with just trying to register the meeting for webex cloud connection.
  2. You can take look at the sandbox (https://codesandbox.io/p/sandbox/webex3-sdk-poc-nmsytk)
export default {

data() {
    const myAccessToken =
      'YTA2MmEyZDItOTdmMS00MWRiLWE1NzQtMmRkYzIyMjQwNjNkMzhiZTgxNGUtNDE4_PF84_ba4155e8-7127-4fe1-b1a3-d8dfd3471500';
    return {
      webex: Webex.init({
        credentials: {
          access_token: myAccessToken,
        },
        logger: {
          level: 'debug',
        },
      }),
    };
  },
  async mounted() {
     try {
        await this.webex.meetings.register();
      } catch (error) {
        console.log('Mounted try catch error');
        console.log(error);
      }
  },

}

  1. See error

image

Application is breaking at this step in Webex SDK.
image

Expected behavior
It should successfully register the sdk. I'm passing a valid access_token.

Platform (please complete the following information):

  • OS: Windows 11
  • Browser Chrome
  • Device Type Desktop
@vishalyadaviit vishalyadaviit added the bug Bug label Aug 3, 2024
@vishalyadaviit
Copy link
Author

Also FYI: I don't think it has anything to do with the Vue framework, I tried with React. its the same issue.
also I don't think there is any dependency of Node version either, tried on 16, 18.

@sandiban
Copy link

sandiban commented Aug 5, 2024

Hello @vishalyadaviit,
Thanks for your patience so far!
Could you kindly share us a sample Live Token once more so that we could check the scope it has.
From the error, it looks to be something possibly with the scope it's about and also kindly confirm the Webex Account under which that Token belongs to.

Before directly trying on your code, you could check the same on Webex JS SDK latest sample here - https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/ and just check if you're able to initialize it.
If that works, you can follow the same credentials and dependency on your local setup.

hope that helps!

Regards!
Sandip

@vishalyadaviit
Copy link
Author

vishalyadaviit commented Aug 5, 2024

Hi @sandiban ,
Below is a valid meeting token for development purpose.
YTA2MmEyZDItOTdmMS00MWRiLWE1NzQtMmRkYzIyMjQwNjNkMzhiZTgxNGUtNDE4_PF84_ba4155e8-7127-4fe1-b1a3-d8dfd347152f

I checked using the above sample site, it seems to be working fine on this site.
I can see the meeting register is successful.
image

however working with vuejs or reactjs it doesn't work.

"kindly confirm the Webex Account under which that Token belongs to."
I don't have an id but it should be under humancaresystems company name.

@sreenara sreenara self-assigned this Aug 12, 2024
@sreenara
Copy link
Contributor

@vishalyadaviit thanks for reporting this issue. The error you're reporting is currently a warning. It shouldn't stop you from joining the meeting. Please look at the kitchen sink app here as you've observed correctly, that the error doesn't stop the meeting from going through. This is more of an issue on the way the component you've written is handling the initialization.

The failure of the meeting preferences is also not a problem. It is expected for users who don't have the right scopes in their access token to see this. This shouldn't stop the entire webex object from initializing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug
Projects
None yet
Development

No branches or pull requests

3 participants