Skip to content

Uncaught TypeError: Cannot read property 'addEventListener' of null #7

@namel

Description

@namel

This happens when I start running spaaace on a computer
where it never ran before, so it is fixed by refreshing the page.

When it happens, the game doesn't start. The exception is raised on the SpaaaceClientEngine::start() method, in the third line below:

	            this.gameEngine.once('renderer.ready', function () {
	                // click event for "try again" button
	                document.querySelector('#tryAgain').addEventListener('click', function () {
	                    if (Utils.isTouchDevice()) {
	                        _this2.renderer.enableFullScreen();
	                    }
	                    _this2.socket.emit('requestRestart');
	                });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions