question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ungit stopped working on Chrome 57

See original GitHub issue

The recent version of Chrome gives me the “Whooops - Something went wrong, reload the page to start over.” message. The same server & directory works in Firefox. Chrome private mode does not fix it either. Accessing both via localhost or 127.0.0.1 do not work in chrome, both work in Firefox.

Versions:

  • OS: Arch Linux
  • chrome: 57.0.2987.110 (64-bit)
  • firefox: 52.0 (64-bit)
  • node: 6.10.1
  • npm: 4.4.1
  • ungit: 1.1.11

My server.log (via ungit --logRESTRequests --logGitCommands --logGitOutput) Chrome’s browser console output. Any other Information I can provide?

by the way: very nice work on ungit!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
guillaumedavidphdcommented, Mar 24, 2017

I had the same issue. One of my ad blockers was breaking ungit: uBlock Origin. After disabling it on localhost everything went back to normal.

1reaction
leonadlercommented, Mar 22, 2017

The error thrown seems to be caused by an XHR returning status 0 for GET /api/log in server.js:

Server.prototype._httpJsonRequest = function(request, callback) {
  var httpRequest = new XMLHttpRequest();
  httpRequest.onreadystatechange = function() {
    // It seems like you can get both readyState == 0, and readyState == 4 && status == 0 when you lose connection to the server
    if (httpRequest.readyState === 0) {
      callback({ error: 'connection-lost' });
    } else if (httpRequest.readyState === 4) {
      var body;
      try {
        body = JSON.parse(httpRequest.responseText);
      } catch(ex) { body = null; }
      if (httpRequest.status == 0) {
      	callback({ error: 'connection-lost' });  // <--- error is thrown here
      }
      else if (httpRequest.status != 200) callback({ status: httpRequest.status, body: body, httpRequest: httpRequest });
      else callback(null, body);
    }
  }
  var url = request.url;
  if (request.query) {
    url += '?' + this._queryToString(request.query);
  }
  httpRequest.open(request.method, url, true);
  httpRequest.setRequestHeader('Accept', 'application/json');
  if (request.body) {
    httpRequest.setRequestHeader('Content-Type', 'application/json');
    httpRequest.send(JSON.stringify(request.body));
  } else {
    httpRequest.send(null);
  }
}

Properties of request:

{
    "method": "GET",
    "url": "/api/log",
    "query": {
        "path": "/home/leon/Development/immutablets",
        "limit": 25,
        "skip": 0,
        "socketId": 0
    }
}

Opening the endpoint directly in a new tab returns HTTP 200 and a proper JSON body.

I can reproduce it on every run, if I can provide any more information to narrow it down, let me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Chrome update problems & failed updates - Google Support
If you're having problems updating Chrome on your computer, you might see: Update failed: Updates are disabled by administrator; Update failed (Error: 3...
Read more >
Unfit: The Documentary Film - TO RECAP: Our film UNFIT is a ...
The film presents a discussion, analysis, and examination of the behavior, psyche, condition, and stability of Donald Trump. This film is not political...
Read more >
Official Releases - Akeeba Backup
Site Transfer Wizard wouldn't work on Firefox. We have only been able to reproduce this issue on Firefox Quantum (version 57 and later)....
Read more >
Six sheriffs sue Pritzker's administration over delay in unfit detainee ...
The problem has been happening since before the pandemic, but was made more acute after Gov. J.B. Pritzker's COVID-19 executive orders in April...
Read more >
Ivy League Grad Unfit for Trial in Death of NYC Hedge-Fund ...
He pleaded not guilty in February to murder and other charges. ... The elder Gilbert, also a Princeton alumnus, worked on Wall Street...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found