webaverse / xrpackage

XR (VR+AR) web object packaging core API
https://xrpackage.org/
24 stars 10 forks source link

Puppeteer does not capture gifs properly #112

Open avaer opened 4 years ago

avaer commented 4 years ago

It looks like on MacOS, puppeteer makes empty gifs of this package: http://packages.exokit.org/animu

The screenshot: https://ipfs.exokit.org/ipfs/QmbmkBHPzWDh17gUA5Q7stpKnt7y4tmUvA27mzaHLqRv4K.gif

It might have regressed with https://github.com/webaverse/xrpackage/pull/101 ?

shu8 commented 4 years ago

I tried running this on a linux instance and it seems to fail on that too. The exact error/warnings are like:

WebGL: INVALID_OPERATION: renderbufferStorageMultisample: samples out of range
...
[.WebGL-0x1f6eefec4e00]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawElements: framebuffer incomplete

puppeteer-bake-error

and then the page crashes.

It works fine on my Windows machine though! E.g. using the web bake button https://xrpackage.org/inspect.html?p=animu in the new Actions tab, or xrpk bake on the command line with Puppeteer (both headless and headful).

Do you have an thoughts on where to start debugging for this error?

avaer commented 4 years ago

@shu8 Yes, the first step is to find which piece of code is causing this difference. Run this in a non-puppeteer browser. Also, run the package without xrpk wrapping the WebGL calls, in a non-puppeteer browser.

This could be caused by the fact that we try to create a multisampled framebuffer for AA, but this linux box/VM doesn't support it: https://github.com/webaverse/xrpackage/blob/master/xrpackage.js#L482

avaer commented 4 years ago

https://github.com/webaverse/xrpackage/issues/114