nile icon indicating copy to clipboard operation
nile copied to clipboard

nile deploy: Error while running deploy on local testnet

Open chaosconstruct opened this issue 3 years ago • 1 comments
trafficstars

Hello I am using Python Python 3.9.7 on MacOS Monterey 12.3.1, (1.4 GHz Quad-Core Intel Core i5). I have install nile and nile init. I am able to compile my cairo contracts but I struggle and cannot deploy it on local testnet when I run nile node on another CLI.

nile deploy helloworld --alias helloworld
🚀 Deploying helloworld
Error: BadRequest: HTTP error ocurred. Status: 500. Text: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>500 Internal Server Error</title>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>

Traceback (most recent call last):
  File "/Users/opt/anaconda3/bin/nile", line 8, in <module>
    sys.exit(cli())
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/nile/main.py", line 44, in deploy
    deploy_command(artifact, arguments, network, alias)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/nile/commands/deploy.py", line 29, in deploy_command
    output = subprocess.check_output(command)
  File "/Users/opt/anaconda3/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/Users/opt/anaconda3/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['starknet', 'deploy', '--contract', 'artifacts/helloworld.json', '--gateway_url=http://localhost:5000/']' returned non-zero exit status 1.

This is the error I get on Nile Node CLI

(env) (base) ak@Ak-MBP nile-cairo % nile node
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
[2022-06-03 12:19:43,961] ERROR in app: Exception on /gateway/add_transaction [POST]
Traceback (most recent call last):
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 1953, in full_dispatch_request
    return self.finalize_request(rv)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 1968, in finalize_request
    response = self.make_response(rv)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 2127, in make_response
    raise TypeError(
TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a coroutine.
127.0.0.1 - - [03/Jun/2022 12:19:43] "POST /gateway/add_transaction HTTP/1.1" 500 -
[2022-06-03 12:25:13,968] ERROR in app: Exception on /gateway/add_transaction [POST]
Traceback (most recent call last):
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 1953, in full_dispatch_request
    return self.finalize_request(rv)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 1968, in finalize_request
    response = self.make_response(rv)
  File "/Users/opt/anaconda3/lib/python3.9/site-packages/flask/app.py", line 2127, in make_response
    raise TypeError(
TypeError: The view function did not return a valid response. The return type must be a string, dict, tuple, Response instance, or WSGI callable, but it was a coroutine.
127.0.0.1 - - [03/Jun/2022 12:25:13] "POST /gateway/add_transaction HTTP/1.1" 500 -


chaosconstruct avatar Jun 03 '22 10:06 chaosconstruct

Hi. Sorry for the long wait, this fell through the cracks. I could not reproduce this, is the problem persisting?

martriay avatar Nov 19 '22 00:11 martriay