Jump to content

Could it be a problem with the engine ? -confirmed- Chrome extension is Crashing with PANDA2


Recommended Posts



We have a chrome extension which is crashing when executed from a panda2 game but apparently the same extension works correctly when not...so could it be possible that the panda2 engine is doing something to the postMessage function which is crashing  ? 


Uncaught DOMException: Failed to execute 'postMessage' on 'Window': function(item) {
            for (var i = this.length; i >= 0; i--) {
                if (this === item) {
 ...<omitted>... } could not be cloned.
    at i._write (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:113048)
    at v (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:131903)
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:135015
    at i.g.write (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:135042)
    at e.exports.y (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:124283)
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:35213
    at e.exports.a.emit (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:35283)
    at w (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:119122)
    at _ (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:118937)
    at e.exports.b.push (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:119748)


Link to comment
Share on other sites


Unfortunately this is the engine breaking the extension on chrome Version 69.0.3497.100 (Official Build) (64-bit) and Metamask extension 4.10.0, it is a major extension used by the Ethereum dapp community which is injecting a web3 object in every page, I made a little repro-code, main-direct.js is working, the same code into the regular engine main.js is breaking, this is an important matter because it breaks not only our website but eventually all website using this popular extension so I hope to see this fixed as a matter of urgency, thank you again for your support.




Link to comment
Share on other sites

  • ftguy2018 changed the title to Could it be a problem with the engine ? -confirmed- Chrome extension is Crashing with PANDA2

Maybe it could help but by adding the following at the top of the main.js , it is working, basically trying to hook the window.postMessage on chrome :


    var postMessageTemp = window.postMessage;
    window.postMessage = function(message, targetOrigin, transfer)
        postMessageTemp(JSON.parse(JSON.stringify(message)), targetOrigin, transfer)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...