Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

PhantomJS 2.5 and zone.js 0.8.5: TypeError: undefined is not an object #719

Closed
CSchulz opened this issue Apr 4, 2017 · 2 comments · Fixed by #723
Closed

PhantomJS 2.5 and zone.js 0.8.5: TypeError: undefined is not an object #719

CSchulz opened this issue Apr 4, 2017 · 2 comments · Fixed by #723

Comments

@CSchulz
Copy link

CSchulz commented Apr 4, 2017

I have encountered an issue with PhantomJS 2.5-beta and zone.js 0.8.5:

PhantomJS 2.5.0 (Linux 0.0.0) ERROR
  TypeError: undefined is not an object (evaluating '_prop')
  at webpack:///~/zone.js/dist/zone.js:1193:0 <- src/polyfills.ts:9781

Version 0.8.4. works fine.

@JiaLiPassion
Copy link
Collaborator

@CSchulz , can you post a reproduce repo? Or if you can debug, can you check

webpack:///~/zone.js/dist/zone.js:1193:0 <- src/polyfills.ts:9781

here, that the prop and eventName and obj is?

@CSchulz
Copy link
Author

CSchulz commented Apr 4, 2017

  • eventName: message
  • obj: Window
  • prop: onmessage

called from Immediate.js:

    ImmediateDefinition.prototype.canUsePostMessage = function () {
        var root = this.root;
        // The test against `importScripts` prevents this implementation from being installed inside a web worker,
        // where `root.postMessage` means something completely different and can't be used for this purpose.
        if (root.postMessage && !root.importScripts) {
            var postMessageIsAsynchronous_1 = true;
            var oldOnMessage = root.onmessage;
            root.onmessage = function () {
                postMessageIsAsynchronous_1 = false;
            };
            root.postMessage('', '*');
            root.onmessage = oldOnMessage;
            return postMessageIsAsynchronous_1;
        }
        return false;
    };
zone.js:1193
Immediate.js:65
Immediate.js:22
Immediate.js:208
bootstrap 04004637a4aee2524e14:19
AsapAction.js:7

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

Successfully merging a pull request may close this issue.

2 participants