FAQ

Technical FAQ [Debugging] Web Inspector not working on Chrome v54 02-Mar-2017

You will encounter the following issue while using the Web Inspector to debug your app on Chrome v54.

ISSUE

A command entered on the console gets submitted but is not executed.

CAUSE

The keyboardEvent.keyIdentifier property, which receives the Enter key event, has been deprecated on Chrome.

TEMPORARY SOLUTION

Use Chrome versions listed below:

Technical FAQ [General] I removed the source element from the played video element and added a source element with a new video content. But the video would not play 13-Jun-2016

If you are experiencing this problem, you have probably replaced the source element to change the video content, similar to below:

// JavaScript Code
function changeSource() {
    var element = document.getElementById("myVideo");
 
    // Remove all source elements
    while (element.firstChild)
        element.removeChild(element.firstChild);
 
    // Add a new source element
    var source = document.createElement("source");
    source.setAttribute('src','./video/multi-soundtrack.mp4');
    source.setAttribute('type','video/mp4');
    document.getElementById("myVideo").appendChild(source);
}
 
<!-- HTML Code -->
...
<video id="myVideo">
    <source src="./video/oceans-clip.mp4" type="video/mp4" />
</video>

 

If you are an experienced webOS TV app developer, you might wonder why the above code which worked smoothly on webOS v1.x and v2.0 all of a sudden doesn’t work on webOS v3.0.

As you know, source element is used for playing Mpeg, HLS, and DRM format content. According to the HTML5 specification, if the readyState of HTMLMediaElement is not HAVE_NOTHING, the source element cannot be changed or removed. During the video playback, readyState is usually set to a value other than HAVE_NOTHING . However, WebKit used on webOS TV v1.x and v2.0 does not support readyState, and keeps the readyState value to HAVE_NOTHING (NULL). With the release of webOS TV v3.0, WebKit is replaced by Blink, which fully supports readyState.

 

This means that the readyState status needs to be considered before changing the source element. We recommend using the load() method for initiating readyState as below:

 

// JavaScript Code
function changeSource() {
    var element = document.getElementById("myVideo");
 
    // Remove all source elements
    while (element.firstChild)
    element.removeChild(element.firstChild);
 
    // Initicating readyState of HTMLMediaElement
    document.getElementById("myVideo").load();
 
    // Add new source element
    var source = document.createElement("source");
    source.setAttribute('src','./video/multi-soundtrack.mp4');
    source.setAttribute('type','video/mp4');
    document.getElementById("myVideo").appendChild(source);
}
<!-- HTML Code -->
...
<video id="myVideo">
    <source src="./video/oceans-clip.mp4" type="video/mp4" />
</video>
Technical FAQ [General] I've added an event handler for video element but looks like it doesn't work. What is the problem? 03-Jun-2016

In webOS TV 1.x and 2.0, when the event occurs, only the event handler using the addEventListener() function can be called. If you have added an event handler as a property type, it will not work correctly. For the compatible code, you MUST use addEventListener() to add an event handler, as below:

 

Do not:

vid.onloadeddata = function (event) {
    log(JSON.stringify(event));
});

 

Do:

vid.addEventListener("loadeddata", function (event) {
    log(JSON.stringify(event));
});
Technical FAQ [webOS TV IDE] When the webOS TV IDE has been freezed during launching. 01-Feb-2016

When the webOS TV IDE has been freezed during launching and the progress bar does not move any more, follow the next steps.

  1. Delete the following old config files:
    • C:\Users\[User Name]\AppData\Roaming\.webos
    • C:\Users\[User Name]\AppData\Roaming\.ares
  2. Re-start webOS TV IDE.
This can be occurred when you are using Windows 64 bit OS.
Technical FAQ [SDK Installation] When Installer does not launch after updating or shut-down 26-Jan-2016

This error is caused by broken config file. To solve this problem, follows the next steps:

  1. Remove the config file. 
    [Windows] C:\Users\Public\lgsdkTvregistery\.webosTVregistery.xml
    [Mac OS] /var/.lgsdkTvregistry/.webosTVregistry.xml
    [Linux] /.lgsdkTvregistery/.webosTVregistery.xml
     
  2. Retry installation.
Technical FAQ [Web Storage] Local storage data removal at app removal or uninstallation 24-Nov-2015

If you are using local storage in your app, you should notice that the data in the local storage is also deleted when your app is updated or removed on webOS TV. You would better use your (remote) server if you want save data forever. See Web Storage (HTML5 API) and Web Storage (sample) for your reference.

Technical FAQ [Enyo App] The app is not working on Google Chrome 20-Oct-2015

When you test the sample app on local machine in Google chrome, it may not be loaded normally. Then, you should use the --allow-file-access-from-files option when you run the sample on Chrome browser. The followings show how to do it on various operating systems.  

 

