webvr-ui icon indicating copy to clipboard operation
webvr-ui copied to clipboard

Latest Firefox nightly wont start presenting

Open HalfdanJ opened this issue 7 years ago • 12 comments

Not giving any meaningful errros why it wont work. Looking into it now. @andreasplan8

HalfdanJ avatar Apr 07 '17 15:04 HalfdanJ

Turns out its not anymore allowed to wrap the requestPresent into a promise. Its apparently not considered a user action anymore.

https://github.com/googlevr/webvr-ui/blob/master/src/enter-vr-button.js#L187

Not sure if this is the intended behavior from firefox.

HalfdanJ avatar Apr 07 '17 15:04 HalfdanJ

Filed a bug on firefox to see if this is intended. https://bugzilla.mozilla.org/show_bug.cgi?id=1354573

HalfdanJ avatar Apr 07 '17 15:04 HalfdanJ

@HalfdanJ can you try again with the latest Nightly?

cvan avatar Apr 13 '17 21:04 cvan

@cvan tried it tonight with 55.0a1 (2017-04-13) (64-bit) and it did still reject the request to present.

hapticdata avatar Apr 14 '17 05:04 hapticdata

@cvan, notice we have merged a hotfix, so the examples do work. But the hotfix is not the most elegant.

HalfdanJ avatar Apr 14 '17 11:04 HalfdanJ

@HalfdanJ: can you point me to the lines in the source of the workaround?

cvan avatar Apr 17 '17 01:04 cvan

@cvan in my tests, this made the difference: https://github.com/googlevr/webvr-ui/pull/9/commits/d898223123e3148ee1cf182c8b84bd28c286f067#diff-92e430347c391062250a259e759510deR235

If I call requestPresent from inside a new Promise() it works fine, but if I call requestPresent after one more promise, it wont work, but by bypassing the beforeEnter code in our library, it works.

So in a gist, something like this wont work (at least thats what I see in our code)

var beforeEnter = function(){ 
  return  new Promise(function(resolve){
      resolve();
   })
};

new Promise(function(resolve,reject){
   return beforeEnter().then(function(){
      startPresentation()
   })
})

but this works:

new Promise(function(resolve,reject){
   return startPresentation()
})

HalfdanJ avatar Apr 17 '17 11:04 HalfdanJ

Will the builds that are posted be rebuilt with the fix?

Sgeo avatar Jun 01 '17 01:06 Sgeo

@cvan hey chris, any info if this is considered an issue in firefox or intended behavior? If its intended we should change our library so we dont have the hotfix like this.

HalfdanJ avatar Jun 21 '17 17:06 HalfdanJ

Fixing this is a breaking change, so scheduling for a 2.0 release

HalfdanJ avatar Nov 15 '17 18:11 HalfdanJ

@HalfdanJ sorry, I didn't catch your comments here. this is not expected behaviour, and it needs to be fixed in Firefox. I don't have an ETA though. if you can, working around it for now would be great. thank you (and apologies)!

cvan avatar Nov 16 '17 00:11 cvan

Ah great!

HalfdanJ avatar Nov 16 '17 17:11 HalfdanJ