[Error] SecurityError: Failed to execute 'getGamepads' on 'Navigator'

Babylon: 6.7.0

The line in the code: https://github.com/BabylonJS/Babylon.js/blob/7e2e8a04bd2b02419045835385949c570e52aa2b/packages/dev/core/src/DeviceInput/webDeviceInputSystem.ts#L235

SecurityError: Failed to execute ‘getGamepads’ on ‘Navigator’: Access to the feature “gamepad” is disallowed by permissions policy.

at e._checkForConnectedDevices js/babylon-6_7_0.js
at e._enableEvents js/babylon-6_7_0.js
at e.attachControl js/babylon-6_7_0.js

See Permissions-Policy: gamepad

We need some try-catch-es :grinning:

cc @PolygonalSun

The workaround is to set null like this

navigator.getGamepads = null;