github-action-dashboard icon indicating copy to clipboard operation
github-action-dashboard copied to clipboard

If i create an empty workflow in Actions, the dashboard looses all the tiles

Open shabfactor29 opened this issue 2 years ago • 1 comments

i get below error if i create an empty workflow:

Uncaught TypeError: Cannot read properties of null (reading 'workflowId')
    at a.updatedRun (Dashboard.vue:40:30)
    at vue-socket.io-ext.esm.js:1:3085
    at Array.forEach (<anonymous>)
    at Object.emit (vue-socket.io-ext.esm.js:1:3038)
    at vue-socket.io-ext.esm.js:1:6088
    at u.e.<computed> [as onevent] (vue-socket.io-ext.esm.js:1:2504)
    at u.onpacket (socket.js:209:22)
    at d.r.emit (index.js:145:20)
    at d.emitReserved (typed-events.js:59:15)
    at d.ondecoded (manager.js:210:14)
updatedRun @ Dashboard.vue:40
(anonymous) @ vue-socket.io-ext.esm.js:1
emit @ vue-socket.io-ext.esm.js:1
(anonymous) @ vue-socket.io-ext.esm.js:1
e.<computed> @ vue-socket.io-ext.esm.js:1
onpacket @ socket.js:209
r.emit @ index.js:145
emitReserved @ typed-events.js:59
ondecoded @ manager.js:210
r.emit @ index.js:145
add @ index.js:117
ondata @ manager.js:202
r.emit @ index.js:145
onPacket @ socket.js:403
r.emit @ index.js:145
onPacket @ transport.js:107
onData @ transport.js:100
ws.onmessage @ websocket.js:112

It is failing on Dashboard.vue file at below point:

sockets: {
    updatedRun(currentRun) {
     // console.log(currentRun.workflowId)
      const index = findIndex(this.currentRuns, { workflowId: currentRun.workflowId });
      if (index >= 0) {
        this.$set(this.currentRuns, index, currentRun);
      } else {
        this.currentRuns.push(currentRun);
      }
      if (!this.uniqueRepos.map(repo => repo.name).includes(currentRun.repo)){
        this.uniqueRepos.push({
          name: currentRun.repo, 
          checked: true
        })
      } 
    },
  },

reason: it does not able to get the workflowId

Any solution?

shabfactor29 avatar Apr 20 '22 01:04 shabfactor29

When you say create an empty workflow can you give me an example? No steps/jobs?

chriskinsman avatar May 21 '22 02:05 chriskinsman