question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ExpoPhaser on Android not working

See original GitHub issue

Trying to add ExpoPhaser to my Expo Android app and just making a game object causes the app to error. I am using a Galaxy S8.

undefined is not an object (evaluating window.emitter.emit

Not sure what to make of the error. Seems to build okay on the iOS simulator.

Can provide more details if needed. Thanks for library! Really like the idea!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
baochungitcommented, Mar 23, 2019

How is this going? If it’s still not working on Android, please add a note on README so that other people intending to use it for Android app could avoid to take time for this. Thank you!

1reaction
NickDelfinocommented, Mar 15, 2018

This error changes on second load to:

EXGL: Invalid pixel data argument for gl.textImage2D()!

This is all I have in my App.js.

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Expo from 'expo';
import ExpoPhaser from 'expo-phaser';

export default class App extends React.Component {
  state = { loading: true };
  async componentWillMount() {
    this.setState({ loading: false });
  }
  render() {
    if (this.state.loading) {
      return <Expo.AppLoading />;
    }

    return (
        <Expo.GLView
            style={{ flex: 1 }}
            onContextCreate={context => startGame({ context })}
        />
    );
  }
}

function startGame({ context }) {
  const game = ExpoPhaser.game({ context });
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

WebGL not working on android - #3 by forcemagic - Expo forums
I have downloaded the https://snack.expo.io/@community/flappy-bird snack and imported it to my project. (I'm using react-navigation's ...
Read more >
Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >
Run apps on a hardware device - Android Developers
Troubleshoot with the Connection Assistant; Resolve USB connection issues; Resolve wireless ... Windows: Install a USB driver for ADB (if applicable).
Read more >
Set up email in the Outlook for Android app - Microsoft Support
Some work and school accounts have additional security requirements before you can use Outlook for Android. If you're not sure which of these...
Read more >
Move from Android to iPhone, iPad, or iPod touch
A new iPhone showing a one-time code to enter on your Android device. ... Information about products not manufactured by Apple, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found