diff --git a/.github/config.yml b/.github/config.yml index ed26646a0..5066fdaa7 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -8,9 +8,9 @@ newIssueWelcomeComment: > 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 currently aim to give - initial feedback within **two business days**. If this does not happen, feel - free to leave a comment. + 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 @@ -20,7 +20,7 @@ newIssueWelcomeComment: > - "Status" labels will show if this is ready to be worked on, blocked, or in progress. - "Need" labels will indicate if additional input or analysis is required. - Finally, remember to use https://discuss.ipfs.io if you just need general + Finally, remember to use https://discuss.ipfs.tech if you just need general support. # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome @@ -55,9 +55,9 @@ newPRWelcomeComment: > * The PR is merged by maintainers when it has been approved and comments addressed. - We currently aim to provide initial feedback/triaging within **two business - days**. Please keep an eye on any labelling actions, as these will indicate - priorities and status of your contribution. + We currently aim to provide initial feedback/triaging on best-effort basis, + which may take multiple business. Please keep an eye on any labelling + actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution! diff --git a/.gitignore b/.gitignore index abcc5701d..657d0fb30 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ config.gypi assets/webui *.nupkg *.bak +combined.log +error.log assets/build/snap-hooks diff --git a/README.md b/README.md index 0731d5b2b..ac3b6cd74 100644 --- a/README.md +++ b/README.md @@ -233,16 +233,25 @@ $ ipfs-desktop --no-sandbox ### Where are my IPFS configuration and log files? -You can open these files from the IPFS logo menu by selecting `Open Logs Directory` or `Open Configuration File` from the `Advanced` submenu. Or, find them in your OS as follows: +> [!IMPORTANT] +> IPFS Desktop app configuration is separate from the configuration and repository of Kubo IPFS node. + +You can open Desktop app and log files from the IPFS logo menu by selecting `Open Logs Directory` or `Open Configuration File` from the `Advanced` submenu. Or, find them in your OS as follows: - **Mac:** `~/Library/Application Support/IPFS Desktop/` - **Windows:** `%appdata%/IPFS Desktop/` - **Linux:** `~/.config/IPFS Desktop/` ### How does IPFS Desktop select the IPFS repo location? -IPFS Desktop uses [ipfsd-ctl](https://github.com/ipfs/js-ipfsd-ctl), which, by default, checks the `IPFS_PATH` environment variable. If that isn't set, it falls back to `$HOME/.ipfs`. As soon as the first run has succeeded, repository location info is saved in the configuration file, which becomes the source of truth. +> [!IMPORTANT] +> IPFS Desktop uses [Kubo](https://github.com/ipfs/kubo) implementation of IPFS node, which has its own configuration and repository, separate from the Desktop app. + +IPFS Desktop uses [ipfsd-ctl](https://github.com/ipfs/js-ipfsd-ctl) to locate Kubo repository. + +1. First, it checks the `IPFS_PATH` environment variable. +2. If that isn't set, it falls back to `$HOME/.ipfs`. As soon as the first run has succeeded, repository location info is saved in the configuration file, which becomes the source of truth. -To open your repo directory from the IPFS logo menu, select `Open Repository Directory` from the `Advanced` submenu. +To open your Kubo repo directory from the IPFS logo menu, select `Open Repository Directory` from the `Advanced` submenu. ### Which version of IPFS does IPFS Desktop use? @@ -280,7 +289,11 @@ These errors pop up from [ipfsd-ctl](https://github.com/ipfs/js-ipfsd-ctl) when This means you are attempting to run an older version of ipfs-desktop or Kubo than you have previously ran on your machine. Each Kubo version (which is included with ipfs-desktop) is tied to a specific IPFS repo version, which you can see at https://github.com/ipfs/fs-repo-migrations#when-should-i-migrate. -The ideal solution is to ensure you're running the latest version of ipfs-desktop, as upward migrations happen automatically. However, if you need to run the older version that is emitting this error, you will need to run a migration in reverse, manually. You can follow the official instructions [here](https://github.com/ipfs/fs-repo-migrations/blob/master/run.md) but with additional parameters: `fs-repo-migrations -revert-ok -to N`. See `fs-repo-migrations --help` for more information. +The ideal solution is to ensure you're running [the latest version of ipfs-desktop](https://github.com/ipfs/ipfs-desktop/releases/latest), as upward migrations happen automatically. + +It is possible that your `PATH` has different kubo version than the one bundled with IPFS Desktop, in such case you should update it to [the latest kubo binary](https://github.com/ipfs/kubo/releases/latest) as well. + +However, if you are an advanced user and you really need to run the older version that is emitting this error, you will need to run a migration in reverse, manually. You can follow the official instructions [here](https://github.com/ipfs/fs-repo-migrations/blob/master/run.md) but with additional parameters: `fs-repo-migrations -revert-ok -to N`. See `fs-repo-migrations --help` for more information. #### Found outdated fs-repo, migrations need to be run. - Error fetching: context deadline exceeded diff --git a/assets/locales/en.json b/assets/locales/en.json index b4f1d836a..36b3b8ca1 100644 --- a/assets/locales/en.json +++ b/assets/locales/en.json @@ -11,9 +11,10 @@ "restart": "Restart", "about": "About", "advanced": "Advanced", - "openRepoDir": "Open Repository Directory", - "openLogsDir": "Open Logs Directory", - "openConfigFile": "Open Configuration File", + "openRepoDir": "Open Kubo Repository Directory", + "openLogsDir": "Open Desktop Logs Directory", + "openConfigFile": "Open Desktop Configuration File", + "openKuboConfigFile": "Open Kubo Configuration File", "viewOnGitHub": "View on GitHub…", "helpUsTranslate": "Help Translate This App…", "readReleaseNotes": "Read Release Notes", diff --git a/src/dialogs/errors.js b/src/dialogs/errors.js index 3ba56b27e..aa035d88c 100644 --- a/src/dialogs/errors.js +++ b/src/dialogs/errors.js @@ -10,16 +10,12 @@ const issueTitle = (e) => { return `[gui error report] ${firstLine}` } -const issueTemplate = (e) => `👉️ Please describe what you were doing when this error happened. +const issueTemplate = (e) => ` -**Specifications** - -- **OS**: ${os.platform()} ${os.release()} -- **IPFS Desktop Version**: ${app.getVersion()} -- **Electron Version**: ${process.versions.electron} -- **Chrome Version**: ${process.versions.chrome} - -**Error** +- **Desktop**: ${app.getVersion()} +- **OS**: ${os.platform()} ${os.release()} ${os.arch()} +- **Electron**: ${process.versions.electron} +- **Chrome**: ${process.versions.chrome} \`\`\` ${e.stack} @@ -29,6 +25,10 @@ ${e.stack} let hasErrored = false function generateErrorIssueUrl (e) { + // Check if OS is supported at all + if (os.platform() === 'win32' && os.release().startsWith('6.1.')) { + return 'https://github.com/ipfs/ipfs-desktop/issues/2823#issuecomment-2163182898' // Windows 7 EOL + } // Check if error is one we have FAQ for if (e && e.stack) { const stack = e.stack @@ -37,6 +37,22 @@ function generateErrorIssueUrl (e) { return 'https://github.com/ipfs/ipfs-desktop?tab=readme-ov-file#i-got-a-repolock-error-how-do-i-resolve-this' case stack.includes('Error fetching'): return 'https://github.com/ipfs/ipfs-desktop?tab=readme-ov-file#i-got-a-network-error-eg-error-fetching-what-should-i-do' + case stack.includes('private key in config does not match id'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2821#issuecomment-2163117586' + case stack.includes('process cannot access the file because it is being used by another process'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2120#issuecomment-1114817009' + case stack.includes('Error: Exception 0xc0000005 0x8 0x0 0x0'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2823#issuecomment-2163182898' + case stack.includes('directory missing SHARDING file'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2037#issuecomment-1074464701' + case stack.includes('Error: Your programs version'): + return 'https://github.com/ipfs/ipfs-desktop?tab=readme-ov-file#error-your-programs-version-n-is-lower-than-your-repos-nx' + case stack.includes('_SecTrustEvaluateWithError'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2425#issuecomment-1457250858' + case stack.includes('config: The system cannot find the path specified'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2259#issuecomment-1239275950' + case stack.includes('bind: address already in use'): + return 'https://github.com/ipfs/ipfs-desktop/issues/2216#issuecomment-1199189648' } } // Something else, prefill new issue form with error details diff --git a/src/tray.js b/src/tray.js index 6d03ea2c2..11a566bd4 100644 --- a/src/tray.js +++ b/src/tray.js @@ -1,6 +1,8 @@ const { Menu, Tray, shell, app, ipcMain, nativeTheme } = require('electron') const i18n = require('i18next') const path = require('path') +const os = require('os') +const fs = require('fs-extra') const addToIpfs = require('./add-to-ipfs') const logger = require('./common/logger') const store = require('./common/store') @@ -158,12 +160,19 @@ async function buildMenu () { click: () => { shell.openPath(app.getPath('userData')) } }, { + label: i18n.t('openConfigFile'), + click: () => { shell.openPath(store.path) } + }, + { type: 'separator' }, + { + id: 'openRepoDir', label: i18n.t('openRepoDir'), - click: () => { shell.openPath(store.get('ipfsConfig.path')) } + click: () => { shell.openPath(getKuboRepositoryPath()) } }, { - label: i18n.t('openConfigFile'), - click: () => { shell.openPath(store.path) } + id: 'openKuboConfigFile', + label: i18n.t('openKuboConfigFile'), + click: () => { shell.openPath(path.join(getKuboRepositoryPath(), 'config')) } }, { type: 'separator' }, { @@ -344,6 +353,9 @@ module.exports = async function () { menu.getMenuItemById('checkForUpdates').visible = !isUpdating menu.getMenuItemById('checkingForUpdates').visible = isUpdating + menu.getMenuItemById('openRepoDir').enabled = fs.pathExistsSync(getKuboRepositoryPath()) + menu.getMenuItemById('openKuboConfigFile').enabled = fs.pathExistsSync(path.join(getKuboRepositoryPath(), 'config')) + if (status === STATUS.STARTING_FINISHED) { tray.setImage(icon(on)) } else { @@ -406,3 +418,15 @@ module.exports = async function () { ctx.setProp('tray', tray) logger.info('[tray] started') } + +function getKuboRepositoryPath () { + let ipfsPath = store.get('ipfsConfig.path') + if (!ipfsPath) { + ipfsPath = process.env.IPFS_PATH + if (!ipfsPath) { + const homeDir = os.homedir() + ipfsPath = path.join(homeDir, '.ipfs') + } + } + return ipfsPath +}