Creating dev chain server from cli doesn't work

Hi, I am not able to create a dev chain server using the CLI, it is throwing the following error:

data: {
code: ‘invalid_post_request’,
message: ‘Invalid POST Request. Invalid network provided.’
}

I am using the following parameters:

moralis-admin-cli create-server -n “Komon dev” -r “amsterdam” -c “local devchain” -e “0x539 (local devchain)”

api keys are included in .env file

Any idea of what can be happening?

Thanks

Did you try only with that instead of all that long string?

Hi cryptokid,

Yes I have tried also that and I am getting the same error,

This is the response:

Server creation failed
Error: Request failed with status code 400
at createError (C:\Users\carlo\AppData\Roaming\npm\node_modules\moralis-admin-cli\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\carlo\AppData\Roaming\npm\node_modules\moralis-admin-cli\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\carlo\AppData\Roaming\npm\node_modules\moralis-admin-cli\node_modules\axios\lib\adapters\http.js:269:11)
at IncomingMessage.emit (events.js:327:22)
at IncomingMessage.EventEmitter.emit (domain.js:467:12)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
config: {
url: ‘https://admin.moralis.io/api/cli/createServer’,
method: ‘post’,
data: ‘{“apiKey”:“hidden”,“apiSecret”:“hidden”,“parameters”:{“name”:“Komon dev”,“region”:“5”,“network”:“ganache”,“chains”:"[\“0x539\”]"}}’,
headers: {
Accept: ‘application/json, text/plain, /’,
‘Content-Type’: ‘application/json’,
‘User-Agent’: ‘axios/0.21.4’,
‘Content-Length’: 148

I could test later, with testnet or mainnet works fine?

With testnet it is actually creating the server, but my console is throwing repeatedly this error:

TypeError: Cannot read property ‘status’ of undefined
at Timeout._onTimeout (C:\Users\carlo\AppData\Roaming\npm\node_modules\moralis-admin-cli\commands\createServer.js:89:32)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
TypeError: Cannot read property ‘status’ of undefined
at Timeout._onTimeout (C:\Users\carlo\AppData\Roaming\npm\node_modules\moralis-admin-cli\commands\createServer.js:89:32)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

Ok, what was the syntax that worked for testnet?

moralis-admin-cli create-server -n “Komon dev” -r ‘amsterdam’ --network “testnet” -e ‘0x13881’

Hi @cryptokid did you have the chance to test it?

tested now, it looks like I get same error for local devchain, for testnet it works, I don’t get an error, but somehow it continues to ask me for api key after server is created

Yes, is the same with me, is there a way around to solve it? Or should we raise the issue as a bug? (Don’t now how to do it)

it seems to be a bug, but you can still create a server instance from the admin interface now