# WebGL error when creating engine in Android WebView

**URL:** <https://forum.babylonjs.com/t/webgl-error-when-creating-engine-in-android-webview/18370>\
**Category:** Questions\
**Created:** [February 12, 2021, 2:13am UTC](https://forum.babylonjs.com/t/webgl-error-when-creating-engine-in-android-webview/18370 "2021-02-12T02:13:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwbrown](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwbrown/32/13613_2.png) [@jwbrown](https://forum.babylonjs.com/u/jwbrown)\
**Post date:** [February 12, 2021, 2:13am UTC](https://forum.babylonjs.com/t/webgl-error-when-creating-engine-in-android-webview/18370/1 "2021-02-12T02:13:20Z")

</div>

I’m using BabylonJS (4.2.0 or 5.0.0-alpha) in an Android WebView. When I call `new Engine(canvas, true, {})`, I see the following error in the console:

`E/chromium: [ERROR:gles2_cmd_decoder_autogen.h(1612)] [.WebGL-0xca07af00]GL ERROR :GL_INVALID_ENUM : GetIntegerv: <- error from previous GL command`

(I see lots of other egl errors as well but this is the only one tagged as coming from chromium.)

I’m not sure whether this is a bug or something I’m doing wrong or perhaps it’s related to my device or emulator settings.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [February 12, 2021, 11:34am UTC](https://forum.babylonjs.com/t/webgl-error-when-creating-engine-in-android-webview/18370/2 "2021-02-12T11:34:23Z")

</div>

Your call is correct (as long as canvas is really a canvas), it could be an Angle bug:

> <https://github.com/pixijs/pixi.js/issues/5318>
>
> Chrome 70.0.3538.77, Ubuntu 18 Linux is throwing a warning on bare bones setup, code as follows:
> \`
> \<title\>Demo\</title\>
> \<script src="./pixi/pixi.min.js"\>\</script\>
> \<script\>
> let Application = PIXI.Application,
> ...

If you can provide a repro in the Playground we could (maybe) help more.

---

<div class="post-metadata">

**Author:** ![jwbrown](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jwbrown/32/13613_2.png) [@jwbrown](https://forum.babylonjs.com/u/jwbrown)\
**Post date:** [February 23, 2021, 12:32am UTC](https://forum.babylonjs.com/t/webgl-error-when-creating-engine-in-android-webview/18370/3 "2021-02-23T00:32:22Z")

</div>

I don’t see these errors on device, only in the Android emulators.
