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

Upgrading 0.15 -> 0.17 throws type error #1524

Closed
spencern opened this issue Oct 24, 2016 · 2 comments · Fixed by #1693
Closed

Upgrading 0.15 -> 0.17 throws type error #1524

spencern opened this issue Oct 24, 2016 · 2 comments · Fixed by #1693
Assignees

Comments

@spencern
Copy link
Contributor

Actual Behavior

Here's the error

Exception in setTimeout callback: TypeError: Cannot read property 'fullName' of undefined
    at Object.transformations.accounts.profile (imports/plugins/included/search-mongo/server/methods/transformations.js:31:45)
    at buildAccountSearch (imports/plugins/included/search-mongo/server/methods/searchcollections.js:212:32)
    at JobQueue.worker (imports/plugins/included/search-mongo/server/jobs/buildSearchCollections.js:145:7)
    at JobQueue._process (packages/vsivsi_job-collection/job/src/job_class.coffee:191:8)
    at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
    at packages/meteor/timers.js:6:1
    at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

Steps to Reproduce the Behavior

Upgraded existing shop with data to reaction:master 0.17

PR incoming.

@spencern spencern self-assigned this Oct 24, 2016
@brent-hoover
Copy link
Collaborator

Did the migrations run? Because preventing that error was basically why that was written

spencern added a commit to spencern/reaction that referenced this issue Oct 24, 2016
Error was caused by `fieldData.addressBook` existing as an empty array, this checks to make sure that `addressBook[0]` exists before looking for the `fullName` prop.
@spencern
Copy link
Contributor Author

It said that the migrations ran, but I think what happened is that there was an empty address book (addressBook === []) in the transformations.js file.

@ghost ghost added the review label Oct 24, 2016
aaronjudd pushed a commit that referenced this issue Oct 25, 2016
* Fixes #1524
Error was caused by `fieldData.addressBook` existing as an empty array, this checks to make sure that `addressBook[0]` exists before looking for the `fullName` prop.

* fix camelcase typo that was breaking tests.

* Actually fix typo in addressBook.

Previous commit is what happens when you have two editor windows open with similar files open.
@ghost ghost removed the review label Nov 3, 2016
@aaronjudd aaronjudd mentioned this issue Jan 6, 2017
@ghost ghost assigned aaronjudd Jan 6, 2017
@ghost ghost added the review label Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants