Skip to main content

LG webOS Native Debug

Feature entitlement: devSpace · Availability: DevSpace

Prerequisites​

Step by Step Guide​

In order to debug the LG webOS display, follow the steps below:

  1. Open LG webOS device detail in Box
  2. Navigate to Troubleshooting Tab
  3. Click "Native Debug"
  4. Display will be rebooted (or alternatively reboot manually)

Then follow the guide based on your display generation:

webOS 1.0-4.1​

  1. Open older Chromium
  2. In Chromium open http://IP-OF-THE-DISPLAY:9998 URL
  3. Chrome inspector will show up
  4. Debug

webOS 6.0 and above​

  1. Open chrome://inspect
  2. Click Configure and add a new record with IP_OF_YOUR_WEBOS:9998
  3. Confirm
  4. See new device to show up on the inspect page
  5. Click inspect

Switching Native Debug Mode (inspect)​

Chrome DevTools remote debugging is only available if the Core App is installed with inspectable: true

By default, production builds are not inspectable. To enable inspectable native debugging, signageOS will automatically re-install the application with appropriate debug version.

Behaviour in signageOS platform

When toggling the Native Debug mode a debug version will be installed/uninstalled.

Enable Native debug

-> The device automatically downloads and installs a debug version of the application.

Disabling Native Debug

-> The device reverts back to the production version of the application.

Note: By clicking Open debug console a new tab will open and you can now use Chrome DevTools to inspect the device without the need for chrome://inspect or adding IP manually as in previous methods.

Debug Core App from your own Smart Builder build​

If your LG displays run a Core App that you generated yourself in Smart Builder, you need the debug package from that same build. Installing the standard debug Core App instead would replace your build and remove your bundled applet.

Every webOS build from Smart Builder contains a debug package next to the production one. Box only shows the production links, so this section explains where the debug package is and how to install it.

What a webOS Smart Builder build contains​

Box shows the install link of a webOS build as https://0099.io/<buildId>/0.ipk. The same folder holds these files:

FileWhat it is
0.ipk (copy: com.lg.app.signage.ipk)Production Core App with your bundled applet. The link Box shows for webOS 2.0 and newer.
0.zip (copy: com.lg.app.signage.zip)Production Core App for webOS 1.
0.debug.ipk (copy: com.lg.app.signage.debug.ipk)Debug Core App, installed with inspectable: true so Chrome DevTools can attach.

To get the debug link, take the link from Box and replace 0.ipk with 0.debug.ipk:

https://0099.io/<buildId>/0.ipk → production
https://0099.io/<buildId>/0.debug.ipk → debug

Both packages use the same application ID (com.lg.app.signage), so installing one replaces the other.

Before you start​

  • The build must be based on webOS Core App 2.11.0 or newer. Older builds either have no debug package or cannot switch to it from Box; generate a new build in Smart Builder.
  • The debug package is an .ipk, so it works on webOS versions that install IPK apps. There is no debug package for webOS 1 (.zip).
  • The display must be able to reach https://0099.io.
warning

In builds based on webOS Core App 2.12.1 or older, the debug package is the standard debug Core App of that version. It does not contain your bundled applet, the auto-verification organization or the whitelabel branding you selected in Smart Builder. Install it only on a display that already runs your production build. A display that never ran it shows the verification code and has to be verified manually, and it shows the default screen until the applet arrives from Timings. Builds based on newer Core App versions include all of these in the debug package too.

When you turn on Native Debug, the display keeps the address set in SI Server Setting > Fully Qualified Domain Name, swaps the file name for com.lg.app.signage.debug.ipk, and installs that file. Turning Native Debug off installs com.lg.app.signage.ipk from the same folder:

Address in SI Server SettingNative Debug on installsNative Debug off installs
https://0099.io/<buildId>/0.ipkhttps://0099.io/<buildId>/com.lg.app.signage.debug.ipkhttps://0099.io/<buildId>/com.lg.app.signage.ipk

This only works when that address points at your build, which is the case when you provisioned the display with the link from Box.

  1. 1

    Check the application address on the display

    Open Settings > Ez-settings > SI Server Setting and check that Fully Qualified Domain Name is your build link, for example https://0099.io/<buildId>/0.ipk.

    If it shows a different address (for example https://w.signageos.io/w.ipk, or anything left over from USB provisioning), change it to your build link first. Otherwise the display installs the debug package from that other address instead of your build.

  2. 2

    Turn on Native Debug

    Open the device detail in Box, go to the Troubleshooting tab and turn on Native Debug.

  3. 3

    Wait for the reinstall

    The display downloads com.lg.app.signage.debug.ipk from your build folder, installs it and restarts. If it does not restart on its own, turn it off and on again.

  4. 4

    Connect Chrome DevTools

    Follow the steps for your webOS generation above (webOS 1.0-4.1 or webOS 6.0 and above), or click Open debug console in Box.

Use this on a display that is not connected to Box yet, or when Option A cannot reach your build.

  1. 1

    Open SI Server Setting

    Go to Settings > Ez-settings > SI Server Setting. On older webOS versions, follow the menu path from the LG webOS provisioning guide.

  2. 2

    Point the display at the debug package

    Set Fully Qualified Domain Name to ON and enter your debug link, for example https://0099.io/<buildId>/0.debug.ipk.

    • Application Launch Mode – Local
    • Application Type – IPK
    • Local Application Upgrade – Remote
    • Auto Set – OFF
  3. 3

    Install and restart

    Wait until the app is installed, then turn the display off and on again.

  4. 4

    Turn on Native Debug in Box

    Once the display is online in Box, turn on Native Debug in the Troubleshooting tab. This lets Box know the display runs the debug package and enables the webOS debug mode. The display reinstalls the same debug package from your build folder.

Option C: Install the debug package from USB​

Use this when the display has no internet access.

  1. 1

    Download the debug package

    Download https://0099.io/<buildId>/0.debug.ipk on your computer.

  2. 2

    Copy it to the USB drive

    Rename the file to com.lg.app.signage.ipk and copy it to the application folder on the USB drive, so the path is USB/application/com.lg.app.signage.ipk.

  3. 3

    Install from USB

    Plug the USB drive into the display, open SI Server Setting and set:

    • Application Launch Mode – Local
    • Application Type – IPK
    • Local Application Upgrade – USB

    Wait until the app is installed, then turn the display off and on again.

note

After a USB install, the Fully Qualified Domain Name still holds the previous address. If you later want to switch Native Debug from Box, set it to your build link first (see Option A).

Switch back to the production build​

Do not leave displays on the debug package. An inspectable Core App lets anyone on the same network open Chrome DevTools on port 9998.

  • From Box: turn off Native Debug. The display installs com.lg.app.signage.ipk from your build folder, which is the production build with your bundled applet.
  • On the display: set Fully Qualified Domain Name back to https://0099.io/<buildId>/0.ipk, keep Local Application Upgrade on Remote, and restart the display. Without internet access, repeat Option C with 0.ipk instead of 0.debug.ipk.

Troubleshooting​

In case you won't be able to run the debugging session, make sure that URL with the ip address and port doesn't contain the https protocol. It may block the debugging site. Use only HTTP for the debugging session.

warning

If you are not allowed to open native debug URL in the latest Chrome, launch the Chrome with the following command/flag chromium-browser --enable-blink-features=ShadowDOMV0,CustomElementsV0