atlassian / nucleus Goto Github PK
View Code? Open in Web Editor NEWA configurable and versatile update server for all your Electron apps
License: Other
A configurable and versatile update server for all your Electron apps
License: Other
I'm trying to make test publishing. I started nucleus server.
Now creating test app:
npx @electron-forge/cli init test
adding publisher
yarn add @electron-forge/publisher-nucleus
my config
"config": {
"forge": {
"publishers": [
{
"name": "@electron-forge/publisher-nucleus",
"config": {
"host": "http://localhost:3030",
"appId": "2",
"channelId": "5542496b41ba12ab15a31862d78088f4",
"token": "..."
}
}
],
...
with publishing it on Node v10.6.0 (Ubuntu) I get
npm run publish
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets:
✔ Making for target: zip - On platform: linux - For arch: x64
✔ Resolving publish target: @electron-forge/publisher-nucleus
(node:13982) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
An unhandled rejection has occurred inside Forge:
Class constructor PublisherNucleus cannot be invoked without 'new'
TypeError: Class constructor PublisherNucleus cannot be invoked without 'new'
at /home/sheiko/Sites/tmp/node_modules/electron-forge/dist/api/api/publish.js:142:11
We had a bad release and would like to make sure this file is not accessible.
How do we remove the previous releases, safely? It's already marked as Dead.
I've followed the instructions in the readme exactly, updated the local users and installed my GPG key in the config, however when I try to start the app it says that the config.js could not be found. What is going on here?
@MarshallOfSound I managed to build the project successfully with no errors but when I run the command
yarn dev
I get this output
$ yarn dev
yarn run v1.10.1
$ concurrently --raw "npm run start-fe" "npm run start-server-dev" "npm run star
t-static"
┌───────────────────────────────────────────────────────────────┐
│ npm update check failed │
│ Try running with sudo or get access │
│ to the local update config store via │
│ sudo chown -R $USER:$(id -gn $USER) C:\Users\eWorldES\.config │
└───────────────────────────────────────────────────────────────┘
> [email protected] start-server-dev D:\nucleus-server
> nodemon --watch src --exec "npm run build-server && cross-env DEBUG=nucleus* n
pm run start-server" -e ts
> [email protected] start-fe D:\nucleus-server
> webpack-dev-server --progress --profile --colors --quiet --open
> [email protected] start-static D:\nucleus-server
> make-dir .files && serve .files --port 9999 --silent
[nodemon] 1.12.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: D:\nucleus-server\src/**/*
[nodemon] starting `npm run build-server && cross-env DEBUG=nucleus* npm run sta
rt-server`
> [email protected] build-server D:\nucleus-server
> tsc && rm -rf lib/__spec__ lib/**/__spec__
10% building modules 5/10 modules 5 active ...\webpack-dev-server\client\overla
y.js
[at-loader] Using [email protected] from typescript and "tsconfig.json" from D:\n
ucleus-server\tsconfig.public.json. 10%
building modules 7/10 modules 3 active ...\webpack-dev-server\client\overlay.js
> [email protected] start-server D:\nucleus-server
> node lib/index.js 11%
building modules 10/11 modules 1 active ...f--0!D:\nucleus-server\public\App.ts
x nucleus Setting up server +0ms
nucleus Connecting to DB +4ms
sequelize deprecated String based operators are now deprecated. Please use Symbo
l based operators for better security, read more at http://docs.sequelizejs.com/
manual/tutorial/querying.html#operators node_modules\sequelize\lib\sequelize.js:
236:13 11%
building modules 10/13 modules 3 active ...dules\webpack\hot\log-apply-result.js
"--gpg: directory '/c/Users/eWorldES/.gnupg' created\ngpg: keybox '/c/Users/eWor
ldES/.gnupg/pubring.kbx' created\ngpg: no valid OpenPGP data found.\ngpg: Total
number processed: 0\n"
nucleus Bad gpg key, invalid +253ms
GPG key is invalid or missing, you must provide "config.gpgSigningKey"
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start-server: `node lib/index.js`
npm ERR! Exit status 1
11% building modules 11/13 modules 2 active ...dules\webpack\hot\log-apply-resul
t.jsERR! Failed at the [email protected] start-server script.
npm ERR! This is probably not a problem with npm. There is likely additiona 11%
building modules 11/14 modules 3 active ...modules\react-hot-loader\lib\patch.js
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\eWorldES\AppData\Roaming\npm-cache\_logs\2018-10-18T2 11%
building modules 12/16 modules 4 active ...ver\node_modules\punycode\punyco20506
ms building modules
21ms sealing
1ms optimizing
1ms basic module optimization
6ms module optimization
1ms advanced module optimization
1ms basic chunk optimization
1ms chunk optimization
1ms advanced chunk optimization
1ms module and chunk tree optimization
12ms module reviving
1ms module order optimization
4ms module id optimization
4ms chunk reviving
1ms chunk order optimization
11ms chunk id optimization
27ms hashing
3ms module assets processing
1082ms chunk assets processing
33ms additional chunk assets processing
1ms recording
1ms additional asset processing
1ms chunk asset optimization
135ms asset optimization
232ms emitting
[HPM] Error occurred while trying to proxy request /rest/config from 127.0.0.1:8
888 to http://localhost:3030 (ECONNREFUSED) (https://nodejs.org/api/errors.html#
errors_common_system_errors)
Terminate batch job (Y/N)? Terminate batch job (Y/N)? Terminate batch job (Y/N)?
Could you please assist with what it is complaining about?
During start up we should check the provided GPG key and if it isn't there or is invalid error out before even launching
Release channels once created currently can't be renamed, as this is purely a UI construct it should be OK to allow renaming of these channels
Trying to download and run the docker image leads to the following error message
sequelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at http://docs.sequelizejs.com/manual/tutorial/querying.html#operators at node_modules/sequelize/lib/sequelize.js:236:13
The container does not seem to properly start up
Hi there,
Based on other questions, the most likely reason for this is a problem with redis configuration; however, I'm running this locally, with the default value of null
for the session. Please see my config below.
const path = require('path');
module.exports = {
/**
* The port to run Nucleus Server on, if the port is in use the server will not start
*/
port: 3030,
/**
* The fully qualified domain + path that Nucleus is being hosted at
*/
baseURL: 'http://localhost:8888',
/**
* The data store to use when persisting plugins and versions. Current possible values
* are "sequelize", ensure you also supply valid connection details for your
* chosen strategy below.
*
* PR's welcome to add another data store.
*/
dbStrategy: 'sequelize',
/**
* Sequelize connection information, please note all options are required
*
* database: The name of the database to connect to
* dialect: The type of SQL database this is, check sequelize docs for more info
* username: Username to use when connecting
* password; Password to use when connecting
* host: Hostname of database
* port: Port to use when connecting
* storage: Path to sqlite file, only used for sqlite dialect
*/
sequelize: {
dialect: 'sqlite',
storage: path.resolve(__dirname, 'db.sqlite'),
},
/**
* The file store to use when persisting update files and metadata. Current possible
* values are "s3" and "local" ensure you also supply valid connection details if
* required for your chosen strategy below.
*
* PR's welcome to add another file store.
*/
fileStrategy: 'local',
/**
* Local file configuration
*
* root: Path on disk to the root of the static file store
* staticUrl: The HTTP url to use to access the static file store remotely
*/
local: {
root: path.resolve(__dirname, '.files'),
staticUrl: 'http://localhost:9999'
},
/**
* There is actually no authentication config for s3, all config must be done through the standard AWS
* environment variables or through EC2 IAM roles.
*
* See http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-credentials-node.html
*
* Bucket / Region / CloudFront config goes here though
*/
s3: {
// init: {
// endpoint: '' // The alternate endpoint to reach the S3 instance at,
// s3ForcePathStyle: true // Always use path style URLs
// }
bucketName: '', // The name for your S3 Bucket
cloudfront: { // If you don't have CloudFront set up and just want to use the S3 bucket set this to "null
distributionId: '', // The CloudFront distribution ID, used for invalidating files
publicUrl: '', // Fully qualified URL for the root of the CloudFront proxy for the S3 bucket
}
},
/**
* The authentication strategy to use when logging users in. Current possible values are "local",
* "openid" and "github". Make you also supply the required authentication details
*/
authStrategy: 'local',
/**
* Local authentication details
*
* The `adminIdentifiers` array should be a list of usernames
*
* DISCLAIMER: This strategy should ONLY be used for local development and NEVER
* used in production. Unicorns cry every time this setting is used in production.
* Don't make the unicorns cry.
*
* displayName: The user friendly name of this user
* username: A unique identifier to use when this user signs in, please note uniqueness is
* not enforced
* password: Well, uhhh, their password
* photo: A URL for their profile, entirely optional, just makes things look nicer ;)
*/
localAuth: [{
displayName: 'Charlie',
username: 'charlie',
password: 'charlie',
photo: 'https://pbs.twimg.com/profile_images/1219364727/charlie-support_400x400.png'
}],
/**
* OpenID authentication details
*
* The `adminIdentifiers` array should be a list of email
* addresses for users to consider admins
*
* realm: The domain that the server is hosted on
* stateless: Stateless mode for openID
* profile: Whether to fetch profile information, should normally be true
* providerURL: Your openID provider URL
* domain: Domain to restrict email addresses to
*/
openid: {
realm: 'http://localhost:8888',
stateless: true,
profile: true,
providerURL: 'https://auth.myservice.com/openid/v2/op',
domain: 'myservice.com'
},
/**
* GitHub authentication details
*
* The `adminIdentifiers` array should be a list of GitHub usernames
* to consider admins
*
* clientID: GitHub API client ID
* clientSecret: GitHub API clientSecret
* realm: The domain the server is hosted on
*/
github: {
clientID: '',
clientSecret: ''
},
/**
* See the documentation for your authentication strategy for what this array does
*/
adminIdentifiers: ['[email protected]', 'charlie'],
/**
* Session options, in development just leave this as default.
*
* IN PRODUCTION PLEASE USE REDIS!
*
* type: Can be either "redis" or null
*
* redis:
* host: The host URL for the redis instance
* port: The port for the redis instance
*/
sessionConfig: {
type: null,
secret: 'ThisIsNotSecret',
redis: {
host: '',
port: ''
}
},
organization: 'My Company Here',
/**
* GPG key to use when signing APT and YUM releases
*
* Requires to be unlocked (no password) and have both the private and
* public key.
*/
gpgSigningKey: `
this works fine, did not include here
`,
/**
* The default percentage rollout for new releases. The first release for
* any channel will always be 100% but all future releases will have a
* default rollout value of this setting
*/
defaultRollout: 0
};
I've been fighting with this for hours, and I feel like I'm missing something so simple. I really hate to put support type questions on here, but after 7 hours of fighting with this, I figured I should just ask.
Notes:
Thanks for this awesome project :
I run in many issues while trying to build the server for prod use , especially when I tried to install the server on a vanilla CentOS.
After digging I ended up with this issue when running : yarn build-server (tsc)
error TS18003: No inputs were found in config file
Within the channel, the Updater Usage
section has reference to a RELEASES.json file. This does not exist in the purposed location.
Once I have launched nucleus, how to I add my existing app to the nucleus server. It is on my local machine, GitHub, and bitbucket.
Hi,
When I run this docker command:
docker run -t manifest-electron .
I receive this error message:
`/opt/service/lib/rest/auth.js:27
secret: config_1.sessionConfig.secret,
^
TypeError: Cannot read property 'secret' of undefined`
In my config.js file my sessionConfig looks like this:
`sessionConfig: {
type: null,
secret: 'ThisIsNotSecret',
redis: {
host: '',
port: ''
}
},`
I don't understand what I'm doing wrong. Any help will be appreciative.
@MarshallOfSound - Is there any way for me not to have an endless redirect loop when trying to use the authStrategy: 'github'
I know that I am doing something novice, do you have any advice?
After uploading a release and running the recommended install commands for Apt Repo Usage I get signing errors, I can bypass that by adding a [trusted=true] flag but still get this error. Any suggestions for both issues?
W: GPG error: https://releases.example.com/example/dc3d95599b5d3f46df96e6fe23e3f2fd/linux/debian binary/ Release: The following signatures were invalid: 709AA8586BCE17B98B72A660883BCE7004AB583C
W: Conflicting distribution: https://releases.example.com/example/dc3d95599b5d3f46df96e6fe23e3f2fd/linux/debian binary/ Release (expected binary/ but got debian)
The only possible redis config are host and port (src/rest/auth.ts#L43), but this is only a small subset of possible options (https://www.npmjs.com/package/connect-redis). In my specific case I need to connect using a password, but setting db and prefix can also be useful.
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?
Currently we create these metadata files based on their previous state. I.e. When a new release is created we append that release's metadata to the existing file and update the values appropriately.
This means if we ever suffer unrecoverable data loss of that metadata file all previous releases meta will have to recreated by hand.
win32
and darwin
releases in the DB on releaseRELEASES.json
file deterministically.RELEASES
file deterministicallyCurrently, uploading a release requires manual approval.
I'd like to have an option to auto-approve beta channels, to simplify the test pipeline.
This probably also requires support from electron-forge/nucleus-publisher.
(using nucleus v0.8.3 on Windows and Linux hosts)
Hi,
I am trying to setup nucleus but it seems like it is not able to build the front-end because it is missing a css loader. Is there something I could be doing wrong?
This is the output from yarn run build-fe-prod
ERROR in ./~/@atlaskit/css-reset/dist/bundle.css
Module parse failed: C:\Users\Chris.Gjorgjievski\src\wsp\nucleus\node_modules\@atlaskit\css-reset\dist\bundle.css Unexpected token (17:9)
You may need an appropriate loader to handle this file type.
| pre,
| form,
| fieldset {
| margin: 0;
| padding: 0;
@ ./public/index.tsx 10:0-46
@ multi ./public/index.tsx
ERROR in ./~/highlight.js/styles/vs.css
Module parse failed: C:\Users\Chris.Gjorgjievski\src\wsp\nucleus\node_modules\highlight.js\styles\vs.css Unexpected token (6:0)
You may need an appropriate loader to handle this file type.
|
| */
| .hljs {
| display: block;
| overflow-x: auto;
@ ./public/components/AppPage.tsx 63:0-37
@ ./public/App.tsx
@ ./public/index.tsx
@ multi ./public/index.tsx
Created an empty directory on my system called nucleus and created a Dockerfile with only these lines
FROM atlassian/nucleus
COPY config.js /opt/service/config.js
After that I ran the command
docker build nucleus .
But I'm given this error message at the end, which causes nucleus to not work when I run the docker image.
Step 2/2 : COPY config.js /opt/service/config.js COPY failed: stat /var/lib/docker/tmp/docker-builder498034705/config.js: no such file or directory
Please advise
Hi, i'm using this docker image with docker-compose:
version: '3'
services:
redis:
container_name: redis
hostname: redis
image: redis
ports:
- "6379:6379"
nucleus:
image: atlassian/nucleus
depends_on:
- redis
volumes:
- './config.js:/opt/service/config.js'
- './files:/opt/service/.files'
- './db:/opt/service/db'
ports:
- 8888:8888
- 9999:9999
environment:
- DEBUG=nucleus* `
in my config.js i have:
const path = require('path');
module.exports = {
port: 8888,
baseURL: 'http://192.168.0.203:8888',
dbStrategy: 'sequelize',
sequelize: {
dialect: 'sqlite',
storage: path.resolve(__dirname, 'db', 'db.sqlite'),
},
fileStrategy: 'local',
local: {
root: path.resolve(__dirname, '.files'),
staticUrl: 'http://192.168.0.203:9999'
},
authStrategy: 'local',
localAuth: [{
displayName: 'Administrator',
username: 'admin',
password: '*hidden*',
photo: 'https://pbs.twimg.com/profile_images/1219364727/charlie-support_400x400.png'
}],
adminIdentifiers: ['admin'],
sessionConfig: {
type: "redis",
secret: 'ThisIsNotSecret',
redis: {
host: 'redis',
port: '6379'
}
},
organization: 'org',
gpgSigningKey: `*hidden*`,
defaultRollout: 0
};
where 192.168.0.203 is the ip of the machine
everithing works except the file server. On port 9999 nothing is running.
Thanks
Squirrel.Windows requires a remotely accessible ICO icon file for your application to use in the uninstall menu in Control Panel. Adding this to a known path in the Nucleus file store should be 👌
Hello,
I am running nucleus locally for testing purpose.
When i click on released package and then on specific package build it redirects me too http://localhost:9999/project-name/7beb2bbf4fa70dba4651fd512610eb5d/linux/x64/project-name-electron_1.0.1_amd64.deb showing 404 Not found. There is no any log in terminal.
Node: 8.11.1
Yarn: 1.6.0
Linux: Ubuntu 16.04
EDIT: Added slash, it was a bad copy
I am pretty new to this one and google does not offer me straight answer.
How do you generate both public/private key without password?
Thank you.
On ubuntu server only. No GUI or browser installed
Using start.sh to start every nucleus component we get this error on start-fe instance:
internal/child_process.js:319
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:1018:11)
at ChildProcess.spawn (internal/child_process.js:319:11)
at Object.exports.spawn (child_process.js:378:9)
at module.exports (/var/www/html/vuetest/node_modules/opn/index.js:75:24)
at reportReadiness (/var/www/html/vuetest/node_modules/webpack-dev-server/bin/webpack-dev-server.js:424:3)
at Server.<anonymous> (/var/www/html/vuetest/node_modules/webpack-dev-server/bin/webpack-dev-server.js:404:4)
at Server.g (events.js:292:16)
at emitNone (events.js:86:13)
at Server.emit (events.js:185:7)
at emitListeningNT (net.js:1284:10)
The issue is due by forever
cli that does not permit the browser launch causing the error above.
Resolution in package.json (remove --open option)
package.json
line 21
--"start-fe": "webpack-dev-server --progress --profile --colors --quiet --open",
++"start-fe": "webpack-dev-server --progress --profile --colors --quiet",
bye
Today was the first time I tried to create targets for both windows and mac (before it was always mac only). Trying to upload the files to the upload server made me realize, that it drafts multiple releases, one per platform.
Furthermore, when I release both of them, the one I released later overrides the one I first clicked on release, instead of them merging into a single release.
How are we supposed to handle multi-platform releases exactly?
I downloaded the most stable release of nucleus and set up yarn , copied config.template.js to config.js and then yarn dev as directed. However it gives me an error of GPG key, as the config says it needs it to sign and gives me a proxy error too. I am just setting up my dev machine, do i really need to have a gpg key,if yes then how you do it, if not then how can i bypass it so as just to run my development machine, so that i can test my electron app.
The proxy error is :[HPM] Error occurred while trying to proxy request /rest/config from 127.0.0.1:8888 to http://localhost:3030 (ECONNREFUSED)
I am running macos mohave , node 10.xx
Btw: i am new to the gpg system. I have generated one and its in my profile folder, but what to do with it ?
Thanks,
Jas
Within the channel release information, setFeedURL property url
has an extra ) at the end that causes syntax error.
Explore how hard it would be to enable linux support by creating a apt-repository in the static file store (S3). This should be possible but might require a lot of invalidation requires to cloudfront, also it would be impossible to respect staged rollouts.
Prior art on apt repos in S3: https://github.com/krobertson/deb-s3
I am new to this project and I recently got this server setup. However, I couldn't get the web UI to work at first. public_out
folder was not being generated at all.
I ran into the issue of webpack not being built automatically when I run yarn dev
. I had to manually run the script webpack --config webpack.config.js
via npm
for it to generate the public_out folder.
I was wondering whether is this a known issue or something I did wrong, but wasn't able to find a similar issue online, so I thought of posing this hoping it could be useful to someone.
Hi there!
Up until yesterday I was using nucleus-server
v0.7.5 in a dev environment, hosting both the release server and static files under the same host (release on port 8080, static files with serve
on port 8181) and everything was working fine.
I decided to deploy Nucleus on a soon-to-be production server, nginx in front of nucleus do manage to seperate host (release.myapp.com for Nucleus, update.myapp.com for static files) and enabling Let's Encrypt SSL.
I put my config files in this gist :
/srv/nucleus/config.js
, my Nucleus config file (I usually use environment variables, but replaced them with pseudo-values)/etc/nginx/conf.d/proxy.conf
/etc/nginx/sites-available/release.myapp.com.conf
/etc/nginx/sites-available/update.myapp.com.conf
Everyting seemed to be working well: I was able to upload a first version of my app with electron-forge
v5.2.2 on nucleus, and release it.
The Electron's autoUpdater was correctly configured in the app, and it was polling info like it should (telling everything was up-to-date).
The problem came when I wanted to release a new version of the app. The upload worked fine, I found the draft version inside nucleus but was unable to release it: all I got is 409 errors "Release already in progress".
I couldn't find any clues about that error... I'm stuck! 😞
All was working well up until I added nginx. Could that be the source?
Using start.sh, the line forever start -c “npm start” ./
cause this error:
> [email protected] start /home/rpaubuntu/work/nucleus
> npm run start-server "./" "./"
> [email protected] start-server /home/rpaubuntu/work/nucleus
> node lib/index.js "./" "./"
/home/rpaubuntu/work/nucleus/lib/rest/auth.js:27
secret: config_1.sessionConfig.secret,
^
TypeError: Cannot read property 'secret' of undefined
at Object.<anonymous> (/home/rpaubuntu/work/nucleus/lib/rest/auth.js:27:36)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/rpaubuntu/work/nucleus/lib/index.js:26:16)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
We suggest this solution (after that fix you have to run yarn build
to generate js) :
src/config.ts
line 13
-- if (!config) {
++ if (!config || !config.port) {
bye
Similar to #13 but for yum 👍
I'm trying to configure GPG key while using the nucleus
command for a production environment.
I've stumbled upon #30, but cannot find a working solution.
I followed this GitHub guide to generate a GPG key pair and export them into seperate files.
I tried to copy the content of each files individually in the config.gpgSigningKey
, then tried to copy both file contents inside the config key but all I got is this error message (while starting the serve with $ nucleus path/to/my/config.js
):
nucleus: Checking GPG key +87ms
nucleus: Bad gpg key, invalid
GPG key is invalid or missing, you must provide "config.gpgSigningKey"
@MarshallOfSound can you tell me what value should we pass to config.gpgSigningKey
?
https://www.npmjs.com/package/nucleus-server
Latest release is 0.8.1, GitHub is 0.8.3
As with #10 the application icon is purely a UI construct, it should be OK to allow users to upload a new icon for each application
Hi,
I know the config.template.js documented and explained, but I'm still having trouble creating a correct one. When I run docker run -t manifest-electron . command, I get the 'cannot locate the config.js file' from which I understand could mean the config.js file is written incorrectly. I know the path is correct, so it has to be the way I'm writing my config file. I've looked for example config.js file's but I can't. My project is a Angular app wrapped inside of Electron. Any guidance or suggestions will be much appreciated.
Possibility to upload builds e.g. .exe files directly from Nucleus.
There was a release identified as v0.0.0-alpha.19b, and now release v0.0.0-alpha.20 is available. Cannot mark .19b as dead.
Currently if an unhandled error occurs while transferring files from a TemporaryFile to a released File the operation is aborted but not cleaned up. This means the temporary file remains in the files store but the database entry has been removed.
Hi Comunnity,
I noticed that static server is not running in windows. The website server and endpoints are worning fine.
After a couple of hours trying to run the server in windows, I found that the script that runs the the command is... start-static
... which runs mkdir -p .files && serve .files --port 9999
... well, the command mkdir
in windows does not accept the -p
argument...
I will work on a fix for this and send a CR to contribute..
Regards
I wrote a custom publisher based on @electron-forge/publisher-nucleus. Upload endpoint returns an internal server error without error body. Below is the publisher code.
How can I investigate this issue? Is Nucleus writes error logs?
const config = require('./nucleusConfiguration.json')
const packageJson = require('./package.json');
const fetch = require('node-fetch');
const fs = require('fs');
const path = require('path');
const FormData = require('form-data');
const releasePath = 'out/make/squirrel.windows/x64';
async function publish() {
const form = new FormData();
form.append('platform', 'win');
form.append('arch', 'x64');
form.append('version', packageJson.version);
let artifactIdx = 0;
fs.readdirSync(releasePath)
.forEach(file => {
if (file.toLowerCase() !== 'releases') {
form.append(`file${artifactIdx}`, fs.createReadStream(path.join(__dirname, releasePath, file)), file)
artifactIdx += 1;
}
});
const response = await fetch(
`${config.nucleusHost}/rest/app/${config.appId}/channel/${config.channelId}/upload`,
{
headers: {
Authorization: config.token
},
timeout: 0,
method: 'POST',
body: form
}
);
if (response.status !== 200) {
throw new Error(`Unexpected response code from Nucleus: ${response.status}\n\nBody:\n${await response.text()}`);
}
}
publish().then(() => console.log('Published!')).catch(err => console.log(err));
Output
Error: Unexpected response code from Nucleus: 500
Body:
at publish (D:\electron-forge-app\nucleusPublisher.js:41:19)
at processTicksAndRejections (internal/process/task_queues.js:86:5)
It seems that https://github.com/atlassian/nucleus/blob/master/config.template.js lacks some required information.
I can't make the server fully functional with the documentation provided.
It seems that I have to run the separate container to serve static content. With the empty entrypoint and npm run start:static
BUT there is no make-dir
& serve
commands in path. So I have to add RUN yarn global add serve
to the Dockerfile and run it with serve .files -l 9999
and still have issues.
That's really weird.
Running the Docker image on localhost, does not work, it keeps reloading continuously.
After entering the user and password, all I see is a blank screen continuously refreshing or redirecting to localhost:8987.
This is how my configuration file looks like:
const path = require('path');
module.exports = {
port: 8987,
baseURL: 'http://localhost:8987',
dbStrategy: 'sequelize',
sequelize: {
dialect: 'sqlite',
storage: path.resolve(__dirname, 'db.sqlite'),
},
fileStrategy: 'local',
local: {
root: path.resolve(__dirname, '.files'),
staticUrl: 'http://localhost:8988'
},
authStrategy: 'local',
localAuth: [{
displayName: 'Studio',
username: 'randomtest',
password: 'testtest',
photo: 'https://random.studio/img/favicons/apple-touch-icon.png'
}],
adminIdentifiers: ['random'],
sessionConfig: {
type: 'redis',
secret: 'ThisIsNotSecret',
redis: {
host: 'localhost',
port: 6379
}
},
organization: 'Studio',
/**
* The default percentage rollout for new releases. The first release for
* any channel will always be 100% but all future releases will have a
* default rollout value of this setting
*/
defaultRollout: 0,
gpgSigningKey: `:D too long`
};
auto-updater clearly states that there is no built-in support for auto-updater on Linux.
But nucleus API has option to check for updates and fetch package not matter what is app environment?
Did you try to implement auto update on Linux?
If not what would be correct path in implementing one?
When trying to publish a release draft, I get the following log output:
nucleus:rest Releasing file: vipfy-desktop-0.1.2.x86_64.rpm to version: 0.1.2 for (vipfy/stable) +893ms
nucleus:positioner Fetching temporary file: bdcfec7513d41ed6953f9c89dbc2e3ba/vipfy-desktop-0.1.2.x86_64.rpm for app: vipfy +1ms
nucleus:positioner Handling upload (vipfy-desktop-0.1.2.x86_64.rpm) for app (vipfy) and channel (stable) for version (0.1.2) on platform/arch (linux/x64) +128ms
nucleus:positioner Adding rpm file to yum repo +0ms
nucleus:rest Unhandled error: /1/channel/4ef58dc1acb88964e2fe2b177b6559a0/temporary_releases/1/release +185ms
nucleus:rest ChildProcessError: `rpmsign -D "_gpg_name 3727E90CE90B5FC1" --addsign 0.1.2-vipfy-desktop-0.1.2.x86_64.rpm` failed with code 1
nucleus:rest at ChildProcess.<anonymous> (/var/www/nucleus-server/node_modules/child-process-promise/lib/index.js:132:23)
nucleus:rest at emitTwo (events.js:126:13)
nucleus:rest at ChildProcess.emit (events.js:214:7)
nucleus:rest at maybeClose (internal/child_process.js:925:16)
nucleus:rest at Socket.stream.socket.on (internal/child_process.js:346:11)
nucleus:rest at emitOne (events.js:116:13)
nucleus:rest at Socket.emit (events.js:211:7)
nucleus:rest at Pipe._handle.close [as _onclose] (net.js:567:12) +0ms
nucleus:rest Fetching temporary releases for app: vipfy and channel: stable +69ms
However, when I run rpmsign -D "_gpg_name 3727E90CE90B5FC1" --addsign 0.1.2-vipfy-desktop-0.1.2.x86_64.rpm
on the rpm file generated by electron-forge it shows no output and exits with code 0. What could be causing his issue, or how could I go about debugging it?
I'm running the current master branch of nucleus.
Is there a published official docker image?
I don't run the docker image on EC2 or even AWS infrastructure so the following fails
// src/files/s3/S3Store.ts
AWS.config.credentials = new AWS.EC2MetadataCredentials({
httpOptions: { timeout: 5000 },
maxRetries: 10,
});
Commenting it out and passing ENV variables for AWS credentials to docker run works, but a flag on the s3 config in config.js would probably be better. Unless I'm missing some other way to override.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.