Dock preferences not saved Ive been rattled out of my mind for the past few days. What started the issue was a random kernel panic that rest all my dock settings. initially i thought it would be due fixed on restart, however no preferences are saved at all. 

Steps i have tried

I ran Killall Dock but it just resets it to default. 
Tried to locate com.apple.Dock.plist and delete it but initially there was no file which is strange. So i copied the sc from the apple website and recreated the file and placed it in ./library/application support/dock
Still no solution

another thing to note was that my VsCode was giving me a write error to the same folder which i fixed by deleting the old code folder

Specs: MBA 2015 on High Sierra
Since no one found an answer im gonna post my solution

The initial error that affected a bunch of other applications was a mismatch in the write permissions on the ~/Library/Application Support/ folder I deleted the said folder and restarted the application as the write permissions were not an issue in the get info section

Afterward my terminal froze . so i set it to bash/sh to fix it
KillAll dock and it worked. I cant exaclty explain what the issue was but i suggest that the system couldnt read the com.apple.Dock.plist