Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 13 >> Still getting error WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL #107

Closed
andrewdeutsch opened this issue Jul 31, 2019 · 7 comments

Comments

@andrewdeutsch
Copy link

Describe the bug
We updated our Jeeliz library on July 15th to make the apps function in Safari on iOS 13. Unfortunately, when running the apps with the version of the library that forces it to use Web GL1, we get this error:
WebGL: INVALID_OPERATION: texImage2D: type HALF_FLOAT_OES but ArrayBufferView is not NULL
To Reproduce
Steps to reproduce the behavior:

  1. Go to https://bit.ly/316fVRm in Safari running iOS 13
  2. Allow camera when asked
  3. Open debugger on your desktop
  4. See error

Expected behavior
After granting camera access, an AR experience should load.

Smartphone (please complete the following information):

  • Device: iPhone X
  • OS: iOS 13
  • Browser Safari

Please let me know if you have any questions. Thanks!

@xavierjs
Copy link
Member

Hi Andrew,

I will test tomorrow with an Iphone X.
Does the boilerplate works: https://jeeliz.com/demos/faceFilter/demos/threejs/cube/
?

I notice in your demo that you are using non power of 2 textures (I got these warnings):

THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.

I guess it is because of the glasses texture: https://cartridges.movableink-templates.com/apps/movableink/studio-ar/ar-2d-face-tracker/4f9765f0c29e0b535738296e79ffbe2578159831/app/img/MI-Glasses.png
which is 391142 pixels
You should use only textures which dimensions are power of 2 (resize it to 512
256 pixel should make the job) or disable texture tiling by doing:

yourThreeTexture.wrapS = THREE.ClampToEdgeWrapping;
yourThreeTexture.wrapT = THREE.ClampToEdgeWrapping;

The warning you have notices is normal, it is when we are testing real webgl capabilities. It is handled. But there is another problem for sure, it should work on Iphone X.

@andrewdeutsch
Copy link
Author

Hey Xavier,
I just tested the boilerplate and it generated the identical results listed above.
Good call re: the PO2 assets, but we generally do not use power of two and don't encounter errors (due to the assets being so lightweight).

Running the boilerplate, the errors are pointing to this in jeelizFaceFilter.js:
image

I also ran a test using power of 2 images. The results were the same.

Thanks, Xavier.

@xavierjs
Copy link
Member

xavierjs commented Jul 31, 2019

I will work on it tomorrow.
It may be the same issue as #85

@xavierjs
Copy link
Member

xavierjs commented Aug 1, 2019

Hi Andrew

I tested on IPhone XR with Safari and IOS 13.0 beta4 (the latest) and both your demo and the boilerplate work.

Did you update the helper too ?
When I rotate the head looking top/bottom il your demo the glasses are too far (not like in the glasses virtual try on demo provided in this repo https://jeeliz.com/demos/faceFilter/demos/threejs/VTO/)

Do you have another opened app which might use the camera ?

@xavierjs
Copy link
Member

xavierjs commented Aug 1, 2019

It seems they have some issue with WebRTC: https://bugs.webkit.org/show_bug.cgi?id=185448
Does this webapp work: https://qrsnapper.appspot.com/
(it should just display the camera video) ?

@andrewdeutsch
Copy link
Author

andrewdeutsch commented Aug 1, 2019 via email

@xavierjs
Copy link
Member

xavierjs commented Aug 1, 2019

Hi Andrew,

This is a great news :). I guess Twitter and Gmail are using SFSafariViewController instead of WkWebview. And camera access was enabled for this component on IOS13 (source: https://www.imyfone.com/ios-data-erase/safari-11-1-in-ios-11-3/ )

I hope they will enable camera access for WkWebview as well.

Best,
Xavier

@xavierjs xavierjs closed this as completed Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants