softvis-research/jqa-dashboard

Neo4jError in online demo

naraesk opened this issue · 7 comments

The online demo (http://139.18.211.212:3000/#/dashboard) does not work for me. The following error I get every time without clicking on anything.

×
Unhandled Rejection (Neo4jError): WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: 3
▼ 4 stack frames were expanded.
captureStacktrace
/node_modules/neo4j-driver/lib/browser/neo4j-web.js:22600
new Result
/node_modules/neo4j-driver/lib/browser/neo4j-web.js:22466
Session._run
/node_modules/neo4j-driver/lib/browser/neo4j-web.js:23000
Session.run
/node_modules/neo4j-driver/lib/browser/neo4j-web.js:22978
▲ 4 stack frames were expanded.
DashboardModel.readTestCoverageMetrics
/src/api/models/Dashboard.js:323
  320 | readTestCoverageMetrics(thisBackup) {
  321 |     var testCoverageMetrics = [];
  322 | 
> 323 |     neo4jSession
      | ^  324 |         .run(this.state.queryStringTestCoverage)
  325 |         .then(function(result) {
  326 |             result.records.forEach(function(record) {
View compiled
Dashboard.componentDidMount
/src/views/Dashboard/Dashboard.js:78
  75 | dashboardModel.readActivityMetrics(this);
  76 | dashboardModel.readStaticCodeAnalysisPMDMetrics(this);
  77 | dashboardModel.readHotspotMetrics(this);
> 78 | dashboardModel.readTestCoverageMetrics(this);
     | ^  79 | 
  80 | this.setState({
  81 |     queryStructure: localStorage.getItem(
View compiled
▼ 18 stack frames were expanded.
commitLifeCycles
/node_modules/react-dom/cjs/react-dom.development.js:18115
commitAllLifeCycles
/node_modules/react-dom/cjs/react-dom.development.js:19674
HTMLUnknownElement.callCallback
/node_modules/react-dom/cjs/react-dom.development.js:147
invokeGuardedCallbackDev
/node_modules/react-dom/cjs/react-dom.development.js:196
invokeGuardedCallback
/node_modules/react-dom/cjs/react-dom.development.js:250
commitRoot
/node_modules/react-dom/cjs/react-dom.development.js:19898
(anonymous function)
/node_modules/react-dom/cjs/react-dom.development.js:21446
unstable_runWithPriority
/node_modules/scheduler/cjs/scheduler.development.js:255
completeRoot
/node_modules/react-dom/cjs/react-dom.development.js:21445
performWorkOnRoot
/node_modules/react-dom/cjs/react-dom.development.js:21368
performWork
/node_modules/react-dom/cjs/react-dom.development.js:21273
performSyncWork
/node_modules/react-dom/cjs/react-dom.development.js:21247
requestWork
/node_modules/react-dom/cjs/react-dom.development.js:21102
scheduleWork
/node_modules/react-dom/cjs/react-dom.development.js:20915
enqueueSetState
/node_modules/react-dom/cjs/react-dom.development.js:11596
LoadableComponent.push../node_modules/react/cjs/react.development.js.Component.setState
/node_modules/react/cjs/react.development.js:336
update
/node_modules/react-loadable/lib/index.js:240
(anonymous function)
/node_modules/react-loadable/lib/index.js:250
▲ 18 stack frames were expanded.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.

Attached the console output as log file.
The problem occurs when using chromium. With firefox it seems to work without problem.
139.18.211.212-1582110922207.log

Hi @naraesk ,

it seems that this is an issue with your Chromium browser. I just tested the online demo with Firefox and Chrome on Windows 10 and with Firefox, Chrome and Chromium on Ubuntu 18.04 without getting this error.
Please check whether your Chromium doesn't support WebSocket (http://www.websocket.org/echo.html) or localStorage is disabled, maybe by privacy settings or an extension of your Chromium.

The connection string is stored in the browser's localStorage. It seems like these data could not be stored in the localStorage.

checked web sockets and localStorage, both seems fine.
Disabled all extension but this did not help either.

Just checked with vanilla Chromium (75.0.3770.142) on Windows 10: worked fine.

Yes,it works when switching to privacy mode. Must be some strange chromium setting ...

btw, @PascalKovacs had the same problem. Don't know which browser he uses

Ok, it's working now. I had to delete the local storage. I Guess it has contained some outdated/incompatible data that was not updated properly or something.

Is this really solved? An end user should not be required to delete the local storage in order to use the dashboard. Is it possible that a migration mechanism is missing for changes to the local storage?

rmllr commented

The problem is that we cannot reproduce this issue. You may have used the dashboard in an unstable state during development. Now, this issue should not occur anymore. If it does we will reopen it.