[Sugar-devel] Sugar-web can't find web socket port

Gonzalo Odiard godiard at sugarlabs.org
Tue Feb 25 15:40:07 EST 2014


This patch works for wedkit1 and for webkit2?

Gonzalo


On Tue, Feb 25, 2014 at 5:30 PM, Lionel Laské <lionel at olpc-france.org>wrote:

>
> I've updated the env.js file to use hostname instead of protocol.
> I've send a pull request [1].
>
> How I could test it in "Stand alone" ?
>
>              Lionel.
>
>
> [1] https://github.com/sugarlabs/sugar-web/pull/110
>
>
> 2014-02-25 18:06 GMT+01:00 Gonzalo Odiard <godiard at sugarlabs.org>:
>
> Probably is related to the issue of using webkit1, then http.
>> Maybe the js code can check if the ip is 0.0.0.0?
>>
>> Gonzalo
>>
>>
>>  On Tue, Feb 25, 2014 at 2:02 PM, Lionel Laské <lionel at olpc-france.org>wrote:
>>
>>>
>>> I've tried to analyze more the issue. The problem come from env.js [1],
>>> the env.isStandalone() test return true, so the environment parameter
>>> is an empty object. I'm not sure to understand why this test is need.
>>> What means "Standalone" ?
>>> FYI the method return true because env.getURLScheme() return "http", so
>>> the test condition is false.
>>> Does it mean that the test condition should not be this ?
>>>
>>> Any suggestion about this method is welcome.
>>>
>>>              Lionel.
>>>
>>>
>>>
>>> [1] https://github.com/sugarlabs/sugar-web/blob/master/env.js#L11
>>>
>>>
>>>
>>> 2014-02-24 23:28 GMT+01:00 Lionel Laské <lionel at olpc-france.org>:
>>>
>>> Hi all,
>>>>
>>>> I'm working to merge Sugarizer and Sugar Web API.
>>>> I've just found an issue that I thought it was related to my work but
>>>> that is not because I've found the same issue in the last version of Maze
>>>> Web [1].
>>>>
>>>> The symptom is that the icon don't use buddy color and that the Stop
>>>> button don't answer.
>>>> The trace show that the Sugar Web API don't retrieve correctly the web
>>>> socket port. The port is undefined in bus.js [2]. See the log below -
>>>> tested on last Sugar 0.100 build on XO-4.
>>>>
>>>> I suspect that it come from a recent update of Sugar Web API because
>>>> the problem doesn't appear on the same machine with an older Sugar Web
>>>> Activity like FoodChain [3] - that use an old version of Sugar Web API.
>>>>
>>>> BTW I didn't find why this variable could not be initialized :-(
>>>>
>>>> Any idea ?
>>>>
>>>>                 Lionel.
>>>>
>>>>
>>>>
>>>> [1] http://activities.sugarlabs.org/en/sugar/addon/4727
>>>> [2] https://github.com/sugarlabs/sugar-web/blob/master/bus.js#L19
>>>> [3] http://activities.sugarlabs.org/en/sugar/addon/4612
>>>>
>>>>
>>>>
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:02] "GET
>>>> /lib/sugar-web/activity/shortcut.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/bus.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/env.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/datastore.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/icon.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/activitypalette.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET /lib/rot.js
>>>> HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/palette.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET /lib/text.js
>>>> HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/activitypalette.html HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/domReady.js HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/icons/emblems/arrow-down.svg HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /activity/activity-icon.svg HTTP/1.1" 200 -
>>>> xo-d2-7d-0b.localdomain - - [24/Feb/2014 22:03:03] "GET
>>>> /lib/sugar-web/graphics/icons/emblems/arrow-up.svg HTTP/1.1" 200 -
>>>> ** Message: console message: http://0.0.0.0:36408 @0: Invalid url for
>>>> WebSocket ws://localhost:undefined
>>>>
>>>> ** Message: console message: http://0.0.0.0:36408/lib/sugar-web/bus.js@19: SYNTAX_ERR: DOM Exception 12: An invalid or illegal string was
>>>> specified.
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Sugar-devel mailing list
>>> Sugar-devel at lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>>
>>
>>
>> --
>> Gonzalo Odiard
>>
>> SugarLabs - Learning Software for children
>>
>
>


-- 
Gonzalo Odiard

SugarLabs - Learning Software for children
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20140225/663c9561/attachment.html>


More information about the Sugar-devel mailing list