I am trying to deploy a very simple animation on the cloud, but it does not show up.

This is the deployment with the full code

Does anybody know why this may be?

For context, the Mathematica file has simply two lines (exactly as in the link above):

sol[t_]=theta[t]/.DSolve[{theta''[t]==-Sin[theta[t]], theta[0]==-1, theta'[0]==0.1}, theta,t][[1]];

To deploy to the cloud I clicked File: Publish to cloud.

  • $\begingroup$ The code works fine on my laptop. How did you deploy it to the cloud? $\endgroup$ Jul 5, 2021 at 17:38
  • $\begingroup$ Initially, I see a pink output, then it goes away after 2 seconds. This means it found an issue. On the PC, there is no initial pink output and it works OK. This means the cloud is having problem with it for some reason. You can report this to WRI. $\endgroup$
    – Nasser
    Jul 5, 2021 at 17:40
  • $\begingroup$ @DavidG.Stork yep, the code itself is fine on my laptop. I just did File: Publish to cloud and used the default settings. $\endgroup$ Jul 5, 2021 at 17:53
  • $\begingroup$ Please show your cloud deployment code, as that is surely the source of your problem. $\endgroup$ Jul 5, 2021 at 17:54
  • 1
    $\begingroup$ I suspect you need to initialize sol. Have a look at the Initialization option of Animate, or simply use With as follows: With[{sol=DSolveValue[{theta''[t]==-Sin[theta[t]],theta[0]==-1,theta'[0]==0.1},theta,t]},Animate[...]] $\endgroup$ Jul 5, 2021 at 18:55

1 Answer 1


This was answered for me on the Wolfram community, though @GeorgeVarnavides suggestion of using With also worked.

The answer is to use SaveDefinitions->True within Animate:

sol[t_]=theta[t]/.DSolve[{theta''[t]==-Sin[theta[t]], theta[0]==-1, theta'[0]==0.1}, theta,t][[1]];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.