Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
0
Members

Exported game does not run

A topic by Viko created Sep 04, 2016 Views: 229 Replies: 2
Viewing posts 1 to 2

I get Uncaught TypeError: Cannot read property 'onMessage' of null at line 1925 of SupRuntime.js. OS X El Capitan 10.11.6, Electron 1.3.4. The game runs fine when launched from the IDE; this issue only happens on exported versions.

It looks like Superpowers' code is contradicting itself. Here you work around SupApp not existing, but a few lines later you just assume it exists, without having done anything to set it in the meantime.

I'd do more to help, but I can't for the life of me figure out what SupApp actually is, or how to replace onMessage with (presumably) something from Electron.

(Crossposted from an issue I opened on GitHub.)

(+1)

I used to have the same error when tried to use electron, the solution so far was to create the electron window like this (readed from here). hope it helps

new electron.BrowserWindow({
  width: 800,
  height: 600,
  useContentSize: true,
  webPreferences: {
    nodeIntegration: false
  },
});

That worked, thank you.