Group Abstract Group Abstract

Message Boards Message Boards

HTML Embedded CloudDeployed Manipulate Session times out

Posted 11 years ago

Create an EmbedCode to use in an HTML page as in the following:

EmbedCode[
 CloudDeploy[
  Manipulate[
   Plot3D[Cos[x y  \[Delta]] (\[Delta] + x y), {x, -6, 6}, {y, -6, 6}],
   {{\[Delta], 0}, -2, 2}], Permissions -> "Public"], 
 ImageSize -> {500, 500}]

(Note that EmbedCode has a bug -- which is a known bug -- in that it does not generate an iframe code with a closing

</iframe>

tag, so one has to remember to add that)

Now place this iframe script in an HTML page. For example here is an example HTML page's code for this where you will need to add the appropriate URL for the cloud object generated above replacing the https://www.wolframcloud.com/objects/XXXXX below:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>Test CloudDeploy Manipulate Embedding</title>
</head>
<body>
<h2>A Start</h2>
<p>This is a bit of text before the embedding code. </p>
<iframe src="https://www.wolframcloud.com/objects/XXXXX?_embed=iframe" width="500" height="500" > </iframe>
<p>And following is this bit of text.</p>
</body>
</html> 

I find that most of the time when I create this web page and open it in a browser, the Manipulate first appears in the iframe and then a small popup appears saying that the session has expired before one can do any computation--it is then replaced with the Wolfram Cloud login page.

However the URL in the script (the https://www.wolframcloud.com/objects/XXXXX) works fine if it is simply used alone in a browser.

Also, as an aside, the iframe contains Wolfram branding on the bottom. Is there any way to get rid of this? It's quite inappropriate in any document that I would want to place on the web.

POSTED BY: David Reiss
14 Replies

Yes, that is the experience I generally get: first the Manipulate briefly displays, then the time out message appears, and then shortly afterwards the Cloud login page appears.

I also experience times with a page working in one browser while it does not work in a different browser.

POSTED BY: David Reiss

here you go

Pieter: your images did not display in your last post.

Also I wonder if this is a Cookies issue with regard to what the browser(s) think are 3rd party cookies.... and what the user has set for their browser insofar as accepting or not accepting 3rd party cookies....

Just a thought.

POSTED BY: David Reiss

Chad, David, I went back to the original example as David created in his very first post. I am on win 7 64 firefox. I display the html page and waited for an hour. After an hour without touching a key it show this.

enter image description here

firefox does not show the session expired message! Next I drag the slider and it biefly (1 or 2 sec) shows the session expired message and then shows this:

enter image description here

It show the wolfram cloud login page. This should not happen at all after a timeout.

But there is more. When I start Internet Explorer on win 7 64 I get this on Davids original html file:

enter image description here

Lets try the "family tandems" example in win 7 64 Internet exporer 11. It shows like this:

enter image description here

So "family tandems" does not work in IE11 and does work in Chrome and Firefox. Something is going on...

Chad, David, after 30 to 45 minutes i get this screen (in firefox). When clicking "start new session" it continues. So no problem

enter image description here

yesterday this screen changed in the wolframcloud.com page. Are you on the same release version of the cloud. When I type $Path in a cloudnotebook it results in 10.0.1-5157632-1 as the kernel release.

Just rechecking things now that I am back home. I am also getting all the various FindRoot messages at the bottom of Chad's Manipulate (not an issue of course can can be suppressed by a Quiet presumably). Otherwise Chad's page is working for me at the moment. Mine also is currently not exhibiting the issue.

Note that I have also done various things in the past such as clearing caches, removing appropriate cookies, etc...

Strange....

And then I try Chad's page in Chrome and I get the Session Time out message right away.

POSTED BY: David Reiss
POSTED BY: Chad Knutson

Ok, I just checked your blogspot link and also get a Session Expired for your iFrame. Hmmmm.... puzzling...

POSTED BY: David Reiss
POSTED BY: David Reiss

David, I'm not able to reproduce your issue either. I'm using webMathematica on my local machine to host the web page, and I opened the web page in both chrome and firefox without issues.

I also put a manipulate on my blogspot blog that doesn't seem to have problems. [Aside, I have unlimited cloud credits, so don't worry about checking this.]

Also, perhaps the lack of closing iframe tag is sloppy, but the raw code works for me.

POSTED BY: Chad Knutson
POSTED BY: David Reiss
POSTED BY: David Reiss
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard