Ticket #7280 (closed defect: wontfix)

Opened 2 years ago

Last modified 23 months ago

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: httpete Owned by: peller
Priority: normal Milestone: 1.3
Component: Dijit Version: 1.1.1
Severity: normal Keywords: nls
Cc: jburke

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

Changed 2 years ago by peller

  • status changed from new to closed
  • resolution set to invalid

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

Changed 2 years ago by peller

  • cc jburke added; peller removed
  • owner set to peller
  • status changed from reopened to new

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

Changed 2 years ago by httpete

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]

Changed 2 years ago by httpete

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

Changed 2 years ago by httpete

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"

Changed 2 years ago by httpete

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]

Changed 2 years ago by httpete

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.

Changed 2 years ago by 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

Changed 2 years ago by peller

still cannot reproduce this.

Changed 23 months ago by peller

possibly related to #7660

Changed 23 months ago by bill

  • priority changed from high to normal
  • milestone changed from tbd to 1.3

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

Changed 23 months ago by jburke

  • status changed from new to closed
  • resolution set to wontfix

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.