Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13688 closed defect (fixed)

mobileFileBrowser demo is broken on trunk

Reported by: Ming Zhe Huang Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: DojoX Mobile Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

Please check: http://archive.dojotoolkit.org/nightly/checkout/demos/mobileFileBrowser/demo.html

Click the list item and you'll see error in browser debug console. Probably it's caused by the refactoring of some fundamental dijit API.

Change History (18)

comment:1 Changed 8 years ago by bill

Component: GeneralDojoX Mobile
Milestone: tbd1.7
Owner: set to bill
Status: newassigned

Good catch, that demo is missing a dependency, I'll fix.

comment:2 Changed 8 years ago by bill

In [26207]:

add in missing dependencies, test still doesn't work though, refs #13688

comment:3 Changed 8 years ago by bill

Owner: changed from bill to Rawld Gill
Status: assignednew

Oof, the problem is deeper than I thought. Rawld, can you take a look?

"has" somehow gets defined as {connect: ..., disconnect: ...} rather than what the has.js factory returns, and when I start putting in debug statements then kernel and or lang are defined as "not-a-module" rather than hashes. Apparently kernel.js and lang.js are getting loaded but the factory functions aren't executing.

This is from testing on FF5/mac.

Last edited 8 years ago by bill (previous) (diff)

comment:4 Changed 8 years ago by bill

Note that the demo (actually, all the demos) have two <script> tags, one for dojo.js and one for src.js. src.js isn't an AMD module, but rather plain javascript. But still might be connected, since dojo.js has presumably already internally started firing off require()'s for lang.js and maybe parser.js.

comment:5 Changed 8 years ago by Rawld Gill

Likely fixed as of [26215]; checked src and built version and it seems OK. Please recheck and verify that this is fixed.

comment:6 Changed 8 years ago by bill

I'm still getting intermittent errors against the source build about has.add() not being defined. Tested on FF5/mac running against apache.

I can see this is a race condition so I can turn on tracing if you need me to, and you remind me how.

comment:7 Changed 8 years ago by Chris Mitchell

In [26266]:

refs #13688 converted dojo/fx easing and Toggler modules. Updated dojo/fx.js to automatically define Toggler and baseFx apis for compat.

comment:8 Changed 8 years ago by Ming Zhe Huang

I just tested with the latest trunk codes. It works.

comment:9 Changed 8 years ago by bill

I'm still seeing the error on the latest code. I needed to run it four times though before the error popped up. Like I said it's a race condition.

comment:10 Changed 8 years ago by Chris Mitchell

disregard my patch above re: Toggler and easing...i typo'd the ticket #...should have been #13699.

comment:11 Changed 8 years ago by Rawld Gill

Status: newassigned

comment:12 Changed 8 years ago by Douglas Hays

This fails every time for me on Chrome(13)/win, from both a demos-all build or against source.

comment:13 Changed 8 years ago by Chris Mitchell

this hadn't been fully converted to amd with the latest dojo api changes. i just checked in a fix r26361. We should prob be able to close this now.

Last edited 8 years ago by bill (previous) (diff)

comment:14 Changed 8 years ago by bill

The worrisome thing is why it was failing before. Looks like a bug in the loader?

If it was just a question of missing dependencies then that's great as it doesn't indicate a loader timing bug; but I don't see how the missing dependencies would cause has to point to something else etc.

Last edited 8 years ago by bill (previous) (diff)

comment:15 Changed 8 years ago by Douglas Hays

working for me

comment:16 in reply to:  4 Changed 8 years ago by Rawld Gill

Replying to bill:

Note that the demo (actually, all the demos) have two <script> tags, one for dojo.js and one for src.js. src.js isn't an AMD module, but rather plain javascript. But still might be connected, since dojo.js has presumably already internally started firing off require()'s for lang.js and maybe parser.js.

Any projects that inject code via explicit <script> tags can expect to work in async mode if and only if the injected source uses AMD require. As of [26381], that is the case with mobileFileBrowser.

comment:17 in reply to:  14 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: assignedclosed

Replying to bill:

The worrisome thing is why it was failing before. Looks like a bug in the loader?

If it was just a question of missing dependencies then that's great as it doesn't indicate a loader timing bug; but I don't see how the missing dependencies would cause has to point to something else etc.

I agree it's worrisome. Unfortunately I'm unable to repo to bug in my environment (I tried against [26265] on FF 5/linux; chrome 13/in). So I'm going to close it for now.

comment:18 Changed 8 years ago by bill

I figured out the bug, filed it as #13768. You are off the hook :-), the dojox/mobile code is doing something it shouldn't.

Note: See TracTickets for help on using tickets.