Opened 14 years ago
Closed 13 years ago
#2523 closed defect (fixed)
dojo.flash comm doesn't work on baked build with profile "storage"
Reported by: | guest | Owned by: | bradneuberg |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | Storage/Flash | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Dojo Version: 0.4.1 Browser: Firefox 2.0.0.2
Javascript flash communication does not work with compressed build of dojo.js built as follows:
$ ant clean -Dprofile=storage -Ddocless=true release gen-strip-docs compress
Steps to reproduce:
- Build dojo release with above command.
- Test unit test flash/test_comm_simple.html against this build.
- Note output like the following:
DEBUG: [TypeError: dojo.flash.comm.sayHello is not a function, file: http://localhost:5000/test_comm_simple.html, line: 32] when calling flashLoaded$joinpoint$method on [object Window] with arguments [object Object] FATAL exception raised: dojo.flash.comm.sayHello is not a function
SIDE NOTE: Our team is working on a project that may necessitate flash<->js comm and we have to use a single dojo.js (no require calls triggering more downloads). Compressing resources is also critical for the application.
Attachments (2)
Change History (15)
comment:1 Changed 14 years ago by
Milestone: | → 0.9M1 |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Thank you for responding so quickly to this. I've tested again, using your suggestion:
ant -Dprofile=storage -Ddocless=true clean release
with a freshly checked out copy of 0.4.1. But, going to my test environment http://localhost:5000/Dojo-0.4.1-fresh/release/dojo/tests/flash/test_comm_simple.html, I'm still getting: DEBUG: Flash is loaded DEBUG: [TypeError: dojo.flash.comm.sayHello is not a function, file: http://localhost:5000/Dojo-0.4.1-fresh/release/dojo/tests/flash/test_comm_simple.html, line: 32] when calling flashLoaded$joinpoint$method on [object Window] with arguments [object Object] FATAL exception raised: dojo.flash.comm.sayHello is not a function
I'm trying to convince my team to use dojo over prototype (wink, wink) - so this could be a show stopper ;)
I've attached the generated dojo.js file.
Thanks.
comment:3 Changed 14 years ago by
Your dojo.js matches my dojo.js.
I believe the problem is that you are only copying dojo.js over to your server. dojo.flash depends on a few flash files that also need to be copied to your server. The general advice is to take everything in the release/dojo folder and put that on your server. There are other modules that depend on support files (like dojo.undo.browser and the widgets need images usually for their display).
Try copying over the entire build output directory to see if that fixes the problem.
I will leave the ticket open for now to wait for your response.
comment:4 Changed 14 years ago by
Thanks again for responding so quickly. I was actually going about this very carefully to ensure all the files are in place. I am testing using pylons as webserver and placed the Dojo-0.4.1 checkout of release-0.4.1 in my public directory - with permissions on everything to be globally readable (files 0644 and directories 0755). I am therefore running tests directly against the release/dojo:
http://localhost:5000/Dojo-0.4.1/release/dojo/tests/flash/test_comm_simple.html
Which fails, versus:
http://localhost:5000/Dojo-0.4.1/tests/flash/test_comm_simple.html
Which does not fail.
I'm attaching the output of ant ... which I don't think will help. If you like, I can email you a tarball of the whole Dojo-0.4.1 directory.
Thanks for your help.
comment:5 Changed 14 years ago by
You should verify (maybe by watching the traffic through a proxy server like Charles), that the swf file is being found and loaded by the browser. You should see the browser ask for tests/flash/resources/HelloWorld_version6.swf or tests/flash/resources/HelloWorld_version8.swf.
If that is working correctly (HTTP 200), then it seems like maybe that swf or something it depends on is corrupted. Not sure what to do with that. We might have to forward the issue to the person whoe wrote the flash stuff.
comment:6 Changed 14 years ago by
Wow, thanks for pointing me to Charles that's an awesome tool. So I actually noticed an odd trend before even using Charles by using the inspect DOM feature of firebug. On the bad request:
http://localhost:5000/Dojo-0.4.1/release/dojo/tests/flash/test_comm_simple.html
two swf files: HelloWorld_version6 and Storage_verison6 are getting embedded in the DOM. Whereas with the good request:
http://localhost:5000/Dojo-0.4.1/tests/flash/test_comm_simple.html
only the HelloWorld_version6 swf gets embedded. Perhaps the javascript is getting tripped up because of the two swfs and can't tell which one its calling into. I've attached a tarball containing the good and bad sessions.
If confusion over the multiple embedded swfs is a problem, it might be beneficial to incorporate other swfs in the unit test.
comment:7 Changed 14 years ago by
Milestone: | 0.9M1 → 0.9M2 |
---|
comment:9 Changed 14 years ago by
Milestone: | 0.9beta → 0.9 |
---|
comment:10 Changed 14 years ago by
Milestone: | 0.9 → 1.1 |
---|---|
Owner: | changed from alex to Brad Neuberg |
Status: | reopened → new |
brad, is this still an issue?
comment:11 Changed 14 years ago by
Owner: | changed from Brad Neuberg to bradneuberg |
---|
comment:12 Changed 13 years ago by
Milestone: | 1.1 → 1.2 |
---|
comment:13 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think the problem is trying to use the gen-strip-docs ant task. You do not need this since the normal build process runs it through the compressor and removes comments. The following ant command worked for me, and generates a compressed JS file:
ant -Dprofile=storage -Ddocless=true clean release