Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhantomJS issues #13

Closed
mattheworiordan opened this issue Feb 25, 2015 · 6 comments
Closed

PhantomJS issues #13

mattheworiordan opened this issue Feb 25, 2015 · 6 comments

Comments

@mattheworiordan
Copy link
Member

I will update this issue with issues as I find them.

  1. iFrameTransport fails frequently, error I see:
PhantomJS 1.9.8 (Mac OS X) ERROR
  TypeError: 'null' is not an object (evaluating 'wrapWindow.destWindow')
  at /Users/matthew/Projects/Ably/clients/ably-js/browser/static/ably.js:8605
PhantomJS 1.9.8 (Mac OS X) ERROR
  TypeError: 'null' is not an object (evaluating 'wrapWindow.destWindow')
  at /Users/matthew/Projects/Ably/clients/ably-js/browser/static/ably.js:8605

this correlates with the following within IframeTransport.prototype.createIframe:

function onload() {
            self.destWindow = wrapWindow.destWindow; # this line throws the exception
            DomEvent.addMessageListener(wrapWindow, self.messageListener = messageListener);
            iframeComplete = true;
            callback(null, wrapIframe);
        };
@mattheworiordan
Copy link
Member Author

Issue 2.

Crypto tests in PhantomJS don't work because all references to WordArray objects behave differently to other browsers for some reason. Methods like .length don't exist for example and instead .byteLength are available.

@mattheworiordan
Copy link
Member Author

I am actually getting the "Uncaught TypeError: Cannot read property 'destWindow' of null" in Chrome as well with the Karma test runner or nodeunit browser webserver runner.

@mattheworiordan
Copy link
Member Author

Issue 3.

Upgrade test publishpostupgrade0 fails quite frequently both under Karma and within the nodeunit browser tests.

binary connection to server failed
AssertionError: binary connection to server failed
    at Object.assertWrapper [as ok] (http://localhost:3000/node_modules/karma-nodeunit/lib/nodeunit.js:1563:39)
    at Object. (http://localhost:3000/spec/realtime/upgrade.test.js:143:16)
    at callListener (http://localhost:3000/browser/static/ably.js:4155:19)
    at Connection.EventEmitter.emit (http://localhost:3000/browser/static/ably.js:4177:5)
    at http://localhost:3000/browser/static/ably.js:6997:10

Test suite will often then just hang at publishpostupgrade1 after the above fails. Setting log level to 4 and testing against local, here is the log of what happens and how it just hangs https://gist.github.com/mattheworiordan/7b3e701084ec03b815c8

@mattheworiordan
Copy link
Member Author

Issue 4.

Less frequent, but I see resume_inactive_comet_text fail under Karma and nodeunit browser tests as well.

resume_inactive_comet_text (1, 2, 3)
Verify Phase 1 messages all received
Verify reconnect is resume mode
Verify Phase 4 messages all received
AssertionError: Verify Phase 4 messages all received
    at Object.assertWrapper [as equal] (http://localhost:3000/node_modules/karma-nodeunit/lib/nodeunit.js:1563:39)
    at http://localhost:3000/spec/realtime/resume.test.js:105:18

@mattheworiordan
Copy link
Member Author

FYI, to see the work I have done and few small bugs I have fixed in ably-js to get PhantomJS running, see karma-nodeunit...phantom-js-fixes

@paddybyers
Copy link
Member

iFrameTransport fails frequently

This is now resolved.

Crypto tests in PhantomJS don't work because all references to WordArray objects behave differently to other browsers

This is resolved; part of the library thought ArrayBuffer wasn't supported, but another part thought otherwise. All down to a Webkit issue where typeof ArrayBuffer == 'object'.

Upgrade test publishpostupgrade0 fails quite frequently both under Karma and within the nodeunit browser tests.

This is resolved; at least I've not had this fail after multiple runs.

Less frequent, but I see resume_inactive_comet_text fail under Karma and nodeunit browser tests as well.

I've not seen any occurrence of this recently, but it is not Phantom-specific so I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants