<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: getMeeting() returning error code of undefined in Webex for Developers</title>
    <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586751#M555</link>
    <description>&lt;P&gt;So, I sorted out my issue, but I'm not sure why it worked. here's the code context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using EmberJS to develop my embedded app. To aid in this, I've made an EmberJS Addon &lt;EM&gt;(found &lt;A href="https://ember-webex-embedded-app.cisco.com/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;, it's still a WIP)&lt;/EM&gt; which essentially wraps the Embedded App SDK with Ember conventions to enable some data-binding in the templating engine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When my app boots up, it initializes the addon, which in turn creates an instance of the SDK.&lt;/P&gt;&lt;PRE&gt;In ADDON:&lt;BR /&gt;this._webexInstance = new window.Webex.Application();&lt;/PRE&gt;&lt;P&gt;...which I then immediately setup the promise chain to respond to the onReady() event:&lt;/P&gt;&lt;PRE&gt;In ADDON:&lt;BR /&gt;this._webexInstance.onReady().then(() =&amp;gt; { })&lt;/PRE&gt;&lt;P&gt;Once the instance reports that it's ready, I then go and fetch the user. Once the user is resolved, I then resolve the promise that was blocking my app from booting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was here that I was then calling "getMeeting()" to get the meeting details. Here's the high-level sequence.&lt;/P&gt;&lt;PRE&gt;In Addon: OnReady() -&amp;gt; onReadyHandler() -&amp;gt; context.getUser() -&amp;gt; context.getMeeting()&lt;/PRE&gt;&lt;P&gt;The change I made to get it to work was to remove the final step and call it, more deliberately from the consuming app:&lt;/P&gt;&lt;PRE&gt;In Addon: OnReady() -&amp;gt; onReadyHandler() -&amp;gt; context.getUser()&lt;/PRE&gt;&lt;P&gt;In my addon, I have an accessor function for the meeting details call, like this:&lt;/P&gt;&lt;PRE&gt;ADDON CODE:&lt;BR /&gt;  &lt;BR /&gt;_cachedMeetingPromise: undefined;
  get meeting(): Promise&amp;lt;any&amp;gt;{
    let retVal = this._cachedMeetingPromise ? this._cachedMeetingPromise : this.localDev ? Promise.resolve(this.fakedMeetingInfo) : this.context.getMeeting();

    this._cachedMeetingPromise = retVal;

    retVal.then((meetingInfo: any)=&amp;gt;{
      this.currentRoles = meetingInfo.userRoles;
      this._cachedMeetingPromise = undefined;
      console.log("WEBEX for getMeetings: ", meetingInfo)
    }).catch((error:any) =&amp;gt;{
      this._cachedMeetingPromise = undefined;
      // @ts-ignore
      console.log("WEBEX ERROR for getMeetings: ", Webex.Application.ErrorCodes[error])
    })

    return retVal;
  }&lt;/PRE&gt;&lt;P&gt;Which I then call in the consuming app like this:&lt;/P&gt;&lt;PRE&gt;APP CODE:

        this.webex.meeting.then((meeting: any)=&amp;gt;{
          this.websocket.connect(meeting);
        }).catch((error)=&amp;gt;{
          console.log("WEBEX IN APP: ERROR FOR GET MEETING", error);
        })&lt;/PRE&gt;&lt;P&gt;This seems to be working now. I suppose it's possible that the sequencing and timing between calls could have caused an issue.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Apr 2022 19:36:55 GMT</pubDate>
    <dc:creator>chshipma</dc:creator>
    <dc:date>2022-04-05T19:36:55Z</dc:date>
    <item>
      <title>getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585596#M535</link>
      <description>&lt;P class=""&gt;I'm trying to use &lt;SPAN class=""&gt;getMeeting()&lt;/SPAN&gt; when using the Embedded App SDK and am getting &lt;SPAN class=""&gt;undefined&lt;/SPAN&gt; as an error coming back from a rejected promise.&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;How do I troubleshoot this?&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;STRONG&gt;Details:&lt;/STRONG&gt;&lt;/P&gt;&lt;P class=""&gt;-&amp;nbsp;&lt;STRONG&gt;Webex Meetings Version:&lt;/STRONG&gt; 42.3.6.11&lt;/P&gt;&lt;P class=""&gt;-&amp;nbsp;&lt;STRONG&gt;Platform:&amp;nbsp;&lt;/STRONG&gt;Mac OS&amp;nbsp;12.3 (21E230)&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 22:19:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585596#M535</guid>
      <dc:creator>chshipma</dc:creator>
      <dc:date>2022-04-04T22:19:32Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585601#M537</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/724606"&gt;@chshipma&lt;/a&gt;&amp;nbsp;, thanks for your question! Would you add the platform (Mac/Win) and client version of Webex where you're experiencing this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some things to check for in general:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;When you created your Embedded App at developer.webex.com, did you click the box for Meetings (there's one for Meetings and Messaging) to specify that it can be used in Meetings?&lt;/LI&gt;
