Tizen Studio build for Web App takes 30 mins

I installed Tizen Studio 4.1 on MacOS Big Sur over the weekend to build a Tizen Web App for Smart TVs.
I had no problems building my app with Tizen Studio 3.7 on Catalina, but since my upgrade to 4.1 and Big Sur, the “Build before launch” step takes forever, sometimes up to 45 minutes.

I already searched a lot, but non of the suggestions I found for similar problems with Eclipse had an effect for me (disabling validators, increasing memory in eclipse.ini etc.).

I also rebooted several times, and completely reinstalled Tizen Studio, unfortunately without any effect.

I’d be really thankful for any idea of how to proceed.

1 Like

Hi Fas,

Are you still having this issue? I have not seen any bug reports of this. My thought is you are trying to access something from the cloud. The only other thing I can think of is you don’t have enough memory and it is paging a lot.

Ron
Samsung Developer Program

Hi Ron,

Thank you for your answer. Unfortunately, we still have this issue, yes.
However, we don’t access anything from the cloud, but simply want to build the the app from an existing JS bundle. The bundle has 18.4 MB, so it’s not the smallest, but everything was running smoothly with Tizen Studio 3.7 on Catalina.
So the only two things that changed are the Tizen Studio and the macOS versions.
Both my colleagues who tried to build everything on their now upgraded systems experienced the same problems, unfortunately.
Our machines have sufficient memory (16 GB), and we tried changing the eclipse.ini config to allow for more memory usage:
-XX:MaxPermSize=1024M
-XX:MaxNewSize=128M
-XX:NewSize=128M
-Xms1024m
-Xmx2048m

Our bundle contains React code, packaged by Webpack. Is it possible that this is a problem of JS code validation?

We now use the CLI to build and install the app. This works fine, so it really seems to be a problem with Tizen Studio.
The only drawback now is that I couldn’t find a way to attach a debugger to the app via CLI.

Hi Fas,

I don’t have any solution for you, did you try the Tizen CLI documentation?
and SDB documentation?

Hope those help,

Ron
Samsung Developer Program

We also have this problem. As we don’t get any console logs from our webapp using a Tizen 3 TV using the CLI, SDB and Chrome inspector (which works for Tizen 5.5+ for us) we have no way to get the logs.

And building takes as you say forever and finally resulted in “out of memory error has occurred consult the running eclipse”…

We also ran into this problem. Tizen Studio is incapable of handling big JavaScript files, such as the main bundle from a medium-sized React app. We also went with the CLI and were able to deploy the app quickly. To enable debug, here is the build process we followed:

  1. Go to the project root in a CLI (Powershell or cmd for PC) and run tizen build-web -- .
  2. cd .buildResult
  3. tizen package -t wgt -s <YOUR_PROFILE> -- . where <YOUR_PROFILE> is the name of the security profile you entered.
  4. tizen install -n <YOUR_PROJECT>.wgt -t <YOUR_DEVICE_NAME> -- . Where <YOUR_PROJECT> is the name of the project and <YOUR_DEVICE_NAME> is the device name in the Device Manager.
  5. cd .. to return to the project root
  6. sdb -s <YOUR_DEVICE_IP>:26101 shell 0 debug <YOUR_PACKAGE_ID> where <YOUR_PACKAGE_ID> is the package name created in the install step and the value of -s is the value on the left when you run sdb devices. For example: 10.0.0.12:26101 device UN32M4500BLECH The “serial” is the IP with port, even though that’s definitely not a serial number. If you only have one device, you can omit the -s param altogether. This command should launch the app you just installed and return a port number, like: ... successfully launched pid = 3081 with debug 1 port: 33962
  7. sdb forward tcp:33962 tcp:33962 where 33962 is the port you received from the previous command. This step doesn’t seem to be needed, but it didn’t hurt.
  8. In Chrome, open up the URL chrome://inspect
  9. Click configure and add a new device by its IP and port that you just got: <YOUR_DEVICE_IP>:33962. Click Done. Once you have added it, wait a few moments and hopefully a new device will appear in the inspect list.
  10. Click on Inspect and you should get a Chrome inspector linked to the app running on the TV.

We just figured this out, so hopefully this solution continues to work :crossed_fingers:

4 Likes

Dude!!! thank you… I had been debuging this for sometime

Wow, I was looking for it for so long, finally receiving logs now.

I have one other question. I googled it alot, but there is a very little support regarding Tizen development.

I am using https://enactjs.com/ An app development framework built atop React to develop TV apps. It is typically developed for LG TVs.
I have observed that there is lag in my scrolling lists generally.
Does anybody can tell how can I handle this scroll lagging issue. There is no jitter/lag in navigation etc. it is just in list scrolling.

Hi,
If you are building a React App that you want to run to Samsung Smart TVs and you notice that building before running on the TV takes too long, here is a confirmed solution that works for me.

Tizen Studio seems kind of weird about file placement. Trying to have the config.xml file at the root, yet pointing to the location of ./build/index.html seemed to confuse it.

The way I’ve done it is this:

  • Create your react app.
  • Set homepage key inside of package.json to ./ so that asset file paths are generated relative to index.html and not absolute.
  • Run a production build yarn build (or npm run build) to generate a ./build folder.
  • Start a new Tizen Web app pointing to the ./build folder of react app. This requires expanding “More Properties” where you enter your project name, and unchecking default location (so that you can browse to your ./build folder). You should be able to follow the Tizen documentation for everything else Tizen-related.
  • Copy the generated Tizen web app files (icon.png, .settings, .project, config.xml, .tproject) into ./public folder of react app, so that they get copied over after every build. Note that the Tizen dot files won’t show in Tizen Studio and you should copy them from a file explorer that will display them. In Tizen Studio, only this ./build folder will show as part of your project, and should only be used for running build/debug/run actions. Any changes to Tizen app configs, etc. should be done in ./public folder of react app or else they’ll get overwritten after every build.
  • Disable validators in Tizen Studio preference Tizen Studio/Web/Editor/Javascript Editor. With this enabled, the builds choked when validating the minified code during the build.

Original source of the above solution provided: