FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.44k stars 637 forks source link

Error initializing a repository #176

Closed diegoferigo closed 11 years ago

diegoferigo commented 11 years ago

On ArchLinux i get a Whooops when i initialize a repo. Then, pressing F5 brings me always to the error page, to do anything i need to clear the entire folder.

I followed these steps:

diego@eeepc ~>mkdir /tmp/testrepo
diego@eeepc ~>cd /tmp/testrepo/
diego@eeepc testrepo>ungit 
info: App version: 0.1.7
info: App version: 0.1.7
info: socket.io started
info: Listening on port 8484
Browse to http://localhost:8484/#/repository?path=%2Ftmp%2Ftestrepo
## Ungit started ##
info: GET /
info: GET /
info: GET /css/styles.css
info: GET /config.js
info: GET /version.js
info: GET /js/bugsense.js
info: GET /js/ungit.js
info: handshake authorized
info: GET /api/latestversion
info: GET /images/logo.png
info: GET /images/repositoryBackgroundArrowUp.png
info: GET /images/logoLarge.png
info: GET /api/status?path=%2Ftmp%2Ftestrepo

# Here i press the init button

info: POST /api/init
info: GET /api/status?path=%2Ftmp%2Ftestrepo
info: GET /api/status?path=%2Ftmp%2Ftestrepo
info: GET /images/remoteIcon.png
info: GET /images/branchIcon.png
info: GET /images/tagIcon.png
info: GET /api/status?path=%2Ftmp%2Ftestrepo
info: GET /api/log?path=%2Ftmp%2Ftestrepo&limit=25
info: Start watching /tmp/testrepo
info: GET /api/checkout?path=%2Ftmp%2Ftestrepo
info: GET /api/remotes?path=%2Ftmp%2Ftestrepo
info: POST /api/fetch

I'm on nodejs v0.10.17. Btw, if I clone a github repo all seems fine. Let me know if you need others info.

FredrikNoren commented 11 years ago

Hm what does the console in the browser say?

diegoferigo commented 11 years ago
Viewport argument key "" not recognized and ignored. localhost:8484/:5
App version: 0.1.7 localhost:8484/:496
Initing bugtracking localhost:8484/:498
Failed to load resource: the server responded with a status of 400 (Bad Request) http://localhost:8484/api/status?path=%2Ftmp%2Ftestrepo
POST http://localhost:8484/api/fetch 400 (Bad Request) ungit.js:1468
Request.end ungit.js:1468
Api.query ungit.js:6519
RepositoryViewModel.fetch ungit.js:7795
(anonymous function) ungit.js:7765
(anonymous function) ungit.js:37
o ungit.js:17
(anonymous function) ungit.js:37
L.b.r.K ungit.js:38
L.b.S.fn.notifySubscribers ungit.js:37
d.G ungit.js:39
d ungit.js:39
(anonymous function) ungit.js:7829
(anonymous function) ungit.js:6545
Request.callback ungit.js:1350
(anonymous function) ungit.js:1101
Emitter.emit ungit.js:598
xhr.onreadystatechange ungit.js:1425
undefined bugsense.js:460
bugsenseNotify bugsense.js:460
bugsenseonerror bugsense.js:536
window.onerror ungit.js:8624
Uncaught Error: Backend: /fetch, Error: Command failed: fatal: Nessun repository remoto specificato. Per favore, specifica un URL o ungit.js:6541
(anonymous function) ungit.js:6541
Request.callback ungit.js:1350
(anonymous function) ungit.js:1101
Emitter.emit ungit.js:598
xhr.onreadystatechange ungit.js:1425
logged 1 error to Bugsense, status: {"data": {"eid": 201343614, "handled": false}, "error": null} bugsense.js:215

And then, updating the whooops page it's the same excluding the last line:

logged 1 error to Bugsense, status: {"status": 402, "data": [], "error": "Throttling limit reached."} bugsense.js:215

Oh, never mentioned i'm on chromium 29.0.1547.62.

FredrikNoren commented 11 years ago

Ah, looks like your git is outputing stuff in italian. Unfortunately ungit relies heavily on parsing git output and right now it needs to be in english. It might be possible to start ungit with LANG=en_US ungit as a quick fix but I've never tried it. Long term ungit should just work no matter what locale you're running On 31 Aug 2013 19:26, "dieghen89" notifications@github.com wrote:

Viewport argument key "" not recognized and ignored. localhost:8484/:5 App version: 0.1.7 localhost:8484/:496 Initing bugtracking localhost:8484/:498 Failed to load resource: the server responded with a status of 400 (Bad Request) http://localhost:8484/api/status?path=%2Ftmp%2Ftestrepo POST http://localhost:8484/api/fetch 400 (Bad Request) ungit.js:1468 Request.end ungit.js:1468 Api.query ungit.js:6519 RepositoryViewModel.fetch ungit.js:7795 (anonymous function) ungit.js:7765 (anonymous function) ungit.js:37 o ungit.js:17 (anonymous function) ungit.js:37 L.b.r.K ungit.js:38 L.b.S.fn.notifySubscribers ungit.js:37 d.G ungit.js:39 d ungit.js:39 (anonymous function) ungit.js:7829 (anonymous function) ungit.js:6545 Request.callback ungit.js:1350 (anonymous function) ungit.js:1101 Emitter.emit ungit.js:598 xhr.onreadystatechange ungit.js:1425 undefined bugsense.js:460 bugsenseNotify bugsense.js:460 bugsenseonerror bugsense.js:536 window.onerror ungit.js:8624 Uncaught Error: Backend: /fetch, Error: Command failed: fatal: Nessun repository remoto specificato. Per favore, specifica un URL o ungit.js:6541 (anonymous function) ungit.js:6541 Request.callback ungit.js:1350 (anonymous function) ungit.js:1101 Emitter.emit ungit.js:598 xhr.onreadystatechange ungit.js:1425 logged 1 error to Bugsense, status: {"data": {"eid": 201343614, "handled": false}, "error": null} bugsense.js:215

And then, updating the whooops page it's the same excluding the last line:

logged 1 error to Bugsense, status: {"status": 402, "data": [], "error": "Throttling limit reached."} bugsense.js:215

— Reply to this email directly or view it on GitHubhttps://github.com/FredrikNoren/ungit/issues/176#issuecomment-23610430 .

diegoferigo commented 11 years ago

Yeah, you're right. Ungit is working if started with the following commands:

LANG=en_US ungit

or

LC_ALL=C ungit

I think you should write this somewhere to avoid duplicates of this issue. Thanks, btw great work!

FredrikNoren commented 11 years ago

I just pushed a new version (0.1.8), @dieghen89 do you mind trying if it works without setting the locale by hand now?

diegoferigo commented 11 years ago

Work like a charm, thanks!