metamask-extension
metamask-extension copied to clipboard
[Bug]: Auto-Lock Timer not taking into account virtual machine sleep time
Describe the bug
When running metamask inside chrome on a win10 virtual machine on a win10 vmware host, the auto-lock timer will stop it's tick when the vm is suspended or paused by vmware. So when I log into metamask, pause the vm, resume it the next day, metamask is still unlocked. (There is no discrepancy between the vm/host's clocks after the vm resume.)
Steps to reproduce
- log into metamask on chrome on a win10 vmware vm
- pause the vm
- resume the vm after you expect the auto-lock timer expires.
- Meta is still unlocked
Error messages or log output
No response
Version
MetaMask Version 10.14.6
Build type
No response
Browser
Chrome
Operating system
Windows
Hardware wallet
No response
Additional context
https://github.com/MetaMask/metamask-extension/blob/652d631cda4f1bd29b028189abc9c1e40598e1f0/app/scripts/controllers/app-state.js#L192-L195
I'd guess setTimeout is not reliable for use inside vm's. Checking for lock-expiration every second would fix it.