New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sugarizer activities failed on Sugar 0.110 #116
Comments
Thanks for your suggested fix referring to sugarlabs/sugar-web@e17b17d ! |
I think the error happens before, at the stage of setting the environment, because by the time execution reaches this WebSocket request, it wants a |
Correction, the javascript console error does not disappear when changing 127.0.0.1 to 0.0.0.0. |
I've tested with LastOneLoses activity on Sugar 0.110.0.olpc.1 on a XO-4 and it works. No message, icon is colored. |
Ok, I figured out the failure condition. It's when running with the Webkit2 backend. Initially I thought this was a failure of sugar-web (sugarizer flavour) - but it turns out that the same code runs well enough on Webkit1 codepath. Steps to test:
It's not visible on XO because on XO it uses Webkit1 by default for some reason (I tried the Webkit2 on a XO1.5 and it cause a segmentation fault - I guess that's the reason). |
I'm guessing sugar-web's environment detection is wrong on Webkit2 sugar backend for some reason. |
Okay. So it means that it's more a sugar-web issue than a Sugarizer issue. When running on Sugar, Sugarizer activities rely on Sugar Sugar-Web implementation thought I have to report back some recent fixes (like the one mention earlier). |
I thought so too and was just actually writing this to https://github.com/sugarlabs/sugar-toolkit-gtk3/issues/new except then I tried the version in https://github.com/sugarlabs/sugar-web and it works both in Webkit2 and Webkit1 so I guess compatibility with Webkit2 was lost somewhere in https://github.com/llaske/sugarizer/tree/dev/lib/sugar-web . . I also tried changing 127.0.0.1 to 0.0.0.0, by the way, but the same error |
Ok. Not a problem. I leave this issue open. When there will be a fix available on the sugar-toolkit side, I will fix too on my side. |
Except it's not possible to report an issue with |
Currently I made the |
Very nice. I'm going to report this fix in all Sugarizer activities. |
I'm creating my first web activity and I've used the ActivityTemplate
from Sugarizer repository.
However I'm failing to get my activity to run under Sugar.
The same happens when I try to run any of the Sugar-web activities
contained in
activities/
directory of Sugarizer repository.However when I download Markdown.activity from ASLO, I am able to run it.
The failure consists of the activity icon not becoming colored and no
datastore object being created. Furthermore, there are no errors in the
Sugar logs that I can find.
I'm testing with Sugar 0.110 as packaged in Debian Testing.
Indeed there is an error in the Inspector Javascript Console:
[Error] Invalid url for WebSocket ws://127.0.0.1:undefined
(anonymous function) (sugaros.js:19)
(anonymous function) (env.js:29)
[Error] SyntaxError (DOM Exception 12): The string did not match the expected pattern.
(anonymous function) (sugaros.js:19)
(anonymous function) (sugaros.js:19)
(anonymous function) (env.js:29)
This can be reproduced by copying any activity (above is from Stopwatch.activity) into ~/Activities in a Sugar Desktop.
When I switch the lib/sugar-web directory for the official sugarlabs/sugar-web, then it works fine in Sugar 0.110, but then, it doesn't work in Sugarizer anymore.
The text was updated successfully, but these errors were encountered: