# Twitch server not contacting my front-end service. Errors showing in Chrome debugger for extension

**URL:** <https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125>\
**Category:** Extensions\
**Created:** [February 20, 2019, 8:58pm UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125 "2019-02-20T20:58:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AssistWitch](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@AssistWitch](https://discuss.dev.twitch.com/u/AssistWitch)\
**Post date:** [February 20, 2019, 8:58pm UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/1 "2019-02-20T20:58:36Z")

</div>

I got rid of the authenticated sources warning on my extension by moving to a full-fledged domain with valid SSL certs. However, when my extension loads on my channel page, I see a blank screen. I have my extension, which is currently the Hello World sample, running in a debugger and I am not seeing any activity, so it doesn’t look like the Twitch servers are contacting my front-end service.

If I do a simple get request in a browser to the front-end service, I DO see activity so I know the route is working, at least at the Internet routing level. But when I check the Chrome debugger I see this error:

```auto
Got message from unexpected source https://supervisor.ext-twitch.tv {"target":"inpage","data":{"name":"publicConfig","data":{"networkVersion":"1"}}}
handleAction @ supervisor.js:1
postMessage (async)        
Z._write @ contentscript.js:1
h @ contentscript.js:1
(anonymous) @ contentscript.js:1
a.write @ contentscript.js:1
y @ contentscript.js:1
(anonymous) @ contentscript.js:1
m.emit @ contentscript.js:1
L @ contentscript.js:1
I @ contentscript.js:1
h.push @ contentscript.js:1
m.push @ contentscript.js:1
(anonymous) @ contentscript.js:1
Z.afterTransform @ contentscript.js:1
transform @ contentscript.js:1
m._read @ contentscript.js:1
m._write @ contentscript.js:1
h @ contentscript.js:1
(anonymous) @ contentscript.js:1
a.write @ contentscript.js:1
y @ contentscript.js:1
(anonymous) @ contentscript.js:1
m.emit @ contentscript.js:1
L @ contentscript.js:1
I @ contentscript.js:1
h.push @ contentscript.js:1
Z._onMessage @ contentscript.js:1

```

Anyone know what is wrong? I have the base URI for the front-end service set to the following (with a real domain, not the fake domain shown below I’m using to hide the actual domain). Please don’t click on the link, the domain is fake. How can I show a link in a forum post without making it clickable?:

[https://my-real-domain.com:7600/](https://my-real-domain.com:7600/)

---

<div class="post-metadata">

**Author:** ![AssistWitch](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@AssistWitch](https://discuss.dev.twitch.com/u/AssistWitch)\
**Post date:** [February 21, 2019, 12:43am UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/2 "2019-02-21T00:43:13Z")

</div>

Got it figured out. I’m an Node.JS/Express dev and I had to take an ad hoc crash course in Hapi server to get things working. My original problem was that I was serving up the backend for the front-end. I fixed that, but I had to learn a bit about Hapi routing and the use of the Inert plugin to get things working in total.

I now have the Hello World extension sample working now with the color cycler demo. I still get the occasional “Got message from an unexpected source” error in the Chrome debugger from time to time, but I don’t know why that’s happening and it doesn’t seem to affect anything that I detect.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [February 21, 2019, 9:55am UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/3 "2019-02-21T09:55:00Z")

</div>

If you are having problems with HAPI just build it in express and skip the hello world example (which uses HAPI)

A Twitch extension is literally just plain HTML, JS, CSS on the front end and then do you EBS however you want.

Don’t get bogged down in HAPI if you don’t know HAPI or intend to use HAPI

---

<div class="post-metadata">

**Author:** ![AssistWitch](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@AssistWitch](https://discuss.dev.twitch.com/u/AssistWitch)\
**Post date:** [February 21, 2019, 12:56pm UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/4 "2019-02-21T12:56:17Z")

</div>

Hii Barry,

I got it working. It still very useful to have that sample working, especially for the JWT token code, which was new to me. I had already done Twitch auth in Express with Passport, but that JWT code was completely new to me.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [February 21, 2019, 12:57pm UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/5 "2019-02-21T12:57:12Z")

</div>

Comparing Twitch oAuth with JWT is like comparing apples with oranges.

Two distinctly different industry standard methods.

Also since on the subject of JWT’s

As noted on

> **[Required Technical Background](https://dev.twitch.tv/docs/extensions/required-technical-background/#json-web-tokens-jwts)**
>
> Technical Background

> If you are not familiar with JWTs, visit the [official site](https://jwt.io/) for an introduction.

Check

> **[JWT.IO](https://jwt.io/)**
>
> JSON Web Tokens are an open, industry standard RFC 7519 method for representing claims securely between two parties.

And consider using

`jsonwebtoken` to manage you JWT verification and decoding, in node

---

<div class="post-metadata">

**Author:** ![AssistWitch](https://avatars.discourse-cdn.com/v4/letter/a/e9c0ed/32.png) [@AssistWitch](https://discuss.dev.twitch.com/u/AssistWitch)\
**Post date:** [February 21, 2019, 1:23pm UTC](https://discuss.dev.twitch.com/t/twitch-server-not-contacting-my-front-end-service-errors-showing-in-chrome-debugger-for-extension/20125/6 "2019-02-21T13:23:56Z")

</div>

Thanks again Barry, I’ll have a look at those.

But I’m “off to the races” now. I have what I need to to get my extension working.
