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

Unhandled rejection TypeError: Cannot read property 'context' of undefined #7317

Closed
LaraEzarik opened this issue Sep 3, 2016 · 3 comments
Closed

Comments

@LaraEzarik
Copy link

LaraEzarik commented Sep 3, 2016

Issue Summary

I am upgrading from 0.7.5 I have successfuly got to 8.0 but when try to start ghost after making the required changes per the upgrade documentation I get this error Unhandled rejection TypeError: Cannot read property 'context' of undefined I have had a look at the code and found it was occuring on line 89 of the core/server/index.js tried removing context just to see what would happen and it still happens.

Steps to Reproduce

  1. Have a install of ghost 7.5 and upgrade to 0.8.0
  2. Copy the new core folder over for 0.9.0 along with the index.js and json files listed in upgrade guide
  3. Remove the node_modules folder
  4. Run npm install --production
  5. Run npm start --production
  6. Watch migration fail
Skipping Migrations: rolling back because of: undefined
Unhandled rejection TypeError: Cannot read property 'context' of undefined
    at /home/ghost/ServerSetup/ghost-bobthemac/core/server/index.js:89:56
    at tryCatcher (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/promise.js:504:31)
    at Promise._settlePromise (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/promise.js:561:18)
    at Promise._settlePromise0 (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/promise.js:606:10)
    at Promise._settlePromises (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/promise.js:681:18)
    at Async._drainQueue (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/async.js:138:16)
    at Async._drainQueues (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/async.js:148:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/ghost/ServerSetup/ghost-bobthemac/node_modules/bluebird/js/release/async.js:17:14)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

Technical details:

  • Ghost Version: 0.9.0
  • Node Version: 4.5
  • Browser/OS: Chrome/Debian
  • Database: MySql
@LaraEzarik
Copy link
Author

Looking further into this I tried to remove all trace of node modules by removing the node_modules folder and running npm cache clean then reinstalling the node modules again and the same error happens. I have also tried commenting out line 89 and the same error occurs, could it be a bluebird issue not a ghost issue ?

@LaraEzarik
Copy link
Author

Looking at the errors again I took a look at bluebird and tried changing the version from 3.4.1 to 3.4.5 and the same error occurs, now looking at the database as the possible issue here.

@LaraEzarik
Copy link
Author

The issue is now resolved it was down to a faulty database missing data in the visibility for tags and users, I added them all manually and it now works.

kirrg001 added a commit to kirrg001/Ghost that referenced this issue Sep 5, 2016
refs TryGhost#7317
- clone options when passing them into the migration/fixture files
- do not use default sequence, because it does not clone the arguments
ErisDS pushed a commit that referenced this issue Sep 6, 2016
* 🐛 fix direct update

closes #7297
- move sitemap initialisation into sitemap handler
- initialise sitemap on first request to sitemap

* 🐛 fix how we pass options to migration files

refs #7317
- clone options when passing them into the migration/fixture files
- do not use default sequence, because it does not clone the arguments
mixonic pushed a commit to mixonic/Ghost that referenced this issue Oct 28, 2016
…7320)

* 🐛 fix direct update

closes TryGhost#7297
- move sitemap initialisation into sitemap handler
- initialise sitemap on first request to sitemap

* 🐛 fix how we pass options to migration files

refs TryGhost#7317
- clone options when passing them into the migration/fixture files
- do not use default sequence, because it does not clone the arguments
geekhuyang pushed a commit to geekhuyang/Ghost that referenced this issue Nov 20, 2016
…7320)

* 🐛 fix direct update

closes TryGhost#7297
- move sitemap initialisation into sitemap handler
- initialise sitemap on first request to sitemap

* 🐛 fix how we pass options to migration files

refs TryGhost#7317
- clone options when passing them into the migration/fixture files
- do not use default sequence, because it does not clone the arguments
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

No branches or pull requests

1 participant