Comments (9)
With version Triton CLI 7.5.1 I'm having this exact same issue.
fs.js:151
throw new ERR_INVALID_CALLBACK(cb);
^
TypeError [ERR_INVALID_CALLBACK]: Callback must be a function. Received undefined
at makeCallback (fs.js:151:11)
at Object.unlink (fs.js:1057:14)
at ClientRequest.<anonymous> (/usr/lib/node_modules/triton/lib/do_profile/profilecommon.js:72:12)
at ClientRequest.emit (events.js:321:20)
at TLSSocket.socketErrorListener (_http_client.js:424:9)
at TLSSocket.emit (events.js:321:20)
at emitErrorNT (internal/streams/destroy.js:84:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'ERR_INVALID_CALLBACK'
}
from node-triton.
Would anyone like to test this diff:
diff --git a/lib/do_profile/profilecommon.js b/lib/do_profile/profilecommon.js
index 5f6cac5..c8b67ce 100644
--- a/lib/do_profile/profilecommon.js
+++ b/lib/do_profile/profilecommon.js
@@ -26,6 +26,7 @@ var sshpk = require('sshpk');
var mod_url = require('url');
var crypto = require('crypto');
var vasync = require('vasync');
+var VError = require('verror');
var which = require('which');
var wordwrap = require('wordwrap')(78);
@@ -69,8 +70,13 @@ function downloadUrl(opts, cb) {
});
req.on('error', function (err) {
- fs.unlink(opts.dest);
- cb(err);
+ fs.unlink(opts.dest, function onUnlink(unlinkErr) {
+ if (unlinkErr) {
+ cb(VError.errorFromList[err, unlinkErr]);
+ } else {
+ cb(err);
+ }
+ });
});
}
?
from node-triton.
This section will setup authentication to Triton DataCenter's Docker endpoint
using your account and key information specified above. This is only required
if you intend to use `docker` with this profile.
WARNING: Docker uses authentication via client TLS certificates that do not
support encrypted (passphrase protected) keys or SSH agents.
If you continue, this profile setup will create a fresh private key to be
written unencrypted to disk in "~/.triton/docker" for use by the Docker
client. This key will be useable only for Docker.
If you do not specifically want to use Docker, you can answer "no" here.
Continue? [y/n] y
Setting up profile "testing" to use Docker.
triton profile create: error (DEPTH_ZERO_SELF_SIGNED_CERT): self signed certificate
from node-triton.
@bhechinger Thanks! So better, then.
from node-triton.
Considering it actually tells me what's wrong now, yes. Much better. :)
from node-triton.
Oops, I assume you fixed the syntax error in my untested patch.
from node-triton.
I did not. It just worked as is.
from node-triton.
I did not. It just worked as is.
Ah, not syntax error, but rather invalid calling of the errorFromList
function in a code path you didn't hit.
from node-triton.
[email protected] is published with this
from node-triton.
Related Issues (20)
- v7.5.0 HOT 1
- triton inst migration finalize: error: not a valid migration action HOT 2
- Want Triton image update / tag HOT 1
- node-triton fails to resolve host when a CNAME HOT 1
- triton volume list and triton volume sizes should agree on a unit HOT 1
- Honor the XDG directory conventions HOT 1
- `triton profile` should generate certs for cmon
- triton rbac commands generate os.tmpDir deprecation warning HOT 1
- Unhide volumes HOT 1
- Wrong CLI_CONFIG_DIR when XDG_CONFIG_HOME is set HOT 1
- want act-as support for "triton profile docker-setup" and "triton profile cmon-certgen" HOT 1
- cmon-certgen should generate an example prometheus.yml HOT 1
- want --primary argument to "triton inst nic create" HOT 1
- AssertionError in keyring.js caused by OpenSSL 3 HOT 4
- BadDigestError: Content-MD5 when body has non-ascii characters HOT 4
- want cloud-config syntactic sugar
- Want npm lockfile HOT 2
- `instance ssh --help` is missing docs about tag `tritoncli.ssh.port`
- make cutarelease broke
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-triton.