Super-productivity: Cannot read property 'tagIds' of undefined

Created on 7 Oct 2020  Â·  12Comments  Â·  Source: johannesjo/super-productivity

Your Environment

  • Version used: 5.9.10 (5.9.10) installed with homebrew
  • Operating System and version: macOS v10.15.7 (19H2)

Expected Behavior

Go to "Finish Day" screen?

Current Behavior

When I click "Finish Day" from the "Today" panel, an error panel appears over the fireworks with the following information:

TypeError: Cannot read property 'tagIds' of undefined
! Please copy & report !

TypeError: Cannot read property 'tagIds' of undefined
tagIds (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:47:45)
filter (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:43:112)
_filterIdsForTag (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:16:6)
workContext (webpack:///src/app/features/worklog/worklog.service.ts:150:88)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
invoke (webpack:///node_modules/zone.js/dist/zone.js:386:29)
onInvoke (webpack:///node_modules/@angular/core/fesm5/core.js:28134:32)
META: SP5.9.10 Electron – en-US – MacIntel – Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) superProductivity/5.9.10 Chrome/85.0.4183.98 Electron/10.1.2 Safari/537.36

Steps to Reproduce (for bugs)

I do not know. This is my second day using the app. On day one, clicking "Finish Day" worked fine. Today…

  1. I opened the "Finish Day" panel and reviewed my hours.
  2. I clicked on the "Planning" button from there.
  3. I clicked back to another project screen to update some tasks.
  4. I clicked back to the "Today" panel to find the "Finish Day" button again.
  5. I clicked the "Finish Day" button and got this error.
  6. I closed the application and restarted it.
  7. I clicked the "Finish Day" button again and got the same error.

Console Output

Persistence already allowed
main.2f121703c7fb00e9ac9c.js:1 0 out of 773809 MiB used (0%)
main.2f121703c7fb00e9ac9c.js:1 Migrating model "GlobalConfig" to version from undefined to 1.3 Object
main.2f121703c7fb00e9ac9c.js:1 Migrating model "SimpleCounter" to version from undefined to 2 Object
app.super-productivity.com/news.json?ngsw-bypass=true&no-cache=1602105334103:1 Failed to load resource: the server responded with a status of 404 ()
main.2f121703c7fb00e9ac9c.js:1 Initial Dialog Error
(anonymous) @ main.2f121703c7fb00e9ac9c.js:1
main.2f121703c7fb00e9ac9c.js:1 e
(anonymous) @ main.2f121703c7fb00e9ac9c.js:1
main.2f121703c7fb00e9ac9c.js:1 GLOBAL_ERROR_HANDLER TypeError: Cannot read property 'tagIds' of undefined
    at main.2f121703c7fb00e9ac9c.js:1
    at Array.filter (<anonymous>)
    at rE (main.2f121703c7fb00e9ac9c.js:1)
    at main.2f121703c7fb00e9ac9c.js:1
    at t.<anonymous> (main.2f121703c7fb00e9ac9c.js:1)
    at main.2f121703c7fb00e9ac9c.js:1
    at Object.next (main.2f121703c7fb00e9ac9c.js:1)
    at o (main.2f121703c7fb00e9ac9c.js:1)
    at t.invoke (polyfills.aebe8ecc43d658291381.js:1)
    at Object.onInvoke (main.2f121703c7fb00e9ac9c.js:1)
t.handleError @ main.2f121703c7fb00e9ac9c.js:1
main.2f121703c7fb00e9ac9c.js:1 Last actions before error: Array(30)
polyfills.aebe8ecc43d658291381.js:1 Uncaught Error: TypeError: Cannot read property 'tagIds' of undefined
    at t.handleError (main.2f121703c7fb00e9ac9c.js:1)
    at Object.next (main.2f121703c7fb00e9ac9c.js:1)
    at e.o [as _next] (main.2f121703c7fb00e9ac9c.js:1)
    at e.__tryOrUnsub (main.2f121703c7fb00e9ac9c.js:1)
    at e.next (main.2f121703c7fb00e9ac9c.js:1)
    at e._next (main.2f121703c7fb00e9ac9c.js:1)
    at e.next (main.2f121703c7fb00e9ac9c.js:1)
    at e.next (main.2f121703c7fb00e9ac9c.js:1)
    at e.emit (main.2f121703c7fb00e9ac9c.js:1)
    at main.2f121703c7fb00e9ac9c.js:1
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/runtime.c51bd5b1c616d9ffddc1.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/polyfills.aebe8ecc43d658291381.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/lz.e95a1750fff9165699fd.worker.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/reminder.792c29922fd96ecda281.worker.js.map: 
DevTools failed to load SourceMap: Could not load content for file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/styles.09ae395f02fda0e7db59.css.map: 

Error Log (Desktop only)

[2020-10-07 17:13:23.332] [error] Frontend Error: TypeError: Cannot read property 'tagIds' of undefined
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773273
    at Array.filter (<anonymous>)
    at rE (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773192)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777319
    at t.<anonymous> (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777445)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865
    at Object.next (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
    at o (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
    at t.invoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/polyfills.aebe8ecc43d658291381.js:1:9307)
    at Object.onInvoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:479901) TypeError: Cannot read property 'tagIds' of undefined
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773273
    at Array.filter (<anonymous>)
    at rE (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773192)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777319
    at t.<anonymous> (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777445)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865
    at Object.next (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
    at o (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
    at t.invoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/polyfills.aebe8ecc43d658291381.js:1:9307)
    at Object.onInvoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:479901)
[2020-10-07 17:13:26.772] [error] Frontend Error Stack: tagIds (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:47:45)
filter (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:43:112)
_filterIdsForTag (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:16:6)
workContext (webpack:///src/app/features/worklog/worklog.service.ts:150:88)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
invoke (webpack:///node_modules/zone.js/dist/zone.js:386:29)
onInvoke (webpack:///node_modules/@angular/core/fesm5/core.js:28134:32)
[2020-10-07 17:15:42.164] [error] Frontend Error: TypeError: Cannot read property 'tagIds' of undefined
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773273
    at Array.filter (<anonymous>)
    at rE (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773192)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777319
    at t.<anonymous> (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777445)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865
    at Object.next (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
    at o (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
    at t.invoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/polyfills.aebe8ecc43d658291381.js:1:9307)
    at Object.onInvoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:479901) TypeError: Cannot read property 'tagIds' of undefined
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773273
    at Array.filter (<anonymous>)
    at rE (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3773192)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777319
    at t.<anonymous> (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3777445)
    at file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865
    at Object.next (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
    at o (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
    at t.invoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/polyfills.aebe8ecc43d658291381.js:1:9307)
    at Object.onInvoke (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:479901)
[2020-10-07 17:15:43.467] [error] Frontend Error Stack: tagIds (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:47:45)
filter (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:43:112)
_filterIdsForTag (webpack:///src/app/features/worklog/util/get-complete-state-for-work-context.util.ts:16:6)
workContext (webpack:///src/app/features/worklog/worklog.service.ts:150:88)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776865)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3776970)
Ur (file:///Applications/superProductivity.app/Contents/Resources/app.asar/dist/main.2f121703c7fb00e9ac9c.js:1:3779872)
invoke (webpack:///node_modules/zone.js/dist/zone.js:386:29)
onInvoke (webpack:///node_modules/@angular/core/fesm5/core.js:28134:32)
bug

Most helpful comment

I just tested it, and it can be done in the same step as creating the sub-task: Highlight the parent task, press a to open a new sub-task entry, type in the sub-task, and append #Today to the sub-task, and press Enter.

For my way of thinking, being able to tag a sub-task with #Today is very useful.

All 12 comments

Thank you very much for reporting. I'll investigate.

Great, thank you, @johannesjo! I found the error log file and updated the post above.

Could you by any chance send me a copy of your data to [email protected]? This would make debugging this a lot easier.

You can export your data from the settings page under Import/Export in case you wonder.

I was able to duplicate this from a blank data slate using the Web app, following these precise steps:

  1. Create a Project.
  2. Add a task to the Project: "Task A".
  3. Add a sub-tasks to "Task A": "Sub-task 1".
  4. Add the #Today tag to "Sub-task 1".
  5. Go to the "Today" panel and mark "Sub-task 1" as complete.
  6. Click "Finish Day".
  7. Click "Save and Go Home".
  8. Go to any page with the "Finish Day" button, and click "Finish Day" again.
  9. Error accomplished!

Thank you very much for digging into this. This is great!

I wonder how you made 4 (adding the tag to the subtask) happen. This should not be possible and at the very least throw an error.

@johannesjo, it was so easy I thought it was an intended feature: I clicked on the subtask to edit it, and appended the text #Today.

At least, that's how I did it in the test on the Web app. That's probably how I did it originally too, I just don't remember.

Ahhh! While it shouldn't be possible via edit clicking, it's still possible via the short sxntax task bla #today? I forgot to prevent adding tasks there! I'll provide a fix for it, too.

I just tested it, and it can be done in the same step as creating the sub-task: Highlight the parent task, press a to open a new sub-task entry, type in the sub-task, and append #Today to the sub-task, and press Enter.

For my way of thinking, being able to tag a sub-task with #Today is very useful.

Yes, you might be right about the usefulness. I might add it at some point, but currently, I am happy to not have to deal with the additional complexity. There is so much to do already :)

Your sanity is definitely a higher priority than providing features that might erode it. Thank you so much for all you are doing!

I am closing this, please let me know if you encounter any other issues. Thank you very much for your input. You have been very helpful, especially considering that you just recently started using this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexanderadam picture alexanderadam  Â·  3Comments

wada3n picture wada3n  Â·  3Comments

jac1013 picture jac1013  Â·  3Comments

tiotrom picture tiotrom  Â·  4Comments

mbostanara picture mbostanara  Â·  3Comments