Message Boards Message Boards

HTML Embedded CloudDeployed Manipulate Session times out

Posted 10 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

Your first link works fine for me.

I get a "this file is locked" message at the bottom of the screen (odd, but not a critical issue).

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

Hi Chad,

For some reason your iFrame is not loading at all for me at the moment... it may be the WIFI network at the coffeehouse where I currently am. I will check later on from home. Note though that Pieter van Bijnen did encounter the issue, but after about a half hour. I am going to continue to do some more experiments as well.

Here is an example of a URL for an example that I just generated--I have unlimited credits as well so we can use that to see if there is the same experience for all:

http://initialsingularity.com//embedding.html

When I run this I get the Session Time out right away.

Here is the "raw" Wolfram Cloud link for comparison:

https://www.wolframcloud.com/objects/d3795533-4a49-4dc3-b55b-a33653c0fa2e

Let me know what your experience it...

Thanks! -David

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

Thanks for checking this Pieter!

When I run your version of the HTML I also get a Session Expired notice for your URL. (By the way, you may want to now delete that URL if you haven't so that when others check it it doesn't use up your cloud credits.)

I will file this as a bug report.

As for the WolframCLoud branding. I believe that it is there because in effect the iFrame is just containing a WolframCloud notebook which has the footer with the branding.

POSTED BY: David Reiss

Did some more investigation. It takes about 30 min for a Firefox browser to display the message session expired and then show the cloud logon page (on OSX and on windows). Chrome shows also the session expired but auto picks up a new session when you click restart. So no ugly wolframcloud startscreen.

I could go into Firefox and type "about:config" to get into the parameter settings and change the time-out or redirect setttings. This is not really a solution because I can not change the browser setting for a customer.

IE only shows a gray Wolfram Cloud area. Can't figure out why the manipulate object is not there. No error messages are shown...

Hello David,

I replicated your example in two ways. First by adding the code via my Netobjects web tool and second by generating a html file identical to yours but with my own cloudlink pasted in. The results are different compared to yours.

In both setups the manipulate appears nicely in a firefox or chrome browser. For unclear reasons the cloud wolfram object appears in the IE browser but not the manipulate object.

I've tried to trigger a timeout message. After 10 minutes of inactivity this does not happen.

The really strange thing is that it also does not happen with your original html code. I only pasted in my cloud object.

<!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/YOUR_OWN_GENERATED_ID?_embed=iframe" width="500" height="500" > </iframe>
<p>And following is this bit of text.</p>
</body>
</html> 

All browsers are on the latest versions and on windows 7 64.

About the wolfram branding. No idea how to get rid of this. No other programming language does it this way. Lets ask WL support.

So, an update to this (unsolved) issue.

The first time I try to use the given embedded web page, it works. Then if I open it up in a different browser, or quit the current browser and re-open it in that browser (or sometimes just wait and reload it in the same browser) it does not work and exhibits the behavior I indicated above.

It first opens and generates this screen:

enter image description here

and then, on its own, changes to this:

enter image description here

Any ideas O' denizens of the group?

This behavior makes embedding Wolfram Cloud content completely unusable.

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

Group Abstract Group Abstract