Cannot use apm publish minor: 'The header content contains invalid characters'


#1

I tried to publish a new package but failed.

In MINGW32 command window in Windows, I move to the repository folder, and ran apm publish minor, but obtained the following error:

The header content contains invalid characters

This is a brand new repository for a grammar, and it worked well locally. I have created public GitHub repository.

Can anyone let me know what could be the problem? Does it need to be done from macOS?


"The header content contains invalid characters"
#2

I don’t know why the minGW shell would be a problem, but have you tried from the command prompt?


#3

Just tried. Exactly the same error message.


#4

Wondering what’s wrong, I changed the url below, according to this example

  "repository": {
    "type": "git",
    "url": "https://github.com/kouichi-c-nakamura/language-spike2"
  },

Now reads:

  "repository": {
    "type": "git",
    "url": "https://github.com/kouichi-c-nakamura/language-spike2.git"
  },

But still the same error.


#5

I don’t know. I don’t see anything out of place, or anything there that shouldn’t be there.


#6

Thank you for having a look! I’ll clone the repo to another computer and try again from there.


#7

Now I cloned it to a Mac (macOS Sierra). In Terminal, I ran xcode-select --install and then brew install git. Finally, tried apm publish minor and … I got this:

Publishing language-spike2@v0.1.0 ✗
Creating new version failed: Git tag not found

This seems related, but the solution is unclear.


#8

I see your package as having been published. Did you figure it out?


#9

Not at all. I don’t at which point the package has been published. Not very useful …

But thank you for letting me know, anyway!


#10

By checking the sha, It turned out that both the two attempts from Mac, which both issued an error, were actually successful.


#11

Wait, README.md is not shown is the package page. Still, something is wrong.


#12

Okay, so I tried to install it myself and I got an error.

> apm install language-spike2
Installing language-spike2 to C:\Users\stick\.atom\packages failed
No releases available for language-spike2

@rsese? @leedohm? Can you give us any insight?


#13

Thanks. It does not appear in Atom GUI search list either.

There are some people who encounter the same error and overcome it.

However, …

$ apm --version
apm  1.18.4
npm  3.10.10
node 6.9.5 x64
python 2.7.13
git 2.8.2

$ apm publish --tag v0.2.1
Publishing language-spike2@v0.2.1 ✗
Creating new version failed: Git tag not found

$ apm publish --tag v0.2.0
Publishing language-spike2@v0.2.0 ✗
Creating new version failed: Git tag not found

$ apm publish --tag v0.1.0
Publishing language-spike2@v0.1.0 ✗
Creating new version failed: Git tag not found

$ apm publish --tag v0.0.0
Publishing language-spike2@v0.0.0 ✗
Creating new version failed: Git tag not found

#14

If I can’t publish it, can I unpublish it? Yes.

$ apm unpublish language-spike2
Are you sure you want to unpublish ALL VERSIONS of 'language-spike2'? This will remove it from the apm registry, including download counts and stars, and this action is irreversible. (no)yes
Unpublishing language-spike2 ✓

Comfimed that the link is now dead.


#15

Without a hope, I tried this again, and … tada!

$ apm publish --tag v0.2.1
Registering language-spike2 ✓
Publishing language-spike2@v0.2.1 ✓
Congrats on publishing a new package! 👍  📦  🎉
Check it out at https://atom.io/packages/language-spike2

#16

Huzzah! Glad it worked out.


#17

Glad things worked out after unpublishing/publishing - there were a couple of issues that I had run into with a couple of folks a while ago but they were related to permissions issues which doesn’t seem like was the problem here.

Thanks for helping out as always @DamnedScholar :bow:


#18

Thank you guys!!

I was a bit worried, but, later,$ apm publish patch worked successfully. It seems that once it’s been published, it’s OK.