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

Failed to get repository: invalid character '<' looking for beginning of value #7720

Closed
2 of 7 tasks
gnaghi opened this issue Aug 2, 2019 · 7 comments
Closed
2 of 7 tasks
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@gnaghi
Copy link

gnaghi commented Aug 2, 2019

  • Gitea version (or commit ref): 1.9.0
  • Git version:
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I updated gitea from 1.8 to 1.9.0 (Ubuntu 18.04), and I can no longer push or pull anything.
On the ssh client side, I have the following message :
Gitea: Internal error Failed to get repository: Failed to get repository: invalid character '<' looking for beginning of value

Inside gitea.log :
routers/repo/http.go:97:HTTP() [E] GetUserByName: user does not exist [uid: 0, name: api, keyid: 0]

And inside serv.log :
[T] GetRepositoryByOwnerAndName: https://localhost:3000/api/internal/repo/XXXX/YYYY [...io/gitea/cmd/serv.go:195 runServ()] [F] Failed to get repository: Failed to get repository: invalid character '<' looking for beginning of value

Reverting back to 1.8 makes everything work again.

@zeripath
Copy link
Contributor

zeripath commented Aug 2, 2019

I think you have both gitea-1.8 and gitea-1.9 installed at the same time.

If you change the name of the gitea binary you have to run the admin task: "Update the '.ssh/authorized_keys' file with Gitea SSH keys."

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Aug 3, 2019
@gnaghi
Copy link
Author

gnaghi commented Aug 3, 2019

You were right : the service wasn't stopped, but I was able to connect to the web interface, and see the «1.9» version.
I stopped every instance of gitea, launched the 1.9 version, and I have new problem :

  • The web interface is not working
  • Git push/pull isn't either.
  • The gitea.log indicates that gitea is trying to update the database, but fails.

.../xorm/session_raw.go:226:Exec() [I] [SQL] CREATE TABLE new_access_token_new (idINTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,uidINTEGER NULL,nameTEXT NULL, created_unixINTEGER NULL,updated_unixINTEGER NULL,token_hashTEXT NULL,token_saltTEXT NULL,token_last_eight TEXT NULL, ...xorm/xorm/session.go:845:saveLastSQL() [I] [SQL] ROLL BACK routers/init.go:86:GlobalInit() [F] ORM engine initialization failed: migrate: do migrate: incomplete input

Should I open another issue and close this one ?
I'll try updating from each version between 1.8 and 1.9.

@gnaghi
Copy link
Author

gnaghi commented Aug 3, 2019

Upating from 1.8 to 1.9 failed, the last version working for me is 1.8.3.

@lunny
Copy link
Member

lunny commented Aug 4, 2019

This is a know issue with database sqlite when upgrade from 1.8 to 1.9

@gnaghi
Copy link
Author

gnaghi commented Aug 4, 2019

I saw the commit (#7710), I'll wait for a release.

@imamong
Copy link

imamong commented Sep 29, 2019

same error..

@lunny
Copy link
Member

lunny commented Sep 30, 2019

This has been fixed by #7765 and released on 1.9.1. Please confirm and if you have a different problem. Please open another issue.

@lunny lunny closed this as completed Sep 30, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

4 participants