BrechtDeMan / WebAudioEvaluationTool

A tool based on the HTML5 Web Audio API to perform perceptual audio evaluation tests locally or on remote machines over the web.
https://code.soundsoftware.ac.uk/projects/webaudioevaluationtool
GNU General Public License v3.0
114 stars 37 forks source link

Test creator doesn't load on Safari 8.0.4 #70

Closed BrechtDeMan closed 8 years ago

BrechtDeMan commented 8 years ago

Going to http://localhost:8000/test_create.html on Safari v8.0.4 doesn't load anything, and gives this error

[Error] TypeError: undefined is not an object (evaluating 'this.testsXML.length') (anonymous function) (test_core.js, line 282) (anonymous function) (test_core.js, line 307) buildPage (test_core.js, line 1100) onload (test_core.js, line 96)

If many issues are just Safari v8 we may have to abandon legacy versions of Safari... So it would be useful if others could confirm.

BrechtDeMan commented 8 years ago

Same on an actual webserver (which works on Chrome) http://webprojects.eecs.qmul.ac.uk/bdm30/mixevaluation/test_create.html

nickjillings commented 8 years ago

Most likely related to #21

nickjillings commented 8 years ago

Can you check if the above fix works (dev_main)

BrechtDeMan commented 8 years ago

Yup, thanks

BrechtDeMan commented 8 years ago

Actually, I get this on submitting, in Safari v8 (related to #21?):

[Error] TypeError: undefined is not an object (evaluating 'RootDocument.children[0]') encode (specification.js, line 166) onclick (test_core.js, line 1323)

nickjillings commented 8 years ago

Yeah all those ones where it says error of .children is the same bug as #21. I'm amazed it hasn't cropped up before. I will change it now. The children[0] are quite easy as it is the same as .firstElementChild.,

nickjillings commented 8 years ago

Fixed now (on master as a hotfix)

BrechtDeMan commented 8 years ago

New error:

[Error] NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist. appendChild (test_core.js, line 1332) onclick (test_core.js, line 1332)

nickjillings commented 8 years ago

@BrechtDeMan can you check if the minor correction in dev_main has solved it?

BrechtDeMan commented 8 years ago

I now get the Save dialog when clicking 'export XML', but it doesn't save/download. Testing this on localhost (pythonServer) by the way.

screen shot 2016-05-27 at 11 45 44
nickjillings commented 8 years ago

You have to right click on the save link. Safari doesn't support the HTML5 clicking to download (really annoying) from inside a page

BrechtDeMan commented 8 years ago

That's what I did though ('Download link (as ...)'). Interestingly when I do click it I see the XML in the browser window as usual with Safari. So the XML is produced, it just cannot save it somehow...

The link if I copy it is blob:http://localhost:8000/8286fddb-e6ce-4e28-8e3e-731c937252c6

nickjillings commented 8 years ago

OK, when you click on it and do File -> Save As... you can save the XML that way.

Here is the problem: http://caniuse.com/#feat=download. Safari and Edge do not support the download tag. The only way to dynamically trigger a download is through using a header (which we don't do as no server paradigm, plus hacky to send it back to server then re-download and wasteful).

nickjillings commented 8 years ago

Added in an explanation on how to save with Safari. Possibly could do some browser detection to only show this message to safari users but the rest of this bug is out of our hands.