# X-zoom-app-context is empty when accessing app on some devices

**URL:** <https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968>\
**Category:** Zoom Apps\
**Created:** [October 27, 2022, 9:23am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968 "2022-10-27T09:23:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [October 27, 2022, 9:23am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/1 "2022-10-27T09:23:01Z")

</div>

For my app’s use-case, I’m saving the value of the x-zoom-app-context header. So when a user initially opens the app, the value gets stored. The issue I’m facing is that on some devices i’m getting the header twice, once it contains the actual value and the second time around it’s empty so the actual value gets overwritten

 ![Screenshot 2022-10-27 130851](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/9/3/93faffb261d695044b5e23a8e641ac7c1ea0de69.png)

Another thing to note here is that this issue seems to be device specific. I tried reproducing this issue using the same Zoom account and same app on a different device but it was working fine there

It’d be great if anyone can help troubleshoot this issue and get to the root cause of it

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [October 27, 2022, 5:44pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/2 "2022-10-27T17:44:51Z")

</div>

@mubashira.salman On what devices are you seeing this discrepancy? Does this depend on the OS of the device or something else?

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [October 28, 2022, 5:29am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/3 "2022-10-28T05:29:57Z")

</div>

The OS of the device on which this issue is occuring is Windows. But I don’t think it’s OS dependent as the other device on which it was working as expected, the OS is Windows as well.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [October 29, 2022, 4:36pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/4 "2022-10-29T16:36:02Z")

</div>

What version of Windows are you using? Likewise, what version of the Zoom Client are you seeing this with?

When you see this issue, have you confirmed the issue by checking the network tab of the debugger?

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [October 31, 2022, 5:33am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/5 "2022-10-31T05:33:08Z")

</div>

Windows 10 + Zoom Client version 5.11.1

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [October 31, 2022, 10:28pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/6 "2022-10-31T22:28:04Z")

</div>

Are you able to upgrade to 5.12.3 to see if that resolves the issue?

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 1, 2022, 9:24am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/7 "2022-11-01T09:24:43Z")

</div>

I did upgrade to 5.12.3 but unfortunately that didn’t help with this

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 1, 2022, 6:53pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/8 "2022-11-01T18:53:22Z")

</div>

Thank you for testing that! As one final check, can you see if this issue is present when using the [Basic Sample App](https://github.com/zoom/zoomapps-sample-js)? If we can reproduce the issue using that app then I can point our engineering team in the right direction.

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 2, 2022, 7:32am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/9 "2022-11-02T07:32:27Z")

</div>

Hi, using the basic sample app that you’ve linked and the issue is still there

 ![Screenshot 2022-11-02 123021](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/a/e/ae33d8bed5746699fceacbec6527d2bf3c2e1d48.png)

This ‘undefined’ is creating problems in my app’s case

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 3, 2022, 12:10am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/10 "2022-11-03T00:10:31Z")

</div>

Thank you for testing that! I tried this on my end using 5.12.3 on Windows 11 but I wasn’t able to see the same issue.

Here’s how I was logging the context header:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/5/6533a9b8b5c3ddaf8dcf92e790fd0d88bf7de158.png)

and I was only seeing it printed once:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/d/6/d678b563bc5df3917683fc3f627e4a93be4cc04d.png)

How are you logging the context header?

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 3, 2022, 6:48am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/11 "2022-11-03T06:48:41Z")

</div>

previously i was logging the encrypted header

```auto
const header = req.header(contextHeader);
console.log(header)

```

But I’ll add the log where you have and let you know what happens then as well

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 3, 2022, 6:59am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/12 "2022-11-03T06:59:28Z")

</div>

![Screenshot 2022-11-03 115613](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/4/64c16641018024e3ce464741d61acde2c68352b1.png)

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 4, 2022, 8:32pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/13 "2022-11-04T20:32:59Z")

</div>

I sent you a DM so that we can set up a meeting and take a look at this live.

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 7, 2022, 12:16pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/15 "2022-11-07T12:16:34Z")

</div>

Hey, I’ve scheduled a meeting with you. Let me know if you’ve received the invite

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 8, 2022, 12:53am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/16 "2022-11-08T00:53:46Z")

</div>

Thanks for scheduling the meeting! I had to move it due to Zoomtopia but I look forward to getting this resolved.

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [November 9, 2022, 5:52am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/17 "2022-11-09T05:52:01Z")

</div>

Hey Max, I’ve left you a message to reschedule that due to a conflict. Please check

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [November 10, 2022, 8:28pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/18 "2022-11-10T20:28:07Z")

</div>

I received your message. Thank you!

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [December 5, 2022, 6:32am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/19 "2022-12-05T06:32:38Z")

</div>

Hi @MaxM any update on this?

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 5, 2022, 11:50pm UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/20 "2022-12-05T23:50:41Z")

</div>

Sorry for the delay on this. I do have a couple of questions that should help out here:

1. Are you using the same URL for the home and redirect URL?
2. When you see this issue, how are you refreshing the page? Different methods will follow a different code path.
3. When you use the [getAppContext()](https://marketplace.zoom.us/docs/zoom-apps/js-sdk/reference/#getAppContext) function do you see the same issue?

I hope that helps!

---

<div class="post-metadata">

**Author:** ![mubashira.salman](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@mubashira.salman](https://devforum.zoom.us/u/mubashira.salman)\
**Post date:** [December 6, 2022, 10:26am UTC](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968/21 "2022-12-06T10:26:57Z")

</div>

1. No, home and redirect URL are different
2. Not quite sure what you mean by ‘refresh’ here. When this issue occurs, we usually use the refresh app option using the ‘Refresh App’ option
3. Using the getAppContext() function I’m able to see the context value

[Next page](https://devforum.zoom.us/t/x-zoom-app-context-is-empty-when-accessing-app-on-some-devices/77968.md?page=2)
