Opened 12 years ago

Closed 10 years ago

#2254 closed defect (wontfix)

dojo.flash tests fail in opera (windows/linux/mac/wii)

Reported by: Aman Gupta <dojo@…> Owned by: bradneuberg
Priority: high Milestone: 1.1
Component: Storage/Flash Version: 0.4.1
Keywords: Cc:
Blocked By: Blocking:

Description

Both tests at http://archive.dojotoolkit.org/nightly/tests/flash/ fail on versions of Opera tried on Windows, Linux, OSX and on the new opera browser on the Nintendo Wii. Same results on all four platforms:

unit_tests_comm.html:

Dojo.Plugin.Flash Unit Tests
This page tests bidirectional Flash to JavaScript communication using dojo.flash; tests and output on page may take up to 30 seconds to run and appear.
DEBUG: Opera is not supported with dojo.undo.browser, so back/forward detection will not work.
DEBUG: User agent: Opera/9.02 (Macintosh; Intel Mac OS X; U; en)
DEBUG: Loading flash...
DEBUG: Test XML data loaded
DEBUG: Test large data file loaded
DEBUG: Flash available: true
DEBUG: Flash version: 9
ASSERTION FAILED: Flash did not load
UNIT TESTS FAILED
0 successful assertions; 1 failed assertions

test_comm_simple.html:

dojo.flash.comm Simple Test

Attachments (1)

dojo.flash.bugs.patch (1.1 KB) - added by Aman Gupta <dojo@…> 12 years ago.
several bugs in flash.js

Download all attachments as: .zip

Change History (8)

Changed 12 years ago by Aman Gupta <dojo@…>

Attachment: dojo.flash.bugs.patch added

several bugs in flash.js

comment:1 Changed 12 years ago by Aman Gupta <dojo@…>

I fixed a few bugs I found in flash.js that were contributing to problems in Opera. Now, when setSwf is passed visible: false, the results remain the same, but when visible: true is passed:

test_comm_simple.html:

dojo.flash.comm Simple Test

