nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Missing boxfile.yml although present

Open mbrodala opened this issue 7 years ago • 13 comments

I have a repository which includes configuration for the Shippable CI and Nanobox.

For the build I'm executing the CI bootstrap script to set up Nanobox which seems to work fine.

However, the build fails with an obscure error:

nanobox run test.php
Skipping (already running) :
Preparing environment :

--------------------------------------------------------------------------------
+ HEADS UP:
+ This is the first build for this project and will take longer than usual.
+ Future builds will pull from the cache and will be much faster.
--------------------------------------------------------------------------------


Building runtime :
  Starting docker container :
  Preparing environment for build :
    - Copying ssh keys into the build environment...
    - Setting up directories and permissions...
    
    :::::::::::::::::::::::::::::::::::::::::::::::::::::::: MISSING BOXFILE.YML !!!
    
    Nanobox is looking for a boxfile.yml config file. You might want to 
    check out our getting-started guide on configuring your app:
    
    https://guides.nanobox.io/
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    

:::::::::::::::::::::::::::::::::::::::::::::::::::::::: MISSING BOXFILE.YML !!!

Nanobox is looking for a boxfile.yml config file. You might want to 
check out our getting-started guide on configuring your app:

https://guides.nanobox.io/

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Error   : failed to execute hook (fetch) on 985765d4b64137201c5f1ab95b34e865bc87eb4fe5b2e541cf74b51bd94a7226: util:Exec:/opt/nanobox/hooks/fetch: bad exit code(1): 
Context : failed to build the code

The boxfile.yml is present however, so what's wrong here?

mbrodala avatar Apr 07 '17 14:04 mbrodala

I get the same issue when issuing a nanobox run test.php locally so I guess something's wrong with my boxfile.yml?

run.config:
  engine: php
  engine.config:
    runtime: php-7.0

web.site: {}

mbrodala avatar Apr 07 '17 14:04 mbrodala

This could be an issue with mounting. It is possible that the code didnt get mounted.

lyondhill avatar Apr 10 '17 19:04 lyondhill

Alright, the issue seems to be gone today. I did perform a nanobox-update and nanobox update-images though.

mbrodala avatar Apr 11 '17 08:04 mbrodala

Having the same issue and nanobox-update and nanobox update-images did not work for me.

OnyekaIjeh avatar Jul 07 '17 22:07 OnyekaIjeh

Looks like maybe this is still a problem. @OnyekaIjeh can you paste the output your getting?

tylerflint avatar Jul 10 '17 17:07 tylerflint

Getting the same issue on win 10 64bit: (brand new rails 5 app, with boxfile.yml)

Btw: It asks me for a windows password, although my machine has NO password. and not linked to any Live account. I just type a random PW and continue then get this error like the guy above me:

  √ Mounting codebase                                                                                                   
                                                                                                                        
--------------------------------------------------------------------------------                                        
+ HEADS UP:                                                                                                             
+ This is the first build for this project and will take longer than usual.                                             
+ Future builds will pull from the cache and will be much faster.                                                       
--------------------------------------------------------------------------------        
                             ```
                                                                                   
Building runtime :                                                                                                      
  √ Starting docker container                                                                                           
  ! Preparing environment for build                                                                                     
    - Copying ssh keys into the build environment...                                                                    
    - Setting up directories and permissions...                                                                         
                                                                                        
:::::::::::::::::::::::::::::::::::::::::::::::::::::::: MISSING BOXFILE.YML !!!                                    
                                                                                                                    
Nanobox is looking for a boxfile.yml config file. You might want to                                                 
check out our getting-started guide on configuring your app:                                                        
                                                                                                                    
https://guides.nanobox.io/                                                                                          
                                                                                                                    
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::                                    
                                                                                                                    
                                                                                                                    

Error : failed to execute hook (fetch) on d9928383e25bed5d77de109d1c806e58e8d41dc49fc2805465191967ef1e3210: util:Exec: /opt/nanobox/hooks/fetch: bad exit code(1):
Context : failed to build the code

Enter to continue:


boxfile.yml content:

run.config:
  engine: ruby

  extra_packages:
    - nodejs

Spazer9 avatar Jul 28 '17 12:07 Spazer9

I have same issue

maxbaluev avatar Aug 09 '17 12:08 maxbaluev

@maxbaluev - Can you please provide some more details on your setup so we can narrow down the cause and a fix? Thanks!

@all - If your boxfile.yml is valid (which seems the case, here) and in the same directory you're running nanobox commands from (which also seems to be the case, here), one thing you can try is switching your mount-type from netfs to native, then restarting your app:

nanobox configure set mount-type native
nanobox stop

And then continue using Nanobox as normal from there. Please report back in here whether that works or not, so we can further narrow down the actual problem, and find an actual solution.

danhunsaker avatar Aug 09 '17 12:08 danhunsaker

It helped, thanks.

maxbaluev avatar Aug 09 '17 12:08 maxbaluev

I was having this issue and same with @Spazer9 , my computer didn't have a password. By just hitting enter at the password prompt, the cli didn't do anything after.

The only problem with mount-type native, is that symlinks didn't seem to work.

In the end, I setup a password which fixed everything.

Could there be an option/flag for no passwords?

rustomenglish avatar Dec 20 '17 01:12 rustomenglish

Unfortunately, we don't support passwordless accounts, not because we don't want to, but because the OS won't let us programmatically perform certain tasks with admin rights without supplying a non-empty password to do it. In other words, this limitation is at the system level, and beyond our control. We should probably be louder about passwordless accounts not being supported, somehow, though.

danhunsaker avatar Dec 20 '17 01:12 danhunsaker

Same here with new project on Win 10 64bit.

boxfile.yml

run.config:
  engine: python

shell output

> nanobox run
Building runtime :                                                                                                      
  √ Starting docker container                                                                                           
  ! Preparing environment for build                                                                                     
    - Copying ssh keys into the build environment...                                                                    
    - Setting up directories and permissions...                                                                         
                                                                                        

:::::::::::::::::::::::::::::::::::::::::::::::::::::::: MISSING BOXFILE.YML !!!                                    
                                                                                                                    
Nanobox is looking for a boxfile.yml config file. You might want to                                                 
check out our getting-started guide on configuring your app:                                                        
                                                                                                                    
https://guides.nanobox.io/                                                                                          
                                                                                                                    
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 

buckle2000 avatar Feb 25 '18 12:02 buckle2000

nanobox configure set mount-type native nanobox stop

Did work for me too

lucasdcrk avatar Mar 25 '18 17:03 lucasdcrk