Skip to content

Commit

Permalink
docs: add more known soutions (#2829)
Browse files Browse the repository at this point in the history
* docs: add more known soutions

Closes #2782
Closes #2794
Closes #2808
Closes #2817

* docs: windows 7 end of life

* docs: directory missing SHARDING file

* docs: Error: Your programs version

* docs: config: The system cannot find the path specified

Close #2259

* docs: bind: address already in use

* docs: clarify desktop vs kubo config paths

* docs: win7 eol and incl. arch in bug reports

* fix: Open Kubo idir and Config menu options

This makes our docs match reality, and also make it clear which dir and
config is from Desktop, and which one is from Kubo.

Historically, users were really confused, and were editing Desktop JSON
because there was no option for accessing Kubo config when Desktop app
failed to start.
  • Loading branch information
lidel authored Jun 12, 2024
1 parent 0cd87ab commit 3ac05a4
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 26 deletions.
14 changes: 7 additions & 7 deletions .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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!
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ config.gypi
assets/webui
*.nupkg
*.bak
combined.log
error.log
assets/build/snap-hooks
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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?

Expand Down Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
34 changes: 25 additions & 9 deletions src/dialogs/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => `<!-- 👉️ Please describe HERE what you were doing when this error happened. -->
**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}
Expand All @@ -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
Expand All @@ -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
Expand Down
30 changes: 27 additions & 3 deletions src/tray.js
Original file line number Diff line number Diff line change
@@ -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')
Expand Down Expand Up @@ -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' },
{
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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
}

0 comments on commit 3ac05a4

Please sign in to comment.