Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

ganache instances should show a proper error message #4360

Closed
savvysiddharth opened this issue Apr 14, 2023 · 1 comment · Fixed by #4368
Closed

ganache instances should show a proper error message #4360

savvysiddharth opened this issue Apr 14, 2023 · 1 comment · Fixed by #4368

Comments

@savvysiddharth
Copy link

savvysiddharth commented Apr 14, 2023

/usr/lib/node_modules/ganache/dist/node/cli.js:2
!function webpackUniversalModuleDefinition(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("abstract-leveldown"),require("leveldown"),require("abstract-level"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):"function"==typeof define&&define.amd?define(["@trufflesuite/bigint-buffer","keccak","emittery","secp256k1","abstract-leveldown","leveldown","abstract-level","bufferutil","utf-8-validate"],t):"object"==typeof exports?exports.Ganache=t(require("@trufflesuite/bigint-buffer"),require("keccak"),require("emittery"),require("secp256k1"),require("abstract-leveldown"),require("leveldown"),require("abstract-level"),function webpackLoadOptionalExternalModule(){try{return require("bufferutil")}catch(e){}}(),function webpackLoadOptionalExternalModule(){try{return require("utf-8-validate")}catch(e){}}()):e.Ganache=t(e["@trufflesuite/bigint-buffer"],e.keccak,e.emittery,e.secp256k1,e["abstract-leveldown"],e.leveldown,e["abstract-level"],e.bufferutil,e["utf-8-validate"])}(global,(function(e,t,r,o,n,a,s,i,c){return(()=>{var u,l,p={790:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=790,e.exports=webpackEmptyContext},788:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=788,e.exports=webpackEmptyContext},542:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=542,e.exports=webpackEmptyContext},789:e=>{function webpackEmptyContext(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id=789,e.exports=webpackEmptyContext},281:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.expandArgs=void 0;const n=r(52),a=o(r(449)),s=r(39),i=o(r(46)),c=r(24),u=o(r(460)),l=o(r(464)),p=r(85);u.default.setOptions({renderer:new l.default({codespan:i.default.hex(n.TruffleColors.porsche),unescape:!1})});const d=Math.min(120,a.default.terminalWidth()),f="Need more help? Reach out to the Truffle community at",h="https://trfl.io/support",_="or check out our docs at",m="https://ganache.dev";const highlight=e=>function unescapeEntities(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/\*\#COLON\|\*/g,":")}(u.default.parseInline(e)),center=(e,t)=>" ".repeat(Math.max(0,Math.floor((d-t)/2)))+e;function processOption(e,t,r,o,n,a,s){if(!0!==n.disableInCLI){const u=[],l=[];let p=highlight(n.cliDescription||"");n.cliAliases&&(n.cliAliases.forEach((e=>{1===e.length?u.push(e):l.push(e)})),p=i.default`${p}${c.EOL}{dim deprecated aliases: ${l.map((e=>`--${e}`)).join(", ")}}`);const generateDefaultDescription=()=>e[o]=n.default?n.default(e,s).toString():void 0,d="defaultDescription"in n?n.defaultDescription:generateDefaultDescription(),{cliType:f}=n,h=f&&f.startsWith("array:"),_=h?f.slice(6):f,m={group:r,description:p,alias:u,defaultDescription:d,array:h,type:_,choices:n.cliChoices,coerce:n.cliCoerce,implies:n.implies},b=`${t}.${o}`;a=((e,t,r)=>{const o={hidden:!0,alias:r};return t.reduce(((e,t)=>e.option(t,o)),e)})(a,l,b),a=a.option(b,m)}}function applyDefaults(e,t,r){for(const o in e){const n=`${o[0].toUpperCase()}${o.slice(1)}:`,a=e[o],s={};for(const e in a){processOption(s,o,n,e,a[e],t,r)}}}function expandArgs(e){const t={};for(const r in e)if(-1===r.indexOf("-")){const[o,n]=r.split(/\.(.+)/);n&&(t[o]||(t[o]={}),t[o][n]=e[r])}return t}t.default=function default_1(e,t,r=process.argv.slice(2)){const o=i.default`{hex("${n.TruffleColors.porsche}").bold ${center(e,e.length)}}`;let u;for(u in a.default.parserConfiguration({"dot-notation":!1}).strict().usage(o).epilogue(o+c.EOL+c.EOL+center(i.default`{hex("${n.TruffleColors.porsche}").bold ${f}} {hex("${n.TruffleColors.turquoise}") ${h}}`,(f+" "+h).length)+c.EOL+center(i.default`{hex("${n.TruffleColors.porsche}").bold ${_}} {hex("${n.TruffleColors.turquoise}") ${m}}`,(_+" "+m).length)),s.DefaultOptionsByName){const e=s.DefaultOptionsByName[u];let r,o;switch(u){case s.FilecoinFlavorName:r=u,o=7777;break;case s.DefaultFlavor:r=["$0",u],o=8545;break;default:r=u,o=8545}a.default.command(r,i.default`Use the {bold ${u}} flavor of Ganache`,(r=>{applyDefaults(e,r,u),applyDefaults(p._DefaultServerOptions,r,u),r=r.option("server.host",{group:"Server:",description:i.default`Hostname to listen on.${c.EOL}{dim deprecated aliases: --host, --hostname}${c.EOL}`,alias:["h","host","hostname"],type:"string",default:t?"0.0.0.0":"127.0.0.1"}).option("server.port",{group:"Server:",description:i.default`Port to listen on.${c.EOL}{dim deprecated aliases: --port}${c.EOL}`,alias:["p","port"],type:"number",default:o}).check((e=>{const{"server.port":t,"server.host":r}=e;if(t<0||t>65535)throw new Error(`Invalid port number '${t}'`);if(""===r.trim())throw new Error("Cannot leave host blank; please provide a host");return!0})).option("detach",{description:highlight("Run Ganache in detached (daemon) mode."+c.EOL+"See `ganache instances --help` for information on managing detached instances."),type:"boolean",alias:["D","\u{1f608}"]})}),(e=>{e.action=e.detach?"start-detached":"start"}))}a.default.command("instances",highlight("Manage instances of Ganache running in detached mode."+c.EOL+"(Ganache can be run in detached mode by providing the `--detach` flag)"),(e=>{e.command("list","List instances running in detached mode",(e=>{}),(e=>{e.action="list"})).command("stop <name>","Stop the instance specified by <name>",(e=>{e.positional("name",{type:"string"})}),(e=>{e.action="stop"})).version(!1)})).showHelpOnFail(!1,"Specify -? or --help for available options").alias("help","?").wrap(d).version(e);const l=a.default.parse(r);let b;if("stop"===l.action)b={action:"stop",name:l.name};else if("list"===l.action)b={action:"list"};else{if("start"!==l.action&&"start-detached"!==l.action)throw new Error(`Unknown action: ${l.action}`);{const e=l.action;b={flavor:l._.length>0?l._[0]:s.DefaultFlavor,action:e,...expandArgs(l)}}}return b},t.expandArgs=expandArgs},285:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.formatUptime=t.getDetachedInstances=t.startDetachedInstance=t.stopDetachedInstance=t.removeDetachedInstanceFile=t.notifyDetachedInstanceReady=void 0;const n=r(188),a=o(r(795)),s=o(r(170)),i=o(r(520)),c=r(13),{readFile:u,mkdir:l,readdir:p,rmdir:d,writeFile:f,unlink:h}=c.promises,_=o(r(10)),m="utf8",b="An error occurred spawning a detached instance of Ganache:",w=(0,s.default)("Ganache/instances",{suffix:""}).data;function getInstanceFilePath(e){return _.default.join(w,`${e}.json`)}async function removeDetachedInstanceFile(e){const t=getInstanceFilePath(e);try{return await h(t),!0}catch{}return!1}async function getDetachedInstanceByName(e){const t=getInstanceFilePath(e),r=await u(t,m);return JSON.parse(r)}t.notifyDetachedInstanceReady=function notifyDetachedInstanceReady(e){process.send(e)},t.removeDetachedInstanceFile=removeDetachedInstanceFile,t.stopDetachedInstance=async function stopDetachedInstance(e){try{const t=await getDetachedInstanceByName(e);process.kill(t.pid,"SIGTERM")}catch(e){return!1}finally{await removeDetachedInstanceFile(e)}return!0},t.startDetachedInstance=async function startDetachedInstance(e,t,r){const[o,s,...i]=e,c=[...i,"--no-detach"],u=(0,n.fork)(s,c,{stdio:["ignore","ignore","pipe","ipc"],detached:!0});u.stderr.pipe(process.stderr);const p=await new Promise(((e,t)=>{u.on("message",(t=>{e(t)})),u.on("error",(e=>{console.error(`${b}\n${e.message}`),process.exitCode=1,t(e)})),u.on("exit",(e=>{process.exitCode=0===e?1:e,t(new Error(`${b}\nThe detached instance exited with error code: ${e}`))}))}));u.stderr.destroy(),u.unref(),u.disconnect();const d=t.flavor,{host:h}=t.server,g="win32"===process.platform?_.default.basename(process.execPath):[process.execPath,...process.execArgv,s,...c].join(" "),k=u.pid,v={startTime:Date.now(),pid:k,name:(0,a.default)(),host:h,port:p,flavor:d,cmd:g,version:r};for(;;){const e=getInstanceFilePath(v.name);try{await f(e,JSON.stringify(v),{flag:"wx",encoding:m});break}catch(e){switch(e.code){case"EEXIST":v.name=(0,a.default)();break;case"ENOENT":await l(w,{recursive:!0});break;default:throw e}}}return v},t.getDetachedInstances=async function getDetachedInstances(){let e,t,r=!1;try{[e,t]=await Promise.all([p(w,{withFileTypes:!0}),(0,i.default)()])}catch(e){if("ENOENT"!==e.code)throw e;return[]}const o=[],n=e.map((async e=>{const n=e.name,{name:a,ext:s}=_.default.parse(n);let i;if(".json"!==s)i=`"${n}" does not have a .json extension`;else{let e;try{e=await getDetachedInstanceByName(a)}catch(e){i=e.message}if(e){const r=t.find((t=>t.pid===e.pid));r?r.cmd!==e.cmd?i=`Process with PID ${e.pid} does not match ${a}`:o.push(e):i=`Process with PID ${e.pid} could not be found`}}if(void 0!==i){r=!0;const t=_.default.join(w,n);let o;if(e.isDirectory()){const e=`"${n}" is a directory`;try{await d(t,{recursive:!0}),i=e}catch{o=`"${n}" could not be removed`}}else try{await h(t)}catch{o=`"${n}" could not be removed`}console.warn(`Failed to load instance data. ${i}. ${o||`"${n}" has been removed`}.`)}}));return await Promise.all(n),r&&console.warn("If this keeps happening, please open an issue at https://github.com/trufflesuite/ganache/issues/new\n"),o},t.formatUptime=function formatUptime(e){if(e>-1e3&&e<1e3)return"Just started";const t=e<0;e=Math.abs(e);const r={d:Math.floor(e/864e5),h:Math.floor(e/36e5)%24,m:Math.floor(e/6e4)%60,s:Math.floor(e/1e3)%60},o=Object.entries(r).filter((e=>0!==e[1])).map((([e,t])=>`${t}${e}`)).join(" ");return t?`In ${o}`:o}},284:function(e,t,r){"use strict";var o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const n=o(r(46)),a=r(52),s=r(1),i=r(0);function color(e){return n.default`{hex("${a.TruffleColors.porsche}") ${e}}`}t.default=function default_1(e,t){const r=e.getOptions(),o=e.getInitialAccounts(),c=Object.keys(o),u=[];if(u.push(""),u.push("Available Accounts"),u.push("=================="),c.length>0?(c.forEach((function(e,t){const r=o[e].balance,n=r/s.WEI,a=r%s.WEI===0n?"":"~";let c=`(${t}) ${(0,i.toChecksumAddress)(e)} (${a}${n} ETH)`;o[e].unlocked||(c+=" \u{1f512}"),u.push(c)})),u.push(""),u.push("Private Keys"),u.push("=================="),c.forEach((function(e,t){u.push(`(${t}) ${o[e].secretKey}`)})),null!=r.wallet.accountKeysPath&&(u.push(""),u.push(`Accounts and keys saved to ${r.wallet.accountKeysPath}`))):u.push("(no accounts unlocked)"),null==r.wallet.accounts&&(u.push(""),u.push("HD Wallet"),u.push("=================="),u.push(`Mnemonic:      ${color(r.wallet.mnemonic)}`),u.push(`Base HD Path:  ${color(r.wallet.hdPath.join("/")+"/{account_index}")}`)),r.miner.defaultGasPrice&&(u.push(""),u.push("Default Gas Price"),u.push("=================="),u.push(color(r.miner.defaultGasPrice.toBigInt().toString()))),r.miner.blockGasLimit&&(u.push(""),u.push("BlockGas Limit"),u.push("=================="),u.push(color(r.miner.blockGasLimit.toBigInt().toString()))),r.miner.callGasLimit&&(u.push(""),u.push("Call Gas Limit"),u.push("=================="),u.push(color(r.miner.callGasLimit.toBigInt().toString()))),r.fork.network||r.fork.url){let e;u.push(""),u.push("Forked Chain"),u.push("=================="),e=r.fork.network?`Ethereum ${function capitalizeFirstLetter(e){return e[0].toUpperCase()+e.slice(1)}(r.fork.network.replace("goerli","g\xf6rli"))}, via ${n.default`{hex("${a.TruffleColors.infura}") 丕Infura}`}`:r.fork.url.toString(),u.push(`Location:        ${color(e)}`),u.push(`Block:           ${color(r.fork.blockNumber.toString())}`),u.push(`Network ID:      ${color(r.chain.networkId.toString())}`),u.push(`Time:            ${color(r.chain.time.toString())}`),0!==r.fork.requestsPerSecond&&u.push(`Requests/Second: ${color(r.fork.requestsPerSecond.toString())}`)}u.push(""),u.push("Chain Id"),u.push("=================="),u.push(color(r.chain.chainId.toString())),u.push(""),u.push("RPC Listening on "+t.host+":"+t.port),console.log(u.join("\n"))}},794:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function default_1(e,t){const r=e.getOptions(),o=await e.getInitialAccounts();console.log(""),console.log("Available Accounts"),console.log("==================");const n=Object.keys(o),a=1000000000000000000n;n.forEach((function(e,t){const r=o[e].balance;let n=`(${t}) ${e} (${r%a===0n?"":"~"}${r/a} FIL)`;o[e].unlocked||(n+=" \u{1f512}"),console.log(n)})),console.log(""),console.log("Private Keys"),console.log("=================="),n.forEach((function(e,t){console.log(`(${t}) ${o[e].secretKey}`)})),console.log(""),console.log(`Lotus RPC listening on ${t.host}:${t.port}`),console.log(`IPFS  RPC listening on ${r.chain.ipfsHost}:${r.chain.ipfsPort}`)}},795:(e,t)=>{"use strict";function pick(e){return e[Math.floor(Math.random()*e.length)]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function createInstanceName(){return`${pick(r)}_${pick(o)}_${pick(n)}`};const r=["baked","candied","deepfried","frozen","hot","molten","pureed","salted","spiced","sticky"],o=["almond","apple","banana","blackforest","caramel","cherry","chocolate","cinnamon","coconut","coffee","cream","custard","fruit","ginger","gingerbread","jelly","lemon","lime","milk","nut","orange","peanut","plum","poppyseed","rhubarb","strawberry","sugar","tiramisu"],n=["bar","biscuit","brownie","cake","cheesecake","cookie","crumble","cupcake","doughnut","drizzle","dumpling","friand","ganache","loaf","macaroon","mousse","muffin","pastry","pie","pudding","sponge","strudel","tart","torte","trifle","truffle","waffle"]},208:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){void 0===o&&(o=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,o,n)}:function(e,t,r,o){void 0===o&&(o=r),e[o]=t[r]}),n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return n(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=a(r(85)),c=s(r(281)),u=r(39),l=s(r(284)),p=s(r(794)),d=r(285),f=r(52),h=s(r(179)),_=s(r(46)),m=_.default.hex(f.TruffleColors.porsche),logAndForceExit=(e,t=0)=>{process.stdout._handle&&process.stdout._handle.setBlocking(!0);try{e.forEach((e=>console.log(e)))}catch(e){console.log(e)}process.exit(t)},b="7.7.7",w=`ganache v${b} (@ganache/cli: 0.8.6, @ganache/core: 0.8.6)`,g="DOCKER"in process.env&&"true"===process.env.DOCKER.toLowerCase(),k=(0,c.default)(w,g);if("start"===k.action){const e=k.flavor,t=k.server;let o;console.log(w);try{o=i.default.server(k)}catch(e){console.error(e.message),process.exit(1)}let n=!1;process.on("uncaughtException",(function(e){logAndForceExit(n?[e]:[e.stack],1)}));let a=!1;const handleSignal=async e=>{console.log(`\nReceived shutdown signal: ${e}`),closeHandler()},closeHandler=async()=>{try{switch(o.status){case i.ServerStatus.opening:return a=!0,void console.log("Server is currently starting; waiting\u2026");case i.ServerStatus.open:console.log("Shutting down\u2026"),await o.close(),console.log("Server has been shut down")}process.exitCode=0}catch(e){logAndForceExit(["\nReceived an error while attempting to shut down the server: ",e.stack||e],1)}};if("win32"===process.platform){const e=r(797).createInterface({input:process.stdin,output:process.stdout}).on("SIGINT",(()=>{e.close(),handleSignal("SIGINT")}))}process.on("SIGINT",handleSignal),process.on("SIGTERM",handleSignal),process.on("SIGHUP",handleSignal),console.log("Starting RPC server"),o.listen(t.port,t.host,(async t=>{if(t)return console.error(t),void(process.exitCode=1);if(a)return void closeHandler();n=!0;const{address:r,port:s}=o.address();switch(e){case u.FilecoinFlavorName:await(0,p.default)(o.provider,{host:r,port:s});break;case u.EthereumFlavorName:default:(0,l.default)(o.provider,{host:r,port:s})}void 0!==process.send&&(0,d.notifyDetachedInstanceReady)(s)}))}else if("stop"===k.action){const e=k.name;(0,d.stopDetachedInstance)(e).then((e=>{e?console.log("Instance stopped"):console.error("Instance not found")}))}else"start-detached"===k.action?(0,d.startDetachedInstance)(process.argv,k,b).then((e=>{const t=m(e.name);console.log(t)})).catch((e=>{})):"list"===k.action&&(0,d.getDetachedInstances)().then((e=>{if(0===e.length)console.log(`No detached instances found - try ${m("ganache --detach")} to start a detached instance`);else{const t=Date.now(),r=new h.default({head:[_.default.bold("PID"),_.default.bold("Name"),_.default.bold("Flavor"),_.default.bold("Version"),_.default.bold("Host"),_.default.bold("Uptime")],colAligns:["right","left","left","left","left","right"],style:{head:["white","white","white","white","white","white"]}});e.sort(((e,t)=>t.startTime-e.startTime));for(let o=0;o<e.length;o++){const n=e[o],a=t-n.startTime;r.push([n.pid.toString(),m(n.name),n.flavor,n.version,`${n.host}:${n.port.toString()}`,(0,d.formatUptime)(a)])}console.log(r.toString())}}))},787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(208)},25:e=>{"use strict";e.exports=require("assert")},17:e=>{"use strict";e.exports=require("buffer")},188:e=>{"use strict";e.exports=require("child_process")},6:e=>{"use strict";e.exports=require("crypto")},26:e=>{"use strict";e.exports=require("events")},13:e=>{"use strict";e.exports=require("fs")},72:e=>{"use strict";e.exports=require("http")},109:e=>{"use strict";e.exports=require("https")},110:e=>{"use strict";e.exports=require("net")},24:e=>{"use strict";e.exports=require("os")},10:e=>{"use strict";e.exports=require("path")},796:e=>{"use strict";e.exports=require("process")},432:e=>{"use strict";e.exports=require("querystring")},797:e=>{"use strict";e.exports=require("readline")},20:e=>{"use strict";e.exports=require("stream")},111:e=>{"use strict";e.exports=require("tls")},424:e=>{"use strict";e.exports=require("tty")},70:e=>{"use strict";e.exports=require("url")},7:e=>{"use strict";e.exports=require("util")},249:e=>{"use strict";e.exports=require("worker_threads")},413:e=>{"use strict";e.exports=require("zlib")},62:t=>{"use strict";t.exports=e},389:e=>{"use strict";e.exports=s},43:e=>{"use strict";e.exports=n},414:e=>{"use strict";if(void 0===i){var t=new Error("Cannot find module 'bufferutil'");throw t.code="MODULE_NOT_FOUND",t}e.exports=i},18:e=>{"use strict";e.exports=r},90:e=>{"use strict";e.exports=t},159:e=>{"use strict";e.exports=a},262:e=>{"use strict";e.exports=o},416:e=>{"use strict";if(void 0===c){var t=new Error("Cannot find module 'utf-8-validate'");throw t.code="MODULE_NOT_FOUND",t}e.exports=c}},d={};function __webpack_require__(e){var t=d[e];if(void 0!==t)return t.exports;var r=d[e]={id:e,loaded:!1,exports:{}};return p[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}return __webpack_require__.m=p,__webpack_require__.c=d,__webpack_require__.x=()=>{var e=__webpack_require__.O(void 0,[0,4,1],(()=>__webpack_require__(__webpack_require__.s=787)));return e=__webpack_require__.O(e)},__webpack_require__.amdD=function(){throw new Error("define cannot be used indirect")},__webpack_require__.amdO={},u=[],__webpack_require__.O=(e,t,r,o)=>{if(!t){var n=1/0;for(c=0;c<u.length;c++){for(var[t,r,o]=u[c],a=!0,s=0;s<t.length;s++)(!1&o||n>=o)&&Object.keys(__webpack_require__.O).every((e=>__webpack_require__.O[e](t[s])))?t.splice(s--,1):(a=!1,o<n&&(n=o));if(a){u.splice(c--,1);var i=r();void 0!==i&&(e=i)}}return e}o=o||0;for(var c=u.length;c>0&&u[c-1][2]>o;c--)u[c]=u[c-1];u[c]=[t,r,o]},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,r)=>(__webpack_require__.f[r](e,t),t)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),__webpack_require__.p="",(()=>{var e={2:1};__webpack_require__.O.require=t=>e[t];__webpack_require__.f.require=(t,r)=>{e[t]||(t=>{var r=t.modules,o=t.ids,n=t.runtime;for(var a in r)__webpack_require__.o(r,a)&&(__webpack_require__.m[a]=r[a]);n&&n(__webpack_require__);for(var s=0;s<o.length;s++)e[o[s]]=1;__webpack_require__.O()})(require("./"+__webpack_require__.u(t)))}})(),l=__webpack_require__.x,__webpack_require__.x=()=>(__webpack_require__.e(0),__webpack_require__.e(4),__webpack_require__.e(1),l()),__webpack_require__.x()})()}));
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

Error: Unknown action: undefined
    at default_1 (/usr/lib/node_modules/ganache/dist/node/cli.js:2:6649)
    at Object.208 (/usr/lib/node_modules/ganache/dist/node/cli.js:2:15741)
    at __webpack_require__ (/usr/lib/node_modules/ganache/dist/node/cli.js:2:19944)
    at Object.787 (/usr/lib/node_modules/ganache/dist/node/cli.js:2:18268)
    at __webpack_require__ (/usr/lib/node_modules/ganache/dist/node/cli.js:2:19944)
    at /usr/lib/node_modules/ganache/dist/node/cli.js:2:20144
    at Function.__webpack_require__.O (/usr/lib/node_modules/ganache/dist/node/cli.js:2:20621)
    at __webpack_require__.x (/usr/lib/node_modules/ganache/dist/node/cli.js:2:20222)
    at Function.__webpack_require__.x (/usr/lib/node_modules/ganache/dist/node/cli.js:2:21893)
    at /usr/lib/node_modules/ganache/dist/node/cli.js:2:21918

I get this output whenever I'm running the command ganache instances, Instead I believe it should give me instruction for correct usage of ganache instances command. Maybe a better output could be the same as ganache instances --help.

@savvysiddharth savvysiddharth changed the title ganache instances should show better output ganache instances should show a proper error message Apr 15, 2023
@jeffsmale90
Copy link
Contributor

Thanks @savvysiddharth - good find!

We're currently talking to developers such as yourself about how they use detach mode, and how we can make it better!

I'd love to sync with you if you'd be interested in trying out some pre-release detach mode improvements, and letting us know what you think. Your feedback would be really valuable!

Either way, I'll look to get a fix for this issue in the works ASAP.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
2 participants