Samsung / TAU

TAU (Tizen Advanced UI) project for supporting web app development based on web-based ui widget components library
Other
49 stars 42 forks source link

ns.history.replace throws error in older Tizen versions when opening a popup #1045

Open martijnvankekem opened 4 years ago

martijnvankekem commented 4 years ago

[Error] lib/tau/wearable/js/tau.js (5400) :DataCloneError: DOM Exception 25: An object could not be cloned. [TAU Version] 1.0.27 [Tizen version] 2.3.2 (emulator tested) [Steps to reproduce] Create a popup. Open and close it multiple times. The error will be thrown.

It does work with newer Tizen versions.

According to https://www.nowherenearithaca.com/2013/07/solved-chrome-web-workers-and.html:

A quick google led me to this stack overflow post. It turns out that the problem was that I was passing an object that had functions/methods from the web worker back to the main script (via postMessage). The cross-process serialization mechanism for web workers can only handle "stringifiable" things. The Safari browser can't do this, either, but it just silently sets those properties of the object to null rather than stop working altogether. So, I added a method on the relevant object that returned its non-function properties, and passed that stuff back from the web worker. It then worked fine on Chrome.

HunseopJeong commented 4 years ago

@martijnvankekem, Sorry for late answer. Could you share your test code? I tried to open and close popup multiple times on TAU UICoponents on 2.3.2 wearable. There was a no error messages.