# Using valid player key throwing SETUP\_LICENSE\_ERROR when application is hosted

**URL:** <https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085>\
**Category:** Support\
**Created:** [August 6, 2022, 1:38am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085 "2022-08-06T01:38:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarekali15](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/tarekali15/32/439_2.png) [@tarekali15](https://community.bitmovin.com/u/tarekali15)\
**Post date:** [August 6, 2022, 1:38am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/1 "2022-08-06T01:38:59Z")

</div>

When I use the player localhost, with vr settings following the react bundled app tutorial, the webplayer works fine without any issues, but when hosting it on vercel, with the only key/license we were provided, despite upstream content being loaded properly, the media player displays “SETUP\_LICENSE\_ERROR”. Why does this happen and how can I fix it so we can finish building our MVP?

---

<div class="post-metadata">

**Author:** ![peder.borg](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/peder.borg/32/357_2.png) [@peder.borg](https://community.bitmovin.com/u/peder.borg)\
**Post date:** [August 6, 2022, 9:54am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/2 "2022-08-06T09:54:46Z")

</div>

Hi @tarekali15

Would it be possible for you to check that you have added the correct domain(s) for the license in the Bitmovin Dashboard (Player \> License \> Choose license \> Domains / Package Names / Bundle Identifiers) [Bitmovin Docs - Player FAQ - How can I allowlist a domain, IP, app ID, package name, or bundle identifier?](https://bitmovin.com/docs/player/faqs/how-can-i-allowlist-a-domain)

In addition, you should be able to open the console of your browser and notice a post-request to [https://licensing.bitmovin.com/licensing](https://licensing.bitmovin.com/licensing). In the response to this post, you should be able to get an error message - e.g. like `{"status":"denied","message":"Your player is not allowed to play on the domain d2z6pwfqp8ywfi.cloudfront.net."}`

I hope this helps.

BR  
Peder

---

<div class="post-metadata">

**Author:** ![tarekali15](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/tarekali15/32/439_2.png) [@tarekali15](https://community.bitmovin.com/u/tarekali15)\
**Post date:** [August 6, 2022, 7:35pm UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/3 "2022-08-06T19:35:50Z")

</div>

I have added the correct domain for the license in the dashboard and looking at chrome dev tools, the only requests cast by fetch/xhr are to my firebase storage instance, I don’t see any requests to bitmovin endpoints, and as such, do not see the accompanied json error message response.

---

<div class="post-metadata">

**Author:** ![peder.borg](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/peder.borg/32/357_2.png) [@peder.borg](https://community.bitmovin.com/u/peder.borg)\
**Post date:** [August 7, 2022, 7:15am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/4 "2022-08-07T07:15:04Z")

</div>

Hi @tarekali15

Would it be possible for you to share the page where your player is hosted? You write that you don’t see any requests to Bitmovin endpoints - does this mean that you’re hosting the player on your own CDN? Or are you fetching the player from the CDN Bitmovin is using? Is it possible to share a HAR capture file from Google Chrome?

Looking at the error it seems to point to a wrong license key ([Bitmovin Docs - Player Web SDK v8 API - Errors](https://bitmovin.com/docs/player/api-reference/web/web-sdk-v8-api-errors#/player/web/8/docs/pages/error/code/1103.html)), even though you may already have done so, please re-check that the license you are using is the one found in the Bitmovin Dashboard under Player \> License

Do you see any errors/info messages in the console part of the dev tools in your browser?

If possible, please also send me a DM with either your account email, or your player license.

Thank you.

Peder Borg Borup

---

<div class="post-metadata">

**Author:** ![tarekali15](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/tarekali15/32/439_2.png) [@tarekali15](https://community.bitmovin.com/u/tarekali15)\
**Post date:** [August 8, 2022, 1:08am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/5 "2022-08-08T01:08:17Z")

</div>

1. The page is hosted here: [VR Video Hosting App](https://www.vrtualme.com/videos)
2. With regards to hosting, I don’t believe we are using a CDN; our hosting provider is vercel though; I am following the react bundled player demo; with regards to upstream files, they are served thru firebase storage with progressive streaming.
3. Here is a capture file of the videos page: [testvideopagevisit.har - Google Drive](https://drive.google.com/file/d/1ZhzWz8rUCcGZtTVV0eIB-NvB4t3McLYI/view?usp=sharing)
4. I have triple-checked the license key env var, it is the same/only license key we have created.
5. Here is the console output:  
 ![captureofconsoleerrors](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/4b35dc4ba8b05afbf9f61d0c066c7b6278a38acd.png)
6. I will DM an email unless there is a forum issue, thanks.

---

<div class="post-metadata">

**Author:** ![tarekali15](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/tarekali15/32/439_2.png) [@tarekali15](https://community.bitmovin.com/u/tarekali15)\
**Post date:** [August 8, 2022, 1:27am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/6 "2022-08-08T01:27:08Z")

</div>

Ok for some reason I can’t DM when I press your profile and messages icon it only shows discobot greeting message,

---

<div class="post-metadata">

**Author:** ![peder.borg](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/peder.borg/32/357_2.png) [@peder.borg](https://community.bitmovin.com/u/peder.borg)\
**Post date:** [August 8, 2022, 9:59am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/7 "2022-08-08T09:59:54Z")

</div>

Hi @tarekali15

I discussed this with my colleagues, and it could point to the player license key not being defined/set correctly.

Looking at the console it contains `Error while loading source: undefined`. Inspecting the player object more closely shows that the “key” has not been populated:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/ba30eeb129ed9639a784b57e8bcbcffb294fa7fa.png)

Going back to 437.8cda8299394e2fdb.js this holds a reference to the key:

> “playerConfig”,{key:p.env.BITMOVIN\_KEY}

I then used the “Local Overrides” function in Chrome to modify 437.8cda8299394e2fdb.js - and hardcoded my license key:

> “playerConfig”,{key:“49058346-BC4A-47AB-BED9-85B2DDABFBF2”}

Doing this change enables playback, and the console shows a correct license key:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/c301b1b34127c626b6aa79e786a500ba082ce00c.png)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/bitmovin/original/1X/180abd5e05270d5ebd5ee38d28564f2a18d30a86.jpeg)

Would it be possible for you to further investigate the population of the BITMOVIN\_KEY variable, or as an alternative hard code the value?

I hope this helps.

Best regards  
Peder

---

<div class="post-metadata">

**Author:** ![tarekali15](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/tarekali15/32/439_2.png) [@tarekali15](https://community.bitmovin.com/u/tarekali15)\
**Post date:** [August 8, 2022, 4:12pm UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/8 "2022-08-08T16:12:25Z")

</div>

huh that’s odd, hardcoding our license key displays the video in the player for a minute amount of frames then it shows the error. Using your key works fine though. Let me DM.

---

<div class="post-metadata">

**Author:** ![peder.borg](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/peder.borg/32/357_2.png) [@peder.borg](https://community.bitmovin.com/u/peder.borg)\
**Post date:** [August 8, 2022, 4:56pm UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/9 "2022-08-08T16:56:29Z")

</div>

Hi @tarekali15

I’ve responded to your private message. Let me know if that helps.

BR  
Peder

---

<div class="post-metadata">

**Author:** ![peder.borg](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/peder.borg/32/357_2.png) [@peder.borg](https://community.bitmovin.com/u/peder.borg)\
**Post date:** [August 9, 2022, 6:21am UTC](https://community.bitmovin.com/t/using-valid-player-key-throwing-setup-license-error-when-application-is-hosted/1085/10 "2022-08-09T06:21:37Z")

</div>

Changes to code enabling the license to be set correctly and disabling “Third Party Licensing” in Bitmovin Dashboard solved the problem.
