incubator-devlake icon indicating copy to clipboard operation
incubator-devlake copied to clipboard

[Bug][Module Name] my data doesnt show on the dashboard can someone help me please

Open DavidW1519 opened this issue 1 year ago • 4 comments

Question

im havin trouble getting my data to show un the dashboard, the data connection was a success but when i go to dashboard is not showing anything

Screenshots

image when i inspect im getting those error messages and i dont know what to do please and thanks for your help

DavidW1519 avatar May 30 '24 21:05 DavidW1519

Hey @DavidW1519! I'm here to help you with any issues you're facing. I can assist you in solving bugs, answering questions, and becoming a contributor. Let's tackle this together!

To resolve the issue of failed WebSocket connections to the /api/live/ws endpoint on localhost:4000, follow these steps:

  1. Check WebSocket Configuration in Grafana: Ensure that the Grafana service is configured to allow WebSocket connections. The GF_LIVE_ALLOWED_ORIGINS environment variable should be set to '*' to allow connections from any origin.

  2. Network Configuration: Verify that there are no firewall rules or network policies blocking WebSocket traffic. Since the config-ui service is mapped to localhost:4000, ensure that this port is open and accessible.

  3. Service Dependencies: Confirm that all dependent services are running correctly. The config-ui service depends on the devlake service, which in turn depends on the mysql service. Ensure all these services are up and running without errors.

  4. Browser Console: Check the browser console for any error messages related to WebSocket connections. This can provide more specific information about why the connection is failing.

  5. WebSocket Endpoint: Test the WebSocket endpoint /api/live/ws using a WebSocket client or a simple script. Here is an example of how you can test the WebSocket connection using a JavaScript snippet in the browser console:

    let socket = new WebSocket("ws://localhost:4000/api/live/ws");
    
    socket.onopen = function(e) {
      console.log("[open] Connection established");
    };
    
    socket.onmessage = function(event) {
      console.log(`[message] Data received from server: ${event.data}`);
    };
    
    socket.onclose = function(event) {
      if (event.wasClean) {
        console.log(`[close] Connection closed cleanly, code=${event.code} reason=${event.reason}`);
      } else {
        console.log('[close] Connection died');
      }
    };
    
    socket.onerror = function(error) {
      console.log(`[error] ${error.message}`);
    };
    

If the connection is successful, you should see the "Connection established" message in the console. If there are errors, the error message will provide more details on what might be going wrong.

By following these steps, you should be able to identify and resolve the issue with the WebSocket connections to the /api/live/ws endpoint on localhost:4000 [1][2].

To continue talking to Dosu, mention @dosu.

dosubot[bot] avatar May 30 '24 21:05 dosubot[bot]

@DavidW1519 You can change this issue's type to bug, and provide more details about the version and your operations to help us reproduce it.

d4x1 avatar May 31 '24 09:05 d4x1

how to reproduce:

  • downloaded docker compose.yml and env.example from https://github.com/apache/incubator-devlake/releases ver 1.0.0 beta9
  • generated the encryption key with openssl and put it on the file .env
  • Run docker-compose up -d
  • go to http://localhost:4000 did the tutorial to connect to github
  • imported this https://github.com/devsecopsmaturitymodel/DevSecOps-MaturityModel to my repository to make a test also made the token
  • after the tutorial i went to dashboard and nothing is showing so i press f12 and found this error

image

also tried what dosubot said but still not working

DavidW1519 avatar Jun 03 '24 15:06 DavidW1519

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Aug 04 '24 00:08 github-actions[bot]

This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] avatar Oct 08 '24 00:10 github-actions[bot]

This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.

github-actions[bot] avatar Oct 15 '24 00:10 github-actions[bot]