Windows

  1. Get the url of your Chrome Installation path to your chrome installation 
    e.g C:\Users\-your-user-name\AppData\Local\Google\Chrome\Application>
  2. Launch the Google Chrome browser from the command line window with the additional argument ‘–allow-file-access-from-files’.
    E.g ‘path to your chrome installation\chrome.exe --allow-file-access-from-files
  3. Temporary method you can use each time you are testing
    - Copy the existing chrome launcher
    - Do as above and save it with a new name e.g chrome - testing
    - Alternatively, you can simply create a new launcher with the above and use it to start chrome.


Linux (Ubuntu)

  1. Go to the menu entry/ launcher for Chrome (.desktop file)
  2. Open the launcher properties dialog.
  3. It should look something like this: ‘/usr/bin/google-chrome %U
  4. Change it to ‘/usr/bin/google-chrome --allow-access-from-files‘ to make the flags work permanently
  5. You may also need to delete and re-pin your launcher(s) after modifying it. Chrome should launch with the specified flags enabled after the modification.

 

Mac OS X

  1. Open your terminal anywhere, make sure Google Chrome is currently not running.
  2. Copy paste this line and hit enter:
    open /Applications/Google\ Chrome.app --args --allow-file-access-from-files 
About Site [SDK] FAQ on Installing SDK 15-Jul-2015

Q1. When uninstalling SDK, "java.lang.NumberFormatException: For input string: """ error occurs. 

This error is caused by some problem in config file data. To figure out the problem, we should check the log file generated in the webOSLogs folder which is placed under the webOS_TV_SDK\Uninstall folder. 

To proceed the uninstallation anyway, you should manually uninstall the SDK by following next steps.

  1. Remove the config file. 
    [Windows] C:\Users\Public\lgsdkTvregistery\.webosTVregistery.xml
    [Mac OS] /var/.lgsdkTvregistry/.webosTVregistry.xml
    [Linux] /.lgsdkTvregistery/.webosTVregistery.xml
  2. Remove the webOS_TV_SDK folder which is located in the installation path.
  3. Remove SDK program file links and icons.
  

Q2. After I reinstall the patched webOS TV SDK v2.0.0, the Emulator v1.2.0 is not executed normally. Only remote control emulator is launched and emulator screen is not launched. 

If this case, please follow next steps.

  1. Uninstall the webOS TV SDK first.
  2. Start Oracle VM VirtualBox Manager. 
  3. Select virtual machines for webOS TV Emulator 2.0.0 and webOS TV Emulator in the left pane and click Remove menu.
  4. Open Virtual Media Manager and remove LG_webOS_TV_Emulator.vmdk files.
  5. Reinstall the SDK.

 

Q3. "Emulator Script Failed" occurs during webOS TV SDK v2.0.0 installation on Windows 7  

If "Emulator Script Failed" error occurs during webOS TV SDK v2.0.0 installation, it may be a problem of system path environment variables. 

Follow the next steps:

  1. Run Cmd.exe as administrator.
  2. Check the location and confirm execution of wmic: C:\Windows\System32\wbem\WMIC.exe
  3. Execute wmic sysaccount where sid='S-1-5-11' get name in the command line.
  4. If it works, check whether C:\Windows\System32\Wbem; is in the path environment variables.
  5. If C:\Windows\System32\Wbem; is not in the path environment variables, add on to it.
  6. Run the SDK installer as administrator.

 

To refer to wmic, see https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx.

  

Q4. "Exception in thread "Thread-3"" occurs during webOS TV SDK installation on Mac OS 

You can solve this issue by downloading and installing Java for OS X 2014-001. For more information, please visit here.

 
Technical FAQ [App Submission] Where can I download the updated self checklist template for App QA? 11-May-2015

Download the documents_for_app_qa-v3.4.zip file, which is used for app submission.

 

Required Documents for Application Submission to LG Seller Lounge has been updated. (version 3.1)

From May 26th, 2015, apps submitted for app QA accompanied by the previous version of the self checklist will NOT be approved. Please make sure to download and use the updated version to avoid delays.

 

The file is provided at LG Seller Lounge site.

App Management > App Submission > App Info > Product Information > Click ? Mark > Related Papers Link

 

Technical FAQ [UX] What should I check for making the app icon? 25-Oct-2016

You should check the Iconography article to avoid mistake when you make app icon.

  • Especially, see the 'Icon format and positioning' as below:
  • Icons should be imported in a JPG, GIF or PNG (recommended) file format.
  • Do not set the background color of app icon transparent.
  • The icon should have at least 5 px padding inside the icons. If you don’t have a padding in your 80 x 80 and 130 x 130 area, your logo will be not be displayed in a proper format.
  • The icon should be placed around padding space such that the icon will fit nicely on the panel without being to close to any of the edges.