Flash should say 1, 2 then 3, not 3 three times.
DEBUG: Flash is loaded
DEBUG: [TypeError: Statement on line 1138: Type mismatch (usually a non-object value used where an object is required) Backtrace: Line 1138 of eval script plugin.startExec(); Line 999 of eval script return dojo.flash.comm._execFlash(methodName, methodArgs); Line 12 of inline#2 script in http://julie.tmm1.net:3000/javascripts/dojo/tests/flash/test_comm_simple.html var results = dojo.flash.comm.sayHello("Did I leave the iron on?"); Line 748 of eval script result = this.object[this.methodname].apply(this.object, args); Line 599 of eval script return joinpoint.run.apply(joinpoint, args); Line 719 of eval script callObj[callFunc].apply(callObj, args); Line 733 of eval script return unrollAdvice.apply(this, arguments); Line 152 of eval script callback.call(thisObject, anArray[i], i, anArray); Line 759 of eval script dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); Line 564 of eval script return joinpoint.run.apply(joinpoint, arguments); Line 1 of unknown script __flash__toXML(dojo.flash.loaded()); "<undefined/>"; ] when calling flashLoaded$joinpoint$method on [object Window] with arguments 
FATAL exception raised: Statement on line 1138: Type mismatch (usually a non-object value used where an object is required) Backtrace: Line 1138 of eval script plugin.startExec(); Line 999 of eval script return dojo.flash.comm._execFlash(methodName, methodArgs); Line 12 of inline#2 script in http://julie.tmm1.net:3000/javascripts/dojo/tests/flash/test_comm_simple.html var results = dojo.flash.comm.sayHello("Did I leave the iron on?"); Line 748 of eval script result = this.object[this.methodname].apply(this.object, args); Line 599 of eval script return joinpoint.run.apply(joinpoint, args); Line 719 of eval script callObj[callFunc].apply(callObj, args); Line 733 of eval script return unrollAdvice.apply(this, arguments); Line 152 of eval script callback.call(thisObject, anArray[i], i, anArray); Line 759 of eval script dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch); Line 564 of eval script return joinpoint.run.apply(joinpoint, arguments); Line 1 of unknown script __flash__toXML(dojo.flash.loaded()); "<undefined/>"; 
DEBUG: flash says 1
DEBUG: flash says 2
DEBUG: flash says 3

unit_tests_comm.html:

Dojo.Plugin.Flash Unit Tests
This page tests bidirectional Flash to JavaScript communication using dojo.flash; tests and output on page may take up to 30 seconds to run and appear.
DEBUG: Opera is not supported with dojo.undo.browser, so back/forward detection will not work.
DEBUG: User agent: Opera/9.02 (Macintosh; Intel Mac OS X; U; en)
DEBUG: Loading flash...
DEBUG: Test XML data loaded
DEBUG: Test large data file loaded
DEBUG: 
DEBUG: Flash version: 9
DEBUG: Using Flash communication method: 8
DEBUG: 
DEBUG: Testing JavaScript to Flash method call with return value...

and the error console says:

JavaScript - http://julie.tmm1.net:3000/javascripts/dojo/tests/flash/unit_tests_comm.html
Timeout thread: delay 200 ms
Error:
name: TypeError
message: Statement on line 1138: Type mismatch (usually a non-object value used where an object is required)
Backtrace:
  Line 1138 of eval script 
    plugin.startExec();
  Line 999 of eval script 
    return dojo.flash.comm._execFlash(methodName, methodArgs);
  Line 157 of inline#2 script in http://julie.tmm1.net:3000/javascripts/dojo/tests/flash/unit_tests_comm.html
    var results = dojo.flash.comm.testString("Did I leave the iron on?");
  Line 125 of inline#2 script in http://julie.tmm1.net:3000/javascripts/dojo/tests/flash/unit_tests_comm.html
    startTests();
  At unknown location
    [statement source code not available]

Also, there is a javascript alternative to the vbscript code currently used for IE at http://blog.metawrap.com/blog/DynamicGenerationOfFlashElementsThatUseFSCommandJavaScriptAndVBScriptDoNotWorkViaInnerHTML.aspx

comment:2 Changed 12 years ago by Aman Gupta <dojo@…>

The documentation at the top of flash.js states:

//	1) Flash 6+ - Uses Flash methods, such as SetVariable and TCallLabel,
//	and the fscommand handler to do communication. Strengths: Very fast,
//	mature, and can send extremely large amounts of data; can do
//	synchronous method calls. Problems: Does not work on Safari; works on 
//	Firefox/Mac OS X only if Flash 8 plugin is installed; cryptic to work with.

However, forcing flash comm mode 6 with the code

var djConfig = { isDebug: true, forceFlashComm: 6 };

in unit_tests_comm.html and running under Safari seems to work just fine:

Dojo.Plugin.Flash Unit Tests

This page tests bidirectional Flash to JavaScript communication using dojo.flash; tests and output on page may take up to 30 seconds to run and appear.

DEBUG: User agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/418.9.1 (KHTML, like Gecko) Safari/419.3
DEBUG: Loading flash...
DEBUG: Test large data file loaded
DEBUG: Test XML data loaded
DEBUG:
DEBUG: Flash version: 9
DEBUG: Using Flash communication method: 6
DEBUG:
DEBUG: Testing JavaScript to Flash method call with return value...
DEBUG:
DEBUG: Testing JavaScript to Flash method call with characters that are known to fail with Flash 8 ExternalInterface...
DEBUG:
DEBUG: Testing sending complex XML RSS feed between JavaScript and Flash...
DEBUG:
DEBUG: Testing sending 700K text of Walt Whitman's Leaves of Grass over to Flash, and ensuring performance is below five seconds...
DEBUG: Actual time sending 700K to Flash: 22 ms
DEBUG:
DEBUG: Testing getting 700K text of Walt Whitman's Leaves of Grass from Flash, and ensuring performance is below five seconds...
DEBUG: Actual time getting 700K from Flash: 29 ms
DEBUG:
DEBUG: Testing sending and receiving ~10 megabytes of data, and ensuring that the performance happens under 3 seconds (only possible using Flash 6 communication)...
DEBUG: Actual sending and receiving 10 MB from Flash: 1090 ms
DEBUG:
DEBUG: Testing Flash to JavaScript communication...
DEBUG: testCallingJavaScript, msg=Hello from JavaScript
DEBUG: returnResults, msg=Hello from JavaScript
UNIT TESTS PASSED
11 successful assertions; 0 failed assertions

Where can I find more information on the problems with flash 6 and Safari?

comment:3 Changed 12 years ago by Aman Gupta <dojo@…>

  • forceFlashComm 8 does not work with Opera on OSX or on Windows.
  • forceFlashComm 6 works (except for 10mb test) on Opera on Windows (Opera 9.01 w/ Flash 9.16) with visible either true or false.
  • forceFlashComm 6 works (except 10mb test) on Opera on OSX (Opera 9.02 w/ Flash 9) only when visible is true

comment:4 Changed 12 years ago by dylan

Milestone: 0.9

comment:5 Changed 11 years ago by dylan

Milestone: 0.91.0

comment:6 Changed 11 years ago by bradneuberg

Milestone: 1.01.1

Thanks for all this work, but I don't think Opera supports the base features necessary for Dojo Flash to work.

comment:7 Changed 10 years ago by bradneuberg

Resolution: wontfix
Status: newclosed

Marking as WONTFIX since Opera is not a supported browser for Dojo Storage.

Note: See TracTickets for help on using tickets.