Opened 10 years ago

Closed 10 years ago

#7280 closed defect (wontfix)

Error: Bundle not found: loading in dijit , locale=en' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

Reported by: Pete Smith Owned by: Adam Peller
Priority: high Milestone: 1.3
Component: Dijit Version: 1.1.1
Keywords: nls Cc: James Burke
Blocked By: Blocking:

Description

This seems like #6950, but I can tell you that it only happens on my built version of dojo in FF3. I think that because FF3 is so fast it exposes a load ordering issue surrounding the nls files. If you inspect in firebug, the en-us.js file is included AFTER the built layer file. If I explicitly do this in the head it fixes this. The bundles need to be loaded BEFORE the custom dojo / dijit built file. If I refresh the page, this error goes away, it is only when the cache is cleared and it is pullin these files down for the first time.

<script type="text/javascript" src="js/dojo-release-{$gq_version}/dojo/dojo/dojo.js"></script> <script type="text/javascript" src="js/dojo-release-{$gq_version}/dojo/dojo/nls/gqdojo_en-us.js"></script> <script type="text/javascript" src="js/dojo-release-{$gq_version}/dojo/dojo/gqdojo.js"></script>

Change History (13)

comment:1 Changed 10 years ago by Adam Peller

Resolution: invalid
Status: newclosed

there isn't enough info here to reproduce the bug, but I suspect that dojo.i18n.getLocalization() is being called from the top-level of a script, which is unsupported, due to the race condition you mention. You'll need to wrap these calls in a function so that they get called after onLoad

comment:3 Changed 10 years ago by Adam Peller

Cc: James Burke added; Adam Peller removed
Owner: set to Adam Peller
Status: reopenednew

httpete will follow up with timing information regarding 'onload' event, as well as locale information for his page: dojo.i18n.normalizeLocale()

comment:4 Changed 10 years ago by Pete Smith

ok, I put a console.log at the beginning of my dojo.addOnLoad function and::::

start-of-addOnLoad [Exception... "'Error: Bundle not found: loading in dijit , locale=en-us' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

comment:5 Changed 10 years ago by Pete Smith

if that is unclear, my console.log IS rendered before my exception is thrown.

comment:6 Changed 10 years ago by Pete Smith

peller: httpete: add this to the list of things to try at home - after your app dies, in firebug: dojo.i18n.normalizeLocale(locale)


start [Exception... "'Error: Bundle not found: loading in dijit , locale=en-us' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no] [Break on this error] undefined

dojo.i18n.normalizeLocale('en-us')

"en-us"

comment:7 Changed 10 years ago by Pete Smith

to do more timing testing, I sprinkled logs after each step in my addonload function:

dojo.addOnLoad(function(){ console.log('start'); dojo.parser.parse(dojo.byId('tophalf')); console.log('after first tophalfparse'); dojo.parser.parse(dojo.byId('afterbody')); console.log('after second body parse'); var restable = new gq.dijit.ResultTable?({id:'restable', totalcount: 0, groupname: "groupdata.name", nbingroup: 6}); console.log('after my instantiation of resulttable dijit'); dojo.connect(window, 'onbeforeunload', function(){restable.saveState();}); console.log('after my onbeforeunload call'); if(dojo.isFF){ dojo.query("th" , dojo.byId('resulttable')).style( 'borderCollapse','separate'); } });


result::: firebug console output

start [Exception... "'Error: Bundle not found: loading in dijit , locale=en-us' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]

comment:8 Changed 10 years ago by Pete Smith

very interestingly, I did a clear and a refresh, and it worked, but when I inspected the console:

https://www.genomequestlive.com/GQtest/js/dojo-release-5.1.2815/dojo/dojo/dojo.js[[BR]] https://www.genomequestlive.com/GQtest/js/dojo-release-5.1.2815/dojo/dojo/gqdojo.js[[BR]] https://www.genomequestlive.com/GQtest/js/dojo-release-5.1.2815/dojo/dojo/nls/gqdojo_en-us.js

the order was still bad, but no problem. On a subsequent clear cache / refresh:
the same order, still the crash. so my ordering hypothesis, at least in FF3, maybe faulty.

comment:9 Changed 10 years ago by Adam Peller

httpete, sorry for the long delay. I'm finally sitting in front of a Linux box, but I forgot the url/info necessary to reproduce the problem. Could you e-mail/pm it to me? Thanks

comment:10 Changed 10 years ago by Adam Peller

still cannot reproduce this.

comment:11 Changed 10 years ago by Adam Peller

possibly related to #7660

comment:12 Changed 10 years ago by bill

Milestone: tbd1.3
Priority: highnormal

Lowering priority since can't reproduce; need to install linux and try.

comment:13 Changed 10 years ago by James Burke

Resolution: wontfix
Status: newclosed

I installed linux and worked with httpete on the issue. Unfortunately, we both cannot reproduce now, but it does seems like the known issue in Firefox 3 about domcontentloaded firing too soon, which needs to be fixed by Mozilla.

We talked about using dojo.require() for the built layer though, to avoid the issue. I believe that approach will be sufficient if httpete hits the problem again. Closing as wontfix, since I believe we have a workaround via dojo.require, and hopefully Mozilla will address the underlying issue for FF 3.1.

Note: See TracTickets for help on using tickets.