Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs init command not working #7717

Open
SunkPlane29 opened this issue Oct 8, 2020 · 10 comments
Open

ipfs init command not working #7717

SunkPlane29 opened this issue Oct 8, 2020 · 10 comments
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization

Comments

@SunkPlane29
Copy link

Version info:

go-ipfs version: 0.6.0
Repo version: 10
System version: amd64/windows
Golang version: go1.14.4

Description:

After running the command to initialize the daemon to later configure to use the web plugin I got this error: Error: mkdir C:\Users\Andr├®\.ipfs: O sistema não pode encontrar o caminho especificado. (the last translates to: "The system cannot find o specified path").
I believe what caused this error was my user folder having a non-ASCII character(André). I've already tried to change the folder's name once, but it didn't work(windows 10 hehe). To reproduce the error one could probably just create a windows user with a non-ASCII character.

@SunkPlane29 SunkPlane29 added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Oct 8, 2020
@welcome
Copy link

welcome bot commented Oct 8, 2020

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 currently aim to give initial feedback within two 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:

  • "Priority" labels will show how urgent this is for the team.
  • "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 support.

@jacobheun
Copy link
Contributor

We should fix the path encoding. As a workaround you can set the IPFS_PATH environment variable to a different path on your system

@aschmahmann
Copy link
Contributor

@SunkPlane29 I'm having trouble reproducing this on my machine

adin@ADIN-PC  ~\Andr├®                                                                                       [03:20]
❯ $env:IPFS_PATH = "C:\Users\adin\Andr├®\.ipfs"
adin@ADIN-PC  ~\Andr├®                                                                                       [03:21]
❯ ipfs-v0.6.0.exe init
initializing IPFS node at C:\Users\adin\Andr├®\.ipfs
generating 2048-bit RSA keypair...done
peer identity: Qme4RJjH5RbVxxeqUE9HsoeAdsVqxD6H42GtfqNZrrJnTg
to get started, enter:

        ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

Could you give a more precise step by step reproduction of the issue? Does it occur if you set IPFS_PATH to be your home directory instead of leaving it blank? Does it only occur in your home directory, or also if you use another directory with unicode encoding in the name?

@SunkPlane29
Copy link
Author

@aschmahmann My windows user has a special character (´). I think to reproduce the error you could set IPFS_PATH to a new directory with the name "André", with the path C:\Users\adin\André\.ipfs.

@aschmahmann
Copy link
Contributor

aschmahmann commented Oct 20, 2020

@SunkPlane29 trying it locally on Windows 10 still worked (below is my powershell output)

adin@ADIN-PC  ~\André                                                                                        [12:06]
❯ $env:IPFS_PATH="C:\Users\adin\André\.ipfs"
adin@ADIN-PC  ~\André                                                                                        [12:07]
❯ ipfs-v0.6.0.exe init
initializing IPFS node at C:\Users\adin\André\.ipfs
generating 2048-bit RSA keypair...done
peer identity: QmTeWw3rG12RUC6W3KE94UnLKdygW41wQHFEGwzPu4wrHy
to get started, enter:

        ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

If you are able to answer some of my questions above that would be helpful in diagnosing what's going on. Additionally, if you could print out what your IPFS_PATH is when getting the error that may be helpful too.

@aschmahmann
Copy link
Contributor

aschmahmann commented Oct 20, 2020

@djdv have you recently run into any issues like this in go-ipfs?

@jacobheun
Copy link
Contributor

This may have something to do with the locale setting on the machine, although I'm not familiar with how windows handles the character sets for various languages. The fact that C:\Users\André\.ipfs is the original path and the error is logging C:\Users\adin\Andr├®\.ipfs indicates to me that we're not properly locale encodings.

@djdv
Copy link
Contributor

djdv commented Oct 22, 2020

@aschmahmann
I installed an Italian version of Windows 10 and set up an account with my name accented and couldn't reproduce this with the latest release.
This isn't exactly the case as described though so maybe there is something particular to that text codepage and/or perhaps that glyph/range specifically. Could also be something with combining rune and diacritic characters versus a single glyph with a visible diacritic ... fun text things.

bene

I think @jacobheun is right here. The mojibake is usually an indicator of the text encoding being misinterpreted at some layer.
Without a repro I can't really investigate further though to find out which/where.

Go itself tends to handle this well by default though. I believe it tries to use utf8 encoding everywhere it can unless explicitly told otherwise. So it's kind of odd to see this.

@SunkPlane29
Can you tell me more about your version of Windows, and how you're starting ipfs?
If it's through cmd.exe can I get the output of chcp (looks like: Active code page: 437)
I can try to mimic your setup as close as I can to see if it happens for me.
Also if anything comes to mind about language or location settings that you can remember. Like installing an English version of Windows but later installing a language pack or anything like that, it'd be good to know.

MOST IMPORTANT
When you see this output, is it always the same?
For example, is it always Andr├®\.
If not, it could be memory corruption which has happened before due to use of the unsafe pkg within go-ipfs. Although this is unlikely since issues surrounding that were fixed already.

@SunkPlane29
Copy link
Author

Sorry for the late reply.

ENV INFO

My windows version is Windows 10 Home 2004.
The .ipfs is in the default ipfs desktop installation path: C:\Users\André\.ipfs.

WITH IPFS PATH

The environmental variable IPFS_PATH wasn't set before your replies. After setting IPFS_PATH to the path with special characters C:\Users\André\.ipfs the command still gives the same output:
image
(tried using both cmd and powershell)

As for the output error, it's always the same path error:

image

It is possible that this issue is only happening on my machine, I will be trying runnning the command on another user on the same machine and on an other machine aswell.

@aschmahmann
Copy link
Contributor

@SunkPlane29 what is your system locality? i.e. can you run Get-WinSystemLocale and give us the output.

My machine gives:

❯ Get-WinSystemLocale

LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)

Since the André folder works on my machine it seems like we might have different locale's and related encodings. So being able to replicate your environment will help us debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

4 participants