-
Bug
-
Resolution: Fixed
-
Normal
-
9.5.0.1
-
Security Level: Jimmy
-
None
Steps to Reproduce
initiate multiple embeds simultaneously
<!DOCTYPE html> <html lang="en"> <head> <title>Embedded ZK Minimal</title> <script id="embeddedScript" src="http://localhost:8080/zkembedded-app/zkau/web/js/zkmax/embedded/embedded.js"></script> </head> <body> <h1>Multiple-Embeds</h1> <div id="zkapp">Loading ZK ...</div> <div id="zkapp2">Loading ZK ...</div> <script> zEmbedded.load('zkapp', 'http://localhost:8080/zkembedded-app/multiple-bug.zul') .then(function(result) { console.log('zkapp', result); }) .catch(function(error) { console.error(error); }); zEmbedded.load('zkapp2', 'http://localhost:8080/zkembedded-app/multiple-bug.zul') .then(function(result) { console.log('zkapp2', result); }) .catch(function(error) { console.error(error); }); </script> </body> </html>
Current Result
resources are downloaded multiple times
page simply freezes
no error message
Expected Result
resources only loading once
possible to start multiple embeds in parallel
(at least client side) error logs in case a problem occurs
(also consider preventing/report multiple conflicting ZK versions)
Debug Information
ZK's wdp resources are loaded multiple times ... potentially causing initialization problems
It also looks like requests are sent using different session IDs
Workaround
delay the second embed (works - but still downloads wpd files again)