---------- Forwarded message ---------- From: "mukund code" <mukund.c...@gmail.com> Date: 18 Jan 2016 20:02 Subject: Re: [Sugar-devel] Getting a few errors when following tutorials given in the Write your Own Activity page To: "Sam P." <sam@sam.today> Cc:
Hi Sam, That's funny. 301 shouldn't be an error, 3xx codes are redirect codes [1]. I don't involve my self with too many crazy nodejs things, but presenting a 3xx code as an error sounds well within the relm of possibility for some of these funny libraries. Apologies for the statement about the 301. I should have rather said,trying the command volo add webL10n gave me a 301 status: Using github repo "fabi1cazenave/webL10n" for "webL10n"... Downloading: https://codeload.github.com/fabi1cazenave/webL10n/legacy.zip/master raw.github.com/volojs/repos/master/fabi1cazenave/webL10n/amd.json returned status: 301. Which pretty much resulted in a failure to install webL10n via the command, which led me into trying the second command. Did the info at [2] help? The link suggests, that the error could be due to errors in setting up the path configuration. I hadn't tried to modify any of the path config files, so I really don't think the error could be because of that. Where did you put the console.log statements in the code? Were they within the require.js callback? If so, maybe your problems are all interconnected. Just to simplify things a bit, I decided to create a new project with no code additions from my side at all, except for the change in activity/ activity.info where I change the Activity name and bundle_id. The error came up again. So, it seems like the error exists when you install the app out of the box. I did manage to fix the issue though: I manually installed webL10n again, this time with a different URL volo add github:sugarlabs/webL10n/master which gave a successful install and removed the LoadError for webL10n that I was getting. But there was a new LoadError that popped up now, which looks very similar to the last one: Load timeout for modules: domReady!_unnormalized2, domReady http://require.js.org/docs/errros.html#timeout onError onError checkLoaded (anonymous function) So, I just did a volo add domReady and the app works fine now. I happen to look into the sugar-web-template folder that was used to create the app in the first place using the volo create my-activity ./sugar-web-template and in its lib/ , it doesn't have domReady.js or webL10n.js In retrospect, would it be a good idea to add the two files (domReady.js or webL10n.js) into the folder on the sugar repository so that people won't have this problem when creating their apps from the template? Cheers, Mukund On Mon, Jan 18, 2016 at 3:53 PM, Sam P. <sam@sam.today> wrote: > > Hi Mukund! > > On Mon, Jan 18, 2016 at 5:24 PM, mukund code <mukund.c...@gmail.com> wrote: >> >> Hi guys, >> >> I am new to Sugar. I am currently going through the tutorial posted here: >> https://developer.sugarlabs.org/activity.md.html >> >> I created a sample activity(using exactly the same instructions given in the tutorial). In the console, I noticed the following error: >> >> Error: Load timeout for modules: webL10n >> http://require.js.org/docs/errros.html#timeout >> onError >> onError >> checkLoaded >> (anonymous function) >> >> I tried: >> volo add webL10n >> >> It gave me a 301 error. > > > That's funny. 301 shouldn't be an error, 3xx codes are redirect codes [1]. > > I don't involve my self with too many crazy nodejs things, but presenting > a 3xx code as an error sounds well within the relm of possibility > for some of these funny libraries. > >> >> >> I then tried: >> volo add https://github.com/fabi1cazenave/webL10n >> >> which successfully installed webL10n. But the error still appears in the >> console. > > > Did the info at [2] help? > > If not, maybe post your activity on github and try to find > somebody who knows about this js stuff to have a look > (CC Lionel). > >> >> >> Also, I am not able to load any dynamic content using mustache(despite having a successful volo add) or console log out a statement when "my-button" ( https://developer.sugarlabs.org/activity.md.html#first%20steps) is clicked. I guess all of this is possible once js/activity.js. That loading happens via lib/require.js. But that script is giving me this error. I don't see any failed fetches in the Network tab of the console window also. > > > Where did you put the console.log statements in the code? > Were they within the require.js callback? > If so, maybe your problems are all interconnected. > > Thanks, > Sam > > [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 > [2] http://requirejs.org/docs/errors.html#timeout > >> >> >> Would be glad if someone helped out. >> Thanks! >> >> _______________________________________________ >> Sugar-devel mailing list >> Sugar-devel@lists.sugarlabs.org >> http://lists.sugarlabs.org/listinfo/sugar-devel >> >
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel