Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FitBit OS Simulator 0.8.0 Can't Read Files from Device

Using 

const listDir = fs.listDirSync("/private/data");

I get the following in my cli output: 

 

App: Error: opendir failed for: "/private/data"     

 

 

Fortunately I was able to downgrade back to 0.7.4 as I happened to have a backup.  To downgrade I had to (on mac) fully uninstall the simulator.  This includes deleting the following directory:

 

$HOME/Library/Application Support/Fitbit OS Simulator

 

 

After that, I was able to reinstall the old version of the simulator and my code works as expected.  Shortly after I was told that an update had been downloaded and I needed to install now or on restart.  I chose "On restart."  Then removed the downloaded update by deleting:

 

$HOME/Library/Application Support/Caches/@fitbitsimulator-updater/pending/*

 

 

Finally to prevent FitBit Studio from downloading updates again (because it's persistent 😉 ) I had to change the permissions on the pending folder.  The following will change the ownership to your root account, and then only allow read/write by root.  Since FitBit OS Simulator runs as your standard user, it is unable to write the update file to the download location, and updates are now blocked.

sudo chown root $HOME/Library/Application Support/Caches/@fitbitsimulator-updater/pending
sudo chmod 600 $HOME/Library/Application Support/Caches/@fitbitsimulator-updater/pending

 

I restarted the simulator and got a message that the update failed, permission denied.  That works for me.

 

To undo this you'll need to delete the cache directory as root.  That should allow you to download updates again: 

sudo rm -rf $HOME/Library/Application Support/Caches/@fitbitsimulator-updater
Best Answer
0 Votes
2 REPLIES 2

Thanks for the report! We've verified this issue and it'll be fixed in the next release.

Best Answer
0 Votes
Awesome! Thank you so much!
Best Answer
0 Votes