expo / expo-pixi

Tools for using pixi.js in Expo
MIT License
304 stars 118 forks source link

Expo Client 2.21.5 (SDK 39) this.nativeVaoExtension.createVertexArrayOES is not a function #187

Open KBS-devs opened 3 years ago

KBS-devs commented 3 years ago

Hey Guys,

Thanks for this awesome library. We have used it in several projects for signature and sketch features.

Recently expo launced their new client App version 2.21.5 and we now get this error:

this.nativeVaoExtension.createVertexArrayOES is not a function.

We have traced the error to the following file: pixi-gl-core\src\VertexArrayObjects

The issue seems that there are no WebGL extensions on line 19 keeping this.nativeVaoExtension to undefined.

In the previous Expo client this was working perfectly.

Any idea what could cause this to fail on the expo-pixi ?

karanshrm44 commented 3 years ago

Same Problem facing @KBS-devs have you found any solution

KBS-devs commented 3 years ago

Unfortunalty not. We decided on a work-around and have replaced expo-pixi with react-native-signature-pad for now.

fknop commented 3 years ago

Same issue since we upgraded to Expo 42 from Expo 39

paul-leymet commented 3 years ago

Exactly same issue here, did you find any solution yet ?

iamjonbradley commented 3 years ago

Has anyone found a solution to this?

viveksc1994 commented 3 years ago
wkozyra95 commented 3 years ago

It seems that pixi is trying to use webgl extensions that expo-gl does not support. I'll look into that more, for now you can use the below workaround, I tested that with Signature but this approach should work with other components

class Workaround extends ExpoPixi.Signature {
  constructor(props, context) {
    super(props, context)
    oldOnContextCreate = this.onContextCreate;
    this.onContextCreate = (gl) => {
      gl.getExtension = () => null;
      gl.getSupportedExtensions = () => [];
      oldOnContextCreate(gl);
    }
  }
}
misajimenezmx commented 3 years ago

@wkozyra95 thanks, it works for me!

viveksc1994 commented 3 years ago

It seems that pixi is trying to use webgl extensions that expo-gl does not support. I'll look into that more, for now you can use the below workaround, I tested that with Signature but this approach should work with other components

class Workaround extends ExpoPixi.Signature {
  constructor(props, context) {
    super(props, context)
    oldOnContextCreate = this.onContextCreate;
    this.onContextCreate = (gl) => {
      gl.getExtension = () => null;
      gl.getSupportedExtensions = () => [];
      oldOnContextCreate(gl);
    }
  }
}

Actually, Where do I have to put this code? I am not getting this.

wkozyra95 commented 3 years ago

@viveksc1994 class Workaround is a wrapper around ExpoPixi.Signature, so you can put the code anywhere you want and use class Workaround (of course you can change a name) instead of ExpoPixi.Signature

vetrivendhan48 commented 3 years ago

@wkozyra95 Your workaround works with 'Signature' component. But it won't works with 'Expo.Sketch' component. Still thanks for your workaround.

leoflood commented 3 years ago

Same problem, did anyone fix this?

alexislefebvre commented 3 years ago

@viveksc1994

How can I be sure that this is a legit APK?

alexislefebvre commented 3 years ago

How can I be sure that this is a legit APK?

I downloaded the 2.19.6 version from APKPure (a reliable source according to several sources): https://apkpure.com/fr/expo/host.exp.exponent/download/152-APK?from=versions%2Fversion

With this version, the error disappeared.

wkozyra95 commented 3 years ago

Same problem, did anyone fix this?

It depends