DOMException: Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy.
12

We are randomly getting this error while loading the game

DOMException: Failed to execute 'getGamepads' on 'Navigator': Access to the feature "gamepad" is disallowed by permissions policy.

Issue is happening only on Facebook. Facebook seems to be adding gamepad=() in Permissions-Policy which breaks the game.

This seems to be happening with many other games on Facebook. Has anyone found any fix or workaround for this issue?

Gaurang
質問日時: 約10ヶ月前
Alexey

we have the same problem. occurs more often in Chrome. it started suddenly about 12 hours ago without any action on our part.

if we clean the cache, the game will start once, but after rebooting, the error will appear again

12月5日 1:19
選択された回答
1

We're facing the same issue

12月6日 7:33
Markus
2

we have also get this error

12月5日 6:20
Abdul
2

Same here

12月5日 10:25
Illia
2

We are facing same issue in our game.

12月5日 20:11
Sujeet
7

in our case (unity webgl game) this workaround worked for us: navigator.getGamepads = null;

12月5日 14:24
Diego
Abdul

can you share the file or tell us where to add this

12月5日 20:26
Diego

this line of javascript code need to be executed before the file which is causing the error be loaded

12月5日 21:13
Sujeet

We did this change in javascript file which loads Unity and its working now. Thanks for the workaround.

12月5日 22:27
Illia

It is working for us, thank you!

12月6日 0:38
Vitalii

Yeah, it is working, thank you

12月6日 1:22
Hugo

work!

12月6日 4:40
Min

Thank you for your sharing!

12月6日 18:41