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

Cannot read property 'push' of undefined #69

Closed
upperrapids opened this issue Nov 12, 2018 · 4 comments
Closed

Cannot read property 'push' of undefined #69

upperrapids opened this issue Nov 12, 2018 · 4 comments

Comments

@upperrapids
Copy link

Hi there,

I'm testing the recommended stable version (0.8.3) on a Mac, running the server with yarn dev and Node 8.12.0.

If I publish an Electron project using electron-forge it, as expected, shows up as a draft version in Nucleus.

nucleus:rest Fetching temporary releases for app: My-Project and channel: stable +2m
nucleus:positioner Saving temporary file: 0394528b26599a344ed6fe471d1343b2/my-project-2.1.28-setup-x64.exe for app: My-Project +1m
nucleus:positioner Saving temporary file: 0394528b26599a344ed6fe471d1343b2/my-project-2.1.28-full.nupkg for app: My-Project +784ms
nucleus:rest Listing applications +7m
nucleus:rest Fetching temporary releases for app: My-Project and channel: stable +540ms

Both of those files exist in the .files/My-Project/temp/0394528b26599a344ed6fe471d1343b2/ directory and both are the correct file size.

When I publish the pre-release I get the following error:

nucleus:rest User: charlie promoted a temporary release for app: 'My-Project' on channel: stable becomes version: 2.1.28 +23s
nucleus:rest Unhandled error: /1/channel/bed2492226118f4ab02f0d91bf04ed6d/temporary_releases/2/release +38ms
nucleus:rest TypeError: Cannot read property 'push' of undefined
nucleus:rest     at SequelizeDriver.<anonymous> (/Users/adam/Dev/nucleus/lib/db/sequelize/SequelizeDriver.js:315:36)
nucleus:rest     at next (native)
nucleus:rest     at fulfilled (/Users/adam/Dev/nucleus/lib/db/sequelize/SequelizeDriver.js:4:58) +0ms

This leaves things in a weird state. In the UI the release exists both in the "Released" tab (just listing the .exe) and in the Drafts tab (listing both files). In .files/PROJECT/CHANNEL/win32/x64/ nothing has been copied over yet.

Were I to go and press "Release" a second time, both files are removed from the temp folder and the logging looks a little less alarming, but the .exe file is never copied to the folder with the .nupkg. The Draft tab is empty afterwards and the Releaes tab reflects the new version (not that it can be downloaded as the .exe doesn't acutally exist on disk).

nucleus:rest User: charlie promoted a temporary release for app: 'My-Project' on channel: stable becomes version: 2.1.28 +3m
nucleus:rest Tested files: [my-project-2.1.28-setup-x64.exe, my-project-2.1.28-full.nupkg] but stored: [my-project-2.1.28-full.nupkg] +47ms
nucleus:rest Releasing file: my-project-2.1.28-full.nupkg to version: 2.1.28 for (My-Project/stable) +0ms
nucleus:positioner Fetching temporary file: 0394528b26599a344ed6fe471d1343b2/my-project-2.1.28-full.nupkg for app: My-Project +0ms
nucleus:positioner Handling upload (my-project-2.1.28-full.nupkg) for app (My-Project) and channel (stable) for version (2.1.28) on platform/arch (win32/x64) +582ms
nucleus:positioner Pushed a nupkg file to the file store so appending release information to RELEASES +227ms
nucleus:positioner Deleting all temporary files for app: My-Project in save ID: 0394528b26599a344ed6fe471d1343b2 +245ms

I tried adding some debug logging in and around line 315 of SequelizeDriver.js. The error apperas to be throwing from dbVersion.files.push(newFile) but all the component parts of that statement seem to exist as expected.

Any thoughts?

@MarshallOfSound
Copy link
Contributor

0.8.3 is not the recommended stable release? 1.1.3 is latest stable.

dc1780a

@upperrapids
Copy link
Author

I'll try with that one. The README.md indicates 0.8.3 so I assumed I should stick to that.

The currently "stable" version is v0.8.3, unless you want a walk on the wild side. Please stick to that release.

@MarshallOfSound
Copy link
Contributor

Oh I added that while 1.0 was still in it's infancy. I'll remove it today :)

@upperrapids
Copy link
Author

Cool. I'll close this one off then and re-do my testing with the current version. Thanks so much for the quick response.

itsananderson added a commit to itsananderson/nucleus that referenced this issue Feb 14, 2020
Based on the discussion in atlassian#69 it sounds like the latest 1.x release is the recommended version to use. This diff removes those outdated instructions from the README.
MarshallOfSound pushed a commit that referenced this issue Feb 14, 2020
Based on the discussion in #69 it sounds like the latest 1.x release is the recommended version to use. This diff removes those outdated instructions from the README.
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

2 participants