expo-pixi icon indicating copy to clipboard operation
expo-pixi copied to clipboard

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

Open KBS-devs opened this issue 3 years ago • 15 comments

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 ?

KBS-devs avatar Jul 07 '21 09:07 KBS-devs

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

karanshrm44 avatar Jul 08 '21 08:07 karanshrm44

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

KBS-devs avatar Jul 08 '21 10:07 KBS-devs

Same issue since we upgraded to Expo 42 from Expo 39

fknop avatar Jul 13 '21 20:07 fknop

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

paul-leymet avatar Jul 15 '21 10:07 paul-leymet

Has anyone found a solution to this?

iamjonbradley avatar Jul 15 '21 19:07 iamjonbradley

  • Standalone apk is working fine with expo-pixi
  • For iOS, working fine with the latest version - https://dpq5q02fu5f55.cloudfront.net/Exponent-2.21.3.tar.gz
  • For Android, Issue in expo client - 2.21.4 and 2.21.5. So, Workaround is downgrade expo client 2.19.6 - https://d1ahtucjixef4r.cloudfront.net/Exponent-2.19.6.apk

viveksc1994 avatar Jul 16 '21 06:07 viveksc1994

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);
    }
  }
}

wkozyra95 avatar Jul 23 '21 11:07 wkozyra95

@wkozyra95 thanks, it works for me!

misajimenezmx avatar Jul 24 '21 05:07 misajimenezmx

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.

viveksc1994 avatar Jul 29 '21 06:07 viveksc1994

@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

wkozyra95 avatar Jul 29 '21 10:07 wkozyra95

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

vetrivendhan48 avatar Jul 30 '21 09:07 vetrivendhan48

Same problem, did anyone fix this?

leoflood avatar Sep 03 '21 18:09 leoflood

@viveksc1994

  • Standalone apk is working fine with expo-pixi
  • For Android, Issue in expo client - 2.21.4 and 2.21.5. So, Workaround is downgrade expo client 2.19.6 - https://d1ahtucjixef4r.cloudfront.net/Exponent-2.19.6.apk

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

alexislefebvre avatar Oct 06 '21 18:10 alexislefebvre

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.

alexislefebvre avatar Oct 07 '21 11:10 alexislefebvre

Same problem, did anyone fix this?

It depends

  • it is fixed on master
  • it is fixed on in [email protected](it's tagged as next currently and intended for sdk43) for bare projects, but you will need to switch to the new auto-linking setup (it's possible that updating react-native-unimodules to latest version might also work, but I'm not 100% sure about it)
  • it will be fixed in the next client release (when sdk43 will land), client fix will apply to all sdks
  • it will be fixed for standalone managed builds (when building with expo build:android) for sdk43
    • as far as I remember standalone builds for sdk41 and before were not affected
    • SDK 42 standalone builds will still have that issue

wkozyra95 avatar Oct 07 '21 14:10 wkozyra95