&lt;LI&gt;Is PII (Personally Identifiable Information) on or off for your app?&lt;/LI&gt;
&lt;LI&gt;Is the app in development status, or has it been approved by your org admin?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thanks for adding additional info for us on this.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 22:17:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585601#M537</guid>
      <dc:creator>David Liedle, Dev Evangelist</dc:creator>
      <dc:date>2022-04-04T22:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585606#M538</link>
      <description>&lt;P&gt;Thanks for the reply, I modified my original post to contain the extra version information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#999999"&gt;&lt;EM&gt;When you created your Embedded App at developer.webex.com, did you click the box for Meetings (there's one for Meetings and Messaging) to specify that it can be used in Meetings?&lt;/EM&gt;&lt;/FONT&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#000000"&gt;Yes, I have both Meeting and Messaging checked&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#999999"&gt;&lt;EM&gt;Is PII (Personally Identifiable Information) on or off for your app?&lt;/EM&gt;&lt;/FONT&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#000000"&gt;It's enabled&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#999999"&gt;&lt;EM&gt;Is the app in development status, or has it been approved by your org admin?&lt;/EM&gt;&lt;/FONT&gt;&lt;UL&gt;&lt;LI&gt;&lt;FONT color="#000000"&gt;It is in development mode. I submitted (not fully aware of the process) and it's just saying "Submitted"&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Further, I decided to deploy the kitchen sink app in my dev account and I can mash the "getMeeting()" button and get information back about the meeting every time.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 22:23:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585606#M538</guid>
      <dc:creator>chshipma</dc:creator>
      <dc:date>2022-04-04T22:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585609#M539</link>
      <description>&lt;P class="p1"&gt;Hi Chuck, which specific code is returned for the rejected promise? Here are the error &lt;A href="https://developer.webex.com/docs/embedded-apps-api-reference#Webex.Application.ErrorCodes" target="_blank"&gt;&lt;SPAN class="s1"&gt;code descriptions&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;if this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 22:37:05 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585609#M539</guid>
      <dc:creator>Gasper A</dc:creator>
      <dc:date>2022-04-04T22:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585632#M540</link>
      <description>&lt;P&gt;It’s returning undefined.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 00:36:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4585632#M540</guid>
      <dc:creator>chshipma</dc:creator>
      <dc:date>2022-04-05T00:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586427#M552</link>
      <description>&lt;P&gt;Tested this with just a button that calls a getMeeting function and it correctly returned. &lt;BR /&gt;Button in HTML file.&lt;/P&gt;
