Hosted Web Application Issue - Black Screen on TV

When running our web app on our test TV it always only displays a black screen. We have tried a hosted web app and a built in web app, and both had the black screen. On the emulator both types of applications work. Our TV is version 3.0, while the only available emulator is 6.5. I don’t believe this is the issue because the documentation says hosted applications work on 3.0. We tried downloading the older emulators but they would never even launch. We have created a certificate and allowed all network calls. <access origin="*" subdomains=“true”/> I have seen the sample Tizen application run on the TV so I don’t believe there is anything wrong with the TV.

We are unsure what “content-security-policy” we need and have tried a few but none worked. When we run the app on the TV we see that it is able to get the scripts for our hosted application, but they are never executed. The network tab shows the call to our script succeeds, but no logs show up. The first thing our script does is log something to the console. The non-hosted version also never makes this log. This seems to me like we have an issue with our content-security-policy, possibly relating to script-src, but we aren’t sure what needs to be done to make it work.

We also noticed in this document “https://developer.samsung.com/smarttv/develop/faq/hosted-applications.html” that it says we need permission from Samsung to create a hosted application. Does this have to be included in the certificate to run it on the TV? What is the process for getting this approval? We have tried a built in web app, so I assume this isn’t our current problem but I could be wrong. We would strongly prefer a hosted application over a built in web application if at all possible.

(I’ve added a space after http so it doesnt shorten it to a link, that is not actually in the config.)

<?xml version=*"1.0"* encoding=*"UTF-8"*?>

<widget xmlns:tizen=“http ://tizen.org/ns/widgets”* xmlns=" http ://www.w3.org/ns/widgets" id=“[our. domain]/AngularTizen”* version=“1.0.0” viewmodes=“maximized”>
<access origin=""* subdomains=“true”/>
<tizen:application id=“[ourID].AngularTizen” package=“[ourID]” required_version=“2.3”/>
<content src=“index.html”/>
<feature name=“http ://tizen.org/feature/screen.size.all”/>
<feature name=“http ://tizen.org/feature/screen”
/>
<feature name=“http ://tizen.org/feature/network.ethernet”/>
<icon src=
“icon.png”/>
AngularTizen
<tizen:privilege name=“http ://tizen.org/privilege/tv.inputdevice”/>
<tizen:privilege name=“http ://tizen.org/privilege/productinfo”
/>
<tizen:privilege name=“http ://tizen.org/privilege/package.info”/>
<tizen:privilege name=“http ://tizen.org/privilege/application.info”
/>
<tizen:profile name=“tv-samsung”/>
<tizen:setting screen-orientation=“landscape” context-menu=“enable” background-support=“disable” encryption=“disable” install-location=“auto” hwkey-event=“enable”/>

We have also tried at different points including the following with no success:

<tizen:allow-navigation>our.domain *</tizen:allow-navigation>
<tizen:content-security-policy>default-src *; script-src *; style-src *; object-src *;</tizen:content-security-policy>

TV Model Code: UN43MU6300
Software Version: T-KTMACUC-1310.1 , BT - S

Try asking this on the Smart TV Seller Office Q/A site. They prefer to do the support there so they can track issues better.

Ron
Samsung Developer Relations

Hi kevinf, did you find solution? Im struggling with same problem…

Hello,

Did you ever find a solution for this issue?

Hi @kosso @tomasz.szewczyk, did you manage to find a solution for this issue? :slight_smile: I’m facing the same issue now where the hosted app works in emulator but shows blank screen on a TV device…

My original issue that I posted this for was that the tv I was testing on was too old to run a hosted app. I think it was running 3.0 or something like that.

It would be really nice if the platform gave reasonable error messages rather than just failing the same way for many causes and telling you nothing.

I think it had something to do with the JavaScript version each tv supported.

1 Like

Hi @kevin.f, thank you so much for your reply!

Would you have any idea how to download the emulators for older Tizen versions? The TV that I tested on was running 5.0 while the emulator I was using was 8.0, maybe hosted web apps don’t work on 5.0 (although 5.0 seems pretty recent to me…)?

As a side question, did you manage to get your hosted web app all the way to production?

Hi. I have still not been able to resolve this issue since my physical TV device is only running Tizen 4.0 (which means Chrome version 56!)

When I try to run the hosted app on the device, it opens up in the built-in TV web browser app, rather than as it should.

Also, I’m not sure if we have the correct ‘privilege’ to run as a hosted app. And the Q&A 1:1 support is not very helpful at all.

For hosted apps, be sure to add the domains it needs to access in your config.xml

eg: <tizen:allow-navigation>example.com *.example.com</tizen:allow-navigation>