Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

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

Open
KBS-devs opened this issue Jul 7, 2021 · 15 comments

Comments

@KBS-devs
Copy link

KBS-devs commented Jul 7, 2021

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
Copy link

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

@KBS-devs
Copy link
Author

KBS-devs commented Jul 8, 2021

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

@fknop
Copy link

fknop commented Jul 13, 2021

Same issue since we upgraded to Expo 42 from Expo 39

@paul-leymet
Copy link

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

@iamjonbradley
Copy link

Has anyone found a solution to this?

@viveksc1994
Copy link

@wkozyra95
Copy link
Contributor

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
Copy link

@wkozyra95 thanks, it works for me!

@viveksc1994
Copy link

viveksc1994 commented Jul 29, 2021

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
Copy link
Contributor

@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
Copy link

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

@leoflood
Copy link

leoflood commented Sep 3, 2021

Same problem, did anyone fix this?

@alexislefebvre
Copy link

@viveksc1994

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

@alexislefebvre
Copy link

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
Copy link
Contributor

Same problem, did anyone fix this?

It depends

  • it is fixed on master
  • it is fixed on in expo-gl@11.0.1(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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests