Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sessionsWrite error with tags #2356

Open
benju69 opened this issue Apr 4, 2022 · 4 comments
Open

sessionsWrite error with tags #2356

benju69 opened this issue Apr 4, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@benju69
Copy link
Contributor

benju69 commented Apr 4, 2022

Describe the bug
I was adding some sessions and speakers
I got this error:

4:58:16.679 PM
sessionsWrite
Function execution took 1486 ms, finished with status: 'error'

4:58:17.740 PM
sessionsWrite
TypeError: Cannot read properties of undefined (reading 'tags')
at sessionsSpeakersScheduleMap (file:///workspace/dist/schedule-generator/speakers-sessions-schedule-map.js:23:48)
at generateAndSaveData (file:///workspace/dist/generate-sessions-speakers-schedule.js:67:25)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

seems like an issue with tags
Any idea?

To Reproduce
Steps to reproduce the behavior:

  1. Add sessions and speakers
  2. Cloud function show errors

Expected behavior
generate sessions and schedule

@benju69 benju69 added the bug Something isn't working label Apr 4, 2022
abraham added a commit that referenced this issue Apr 4, 2022
@abraham
Copy link
Member

abraham commented Apr 4, 2022

I think #2357 should fix this.

@benju69
Copy link
Contributor Author

benju69 commented Apr 4, 2022

Actually I have an older version
const mainTag =
subsession.tags && subsession.tags.length ? subsession.tags[0] : 'General';

But this is weird, I have the same tag everywhere

@benju69
Copy link
Contributor Author

benju69 commented Apr 5, 2022

Ok I think it was cause by an empty string "" in schedule

@abraham
Copy link
Member

abraham commented Apr 5, 2022

What value had the empty string?

The schedule generation code is really complex and error prone. I just haven't had time to refactor it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants