JavaScript code is not executed on our web-app

I’ve made a web-app that uses very basic HTML, CSS and JavaScript. I’ve tested it using the LG WebOS TV simulator and everything worked fine. Later I tried to test it on actual LG TV, so I’ve installed it into the system using Developer mode, but when I ran the app, the HTML and CSS part worked no problem, but for some reason, JavaScript wasn’t loaded. I’ve tried different ways of importing the script, including putting it into the body of HTML. I’ve also tried to run the media-plaback-webos template from github, and it also didn’t work. Just to be sure, I’ve tried to open some websites that run on JS (youtube) on native LG web browser and they didn’t load properly. On the other hand, native Youtube app worked just fine.
TV Software version: 06.10.45
Model: OLED55B7V-Z
webOS TV version: 3.9.2-6270911 (dreadlocks2-dudhwa)

1 Like

We are not sure exactly what problem you are getting. Please let us know more about the problem. Thank you.

hi, I have the same problem, with a basic web app. The main.js container the build of my react web app, and all I can see is a black screen. If I make changes in the div’s styles I can see those.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <meta
      name="viewport"
      content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"
    />
  </head>

  <script src="webOSTVjs-1.2.10/webOSTV.js" charset="utf-8"></script>
  <script src="webOSTVjs-1.2.10/webOSTV-dev.js" charset="utf-8"></script>
  <script defer src="/main.js"></script>

  <body>
    <div
      id="app-root"
      style="display: flex; height: 100vh"
    ></div>
  </body>
</html>

You can access your app assets relative to the location of the index.html file within your package structure. For more information, please refer to App Resources. Thank you.