cli icon indicating copy to clipboard operation
cli copied to clipboard

Scaffolding fails with error running command inside /tmp folder

Open notbdu opened this issue 3 years ago • 13 comments

Describe the bug Attempting to scaffold fails with an error. A scaffold directory is created but when trying to serve, a similar error occurs.

To Reproduce Steps to reproduce the behavior:

  1. Run starport app github.com/ORG/REPO
  2. Verify error - error while running command /tmp/2803504060: : exit status 4
  3. Attempt to starport serve within scaffolded project dir
  4. Verify error -
Cosmos SDK's version is: Stargate v0.40.0 (or later)

🛠️  Building proto...
cannot build app:

        error while running command /tmp/435490484: : exit status 4
Waiting for a fix before retrying...
  1. Neither /tmp/XXX files exist

Please provide output of commands

  • starport version starport version v0.16.0 linux/amd64 -build date: 2021-05-24T12:32:18Z
  • go version go version go1.16.4 linux/amd64
  • uname -a Linux pop-os 5.8.0-7642-generic #47~1614007149~20.10~82fb226-Ubuntu SMP Tue Feb 23 02:59:01 UTC x86_64 x86_64 x86_64 GNU/Linux

notbdu avatar May 26 '21 09:05 notbdu

@notbdu can you try scaffolding a chain in an empty directory?

fadeev avatar May 26 '21 09:05 fadeev

That's what I am doing. Removed the folder each attempt as well as ~/.starport.

Tried downgrading to starport v.0.15.1 and get a slightly different error now.

error while running command /tmp/nodetime: : exit status 4

notbdu avatar May 26 '21 09:05 notbdu

I couldn't reproduce this. Does it work when you're outside of /tmp?

Also, can you try using github.com/test/test to see if this is relavent with the Git address or not? e.g. starport app github.com/test/test.

ilgooz avatar May 26 '21 09:05 ilgooz

Hmm, same error :/.

XXX@~/go/src/github.com/test-[]$ starport app github.com/test/test               
                                                                                             
error while running command /tmp/nodetime: : exit status 4                                   

notbdu avatar May 26 '21 09:05 notbdu

Is there potentially any bad cached build state from prior runs that could cause this?

I tried removing everything in ~/.starport and doing a fresh install each time. Also tried building from source.

notbdu avatar May 26 '21 09:05 notbdu

Only other thing I can think of is my linux distro - I'm running a system76 laptop. They have their own ubuntu based linux distro (pop os).

notbdu avatar May 26 '21 09:05 notbdu

It might be due to that. Starport is actually starting a child process (nodejs) to generate some code for you. But this process seems to be returning with exit code 4 which mainly stands for interrupted system calls. Maybe Pop OS has some kind of restrictions for child processes?

ilgooz avatar May 26 '21 10:05 ilgooz

Btw, this is definitely not related to .starport dir, we don't have any spesific caching for the app command except Go's own cache for modules which isn't related with this problem.

ilgooz avatar May 26 '21 10:05 ilgooz

Will just run in a vanilla ubuntu VM :+1: , thanks for the quick responses guys!

notbdu avatar May 26 '21 10:05 notbdu

I'm also experiencing this issue on NixOS. Can we reopen the issue and try to investigate further?

ruhatch avatar Jun 03 '21 12:06 ruhatch

@ruhatch this might be a permissions issue. Can you try running with sudo?

Related: https://github.com/tendermint/starport/issues/1205

fadeev avatar Jun 03 '21 13:06 fadeev

I ran it with sudo and it didn't have the same failure, but it did end with exit status 1, so now seems like a slightly different issue.

Then if I run sudo starport serve, I get the no such file error again, so that's not fixing it unfortunately.

Any thoughts?

ruhatch avatar Jun 03 '21 15:06 ruhatch

Looks like this is still a problem. Let's try debugging this in the next iteration.

fadeev avatar Jul 15 '21 14:07 fadeev

Closing due to stale nature, please reopen if otherwise.

salmad3 avatar Nov 26 '23 20:11 salmad3