&lt;PRE&gt;&amp;lt;button onclick="getMeeting()"&amp;gt;Get Meeting&amp;lt;/button&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Function in the JS file. &lt;/P&gt;
&lt;PRE&gt;function getMeeting() {
  app.context.getMeeting().then((m) =&amp;gt; {
    console.log('getMeeting()', m);
  }).catch((error) =&amp;gt; {
    console.log('getMeeting() promise failed with error', Webex.Application.ErrorCodes[error]);
  });
}&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Apr 2022 12:51:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586427#M552</guid>
      <dc:creator>Jeff Marshall</dc:creator>
      <dc:date>2022-04-05T12:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586700#M554</link>
      <description>&lt;P&gt;Thanks for these details&amp;nbsp;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/724606"&gt;@chshipma&lt;/a&gt;&amp;nbsp;! One more question: does your code wait for `onReady()` to resolve before attempting to access methods and properties?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 17:12:20 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586700#M554</guid>
      <dc:creator>David Liedle, Dev Evangelist</dc:creator>
      <dc:date>2022-04-05T17:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: getMeeting() returning error code of undefined</title>
      <link>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586751#M555</link>
      <description>&lt;P&gt;So, I sorted out my issue, but I'm not sure why it worked. here's the code context.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using EmberJS to develop my embedded app. To aid in this, I've made an EmberJS Addon &lt;EM&gt;(found &lt;A href="https://ember-webex-embedded-app.cisco.com/" target="_blank" rel="noopener"&gt;here&lt;/A&gt;, it's still a WIP)&lt;/EM&gt; which essentially wraps the Embedded App SDK with Ember conventions to enable some data-binding in the templating engine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When my app boots up, it initializes the addon, which in turn creates an instance of the SDK.&lt;/P&gt;&lt;PRE&gt;In ADDON:&lt;BR /&gt;this._webexInstance = new window.Webex.Application();&lt;/PRE&gt;&lt;P&gt;...which I then immediately setup the promise chain to respond to the onReady() event:&lt;/P&gt;&lt;PRE&gt;In ADDON:&lt;BR /&gt;this._webexInstance.onReady().then(() =&amp;gt; { })&lt;/PRE&gt;&lt;P&gt;Once the instance reports that it's ready, I then go and fetch the user. Once the user is resolved, I then resolve the promise that was blocking my app from booting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It was here that I was then calling "getMeeting()" to get the meeting details. Here's the high-level sequence.&lt;/P&gt;&lt;PRE&gt;In Addon: OnReady() -&amp;gt; onReadyHandler() -&amp;gt; context.getUser() -&amp;gt; context.getMeeting()&lt;/PRE&gt;&lt;P&gt;The change I made to get it to work was to remove the final step and call it, more deliberately from the consuming app:&lt;/P&gt;&lt;PRE&gt;In Addon: OnReady() -&amp;gt; onReadyHandler() -&amp;gt; context.getUser()&lt;/PRE&gt;&lt;P&gt;In my addon, I have an accessor function for the meeting details call, like this:&lt;/P&gt;&lt;PRE&gt;ADDON CODE:&lt;BR /&gt;  &lt;BR /&gt;_cachedMeetingPromise: undefined;
  get meeting(): Promise&amp;lt;any&amp;gt;{
    let retVal = this._cachedMeetingPromise ? this._cachedMeetingPromise : this.localDev ? Promise.resolve(this.fakedMeetingInfo) : this.context.getMeeting();

    this._cachedMeetingPromise = retVal;

    retVal.then((meetingInfo: any)=&amp;gt;{
      this.currentRoles = meetingInfo.userRoles;
      this._cachedMeetingPromise = undefined;
      console.log("WEBEX for getMeetings: ", meetingInfo)
    }).catch((error:any) =&amp;gt;{
      this._cachedMeetingPromise = undefined;
      // @ts-ignore
      console.log("WEBEX ERROR for getMeetings: ", Webex.Application.ErrorCodes[error])
    })

    return retVal;
  }&lt;/PRE&gt;&lt;P&gt;Which I then call in the consuming app like this:&lt;/P&gt;&lt;PRE&gt;APP CODE:

        this.webex.meeting.then((meeting: any)=&amp;gt;{
          this.websocket.connect(meeting);
        }).catch((error)=&amp;gt;{
          console.log("WEBEX IN APP: ERROR FOR GET MEETING", error);
        })&lt;/PRE&gt;&lt;P&gt;This seems to be working now. I suppose it's possible that the sequencing and timing between calls could have caused an issue.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 19:36:55 GMT</pubDate>
      <guid>https://community.cisco.com/t5/webex-for-developers/getmeeting-returning-error-code-of-undefined/m-p/4586751#M555</guid>
      <dc:creator>chshipma</dc:creator>
      <dc:date>2022-04-05T19:36:55Z</dc:date>
    </item>
  </channel>
</rss>

