galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.42k stars 1.01k forks source link

Pesky warning with PersistentTaskProgressMonitorAlert.test.ts #19167

Closed jmchilton closed 1 week ago

jmchilton commented 1 week ago

I've spent an hour on this and I don't understand. I've been working my way through the jest warnings and errors and this is the first one to beat me. @davelopez - any chance you can take a look? The warning seem correct - we are calling watch on an undefined - but I cannot really understand the path that gets there.

client % yarn jest PersistentTaskProgressMonitorAlert.test.ts
yarn run v1.22.21
$ jest --config tests/jest/jest.config.js PersistentTaskProgressMonitorAlert.test.ts
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:60:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:75:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:77:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:100:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:102:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:125:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:127:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:155:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:157:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:184:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:186:25)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:56:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:209:41)

  console.error
    [Vue warn]: Invalid watch source: undefined. A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.

    found in

    ---> <PersistentTaskProgressMonitorAlert>
           <Root>

      152 |     });
      153 |
    > 154 |     watch(
          |          ^
      155 |         status,
      156 |         (newStatus) => {
      157 |             if (newStatus && currentMonitoringData.value) {

      at warn (node_modules/vue/dist/vue.runtime.common.dev.js:4548:21)
      at warnInvalidSource (node_modules/vue/dist/vue.runtime.common.dev.js:1384:9)
      at doWatch (node_modules/vue/dist/vue.runtime.common.dev.js:1441:9)
      at watch (node_modules/vue/dist/vue.runtime.common.dev.js:1370:12)
      at usePersistentProgressTaskMonitor (src/composables/persistentProgressMonitor.ts:154:10)
      at setup (src/components/Common/PersistentTaskProgressMonitorAlert.vue:32:237)
      at invokeWithErrorHandling (node_modules/vue/dist/vue.runtime.common.dev.js:2919:30)
      at initSetup (node_modules/vue/dist/vue.runtime.common.dev.js:2352:29)
      at initState (node_modules/vue/dist/vue.runtime.common.dev.js:5300:5)
      at VueComponent.Vue._init (node_modules/vue/dist/vue.runtime.common.dev.js:5615:9)
      at new VueComponent (node_modules/vue/dist/vue.runtime.common.dev.js:5750:18)
      at createComponentInstanceForVnode (node_modules/vue/dist/vue.runtime.common.dev.js:4490:12)
      at init (node_modules/vue/dist/vue.runtime.common.dev.js:4352:54)
      at createComponent (node_modules/vue/dist/vue.runtime.common.dev.js:6489:17)
      at createElm (node_modules/vue/dist/vue.runtime.common.dev.js:6443:13)
      at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.dev.js:6991:13)
      at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.dev.js:3718:25)
      at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3828:16)
      at Watcher.get (node_modules/vue/dist/vue.runtime.common.dev.js:3400:33)
      at new Watcher (node_modules/vue/dist/vue.runtime.common.dev.js:3390:51)
      at mountComponent (node_modules/vue/dist/vue.runtime.common.dev.js:3845:5)
      at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.dev.js:8687:12)
      at mount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14067:21)
      at shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.js:14093:10)
      at mountComponent (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:47:24)
      at Object.<anonymous> (src/components/Common/PersistentTaskProgressMonitorAlert.test.ts:211:25)

 PASS  src/components/Common/PersistentTaskProgressMonitorAlert.test.ts (7.771 s)
  PersistentTaskProgressMonitorAlert.vue
    ✓ does not render when no monitoring data is available (56 ms)
    ✓ renders in progress when monitoring data is available and in progress (40 ms)
    ✓ renders completed when monitoring data is available and completed (28 ms)
    ✓ renders failed when monitoring data is available and failed (23 ms)
    ✓ renders a link to download the task result when completed and task type is 'short_term_storage' (30 ms)
    ✓ does not render a link to download the task result when completed and task type is 'task' (20 ms)
    ✓ should render a warning alert when the task has expired even if the status is running (23 ms)

Test Suites: 1 passed, 1 total
Tests:       7 passed, 7 total
Snapshots:   0 total
Time:        9.76 s
Ran all test suites matching /PersistentTaskProgressMonitorAlert.test.ts/i.
✨  Done in 11.66s.
ElectronicBlueberry commented 1 week ago

This seems to be colliding with a deprecated global property. Renaming the symbol and switching to a getter function in the watcher instead of passing the whole ref fixed the error for me. No idea why the getter function was needed, I stumbled across that.

davelopez commented 1 week ago

Thank you for figuring it out @ElectronicBlueberry! Wow! I would never have expected that... I would have expected the global to be window.status not just status... JS never stops surprising me :sweat_smile:

Could you open a PR with your fix? Or maybe @jmchilton already took care of it with your input?