Encryption breaks web widget javascript

Hi, I was wondering if anyone had fix/workaround for this,
same issue as here: https://developer.samsung.com/forum/thread/package-web-widget-with-web-application/201/350035?boardName=SDK&listLines=20&startId=zzzzz~&startPage=152&curPage=154

The bug was reported almost 2 years ago but no fix…
https://bugs.tizen.org/browse/TW-69

Thanks
Duncan

Just use obfuscation to hide JavaScript/HTML/CSS in your web app. Last Tizen Studio supports obfuscation (minifying) from the box.

thanks, I’ll take a look at that.

I had the same problem recently. So the issue still exists. Activating encryption broke my widget too. If I copy all the javescript content from the javascript file (main.js) into the html file index.html directly between <script> tags instead of just including the filename there, it works with encryption enabled.
Cheers mate

Thanks Vas, thats good to know.

The issue still exists in Tizen 5.5. Now the problem is, that images are not being loaded in encrypted widgets.

Does anyone have an idea how to fix this?

Hello hellothere,
Images should work, it maybe the url prefix:
./image.png
image.png

Here’s a similar thread:

Duncan

Hi Duncan,

thanks for the link. This works for Tizen 4.0, but not for 5.5.

Here is how you can verify it:

  1. Create the “Alarm Widget” sample project.
  2. Copy all widget js code from *.js files into the widget html file.
  3. Enable encryption.
  4. Run in emulator.

In Tizen 4.0 emulator it runs correctly.
In Tizen 5.0 emulator it doesn’t run at all. Message “Unable to load data. Tap to retry” is shown.
In Tizen 5.5 emulator it runs but without images.

(Tizen 5.0 emulator seems really buggy, not even the watchface is showing correctly.)

I also tried both html src naming schemes: src=“img.png” and src="./img.png". No luck.

If you know a solution, please let me know!

yes an informative article that you shared in the post i am looking for these types of coding tips that will help me to do some smart work i am currently doing fragrance project you can see here and give me some tips about it.