ipfs / ipfs-desktop

An unobtrusive and user-friendly desktop application for IPFS on Windows, Mac and Linux.
https://docs.ipfs.tech/install/ipfs-desktop/
MIT License
5.94k stars 857 forks source link

[gui error report] SyntaxError: C:\Users\Asus\.ipfs\config: Expected property name or '}' i #2849

Closed Aritra15 closed 2 days ago

Aritra15 commented 1 month ago
SyntaxError: C:\Users\Asus\.ipfs\config: Expected property name or '}' in JSON at position 4 (line 2 column 3)
    at JSON.parse (<anonymous>)
    at Object.readFileSync (C:\Users\Asus\IPFS Desktop\resources\app.asar\node_modules\jsonfile\index.js:52:17)
    at readConfigFile (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\config.js:68:13)
    at checkPorts (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\config.js:332:18)
    at getIpfsd (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\daemon.js:71:16)
    at async startDaemon (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\daemon.js:210:17)
    at async startIpfs (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\index.js:49:17)
    at async setupDaemon (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\daemon\index.js:116:3)
    at async Promise.all (index 1)
    at async run (C:\Users\Asus\IPFS Desktop\resources\app.asar\src\index.js:68:5)
welcome[bot] commented 1 month ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We are triaging issues on weekly basis and aim to give initial feedback within a few business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.tech if you just need general support.

lidel commented 2 days ago

@Aritra15 seems that you manually edited C:\Users\Asus\.ipfs\config file and introduced an error. If you did not, then your hard drive/filesystem has an error.

If you want to manually fix this provlem, you can

  1. stop IPFS Desktop and move C:\Users\Asus\.ipfs to C:\Users\Asus\.ipfs.bak
  2. start IPFS Desktop and confirm a fresh C:\Users\Asus\.ipfs was created with valid config
  3. stop IPFS Desktop and move C:\Users\Asus\.ipfs to C:\Users\Asus\.ipfs.fresh-and-valid
  4. compare C:\Users\Asus\.ipfs.bak with C:\Users\Asus\.ipfs.fresh-and-valid and identify the difference, if you can't identify it, you can use config from .ipfs.fresh-and-valid
  5. move C:\Users\Asus\.ipfs.bak to C:\Users\Asus\.ipfs and update config to a working version