monaca / monaca-lib

npm package for handling Monaca cloud API and local debugging API
http://monaca.io
Other
13 stars 11 forks source link

iOS build trigger fails if new project is created from monaca-lib #138

Open alok-sin opened 5 years ago

alok-sin commented 5 years ago

We are trying to perform Monaca tasks programmatically to automate the app build process. Please note that everything works fine from the Monaca IDE using a browser, however, the last step which is related to triggering the build fails when we do things programmatically.

Below is the process that we are following:

  1. Create a blank Monaca project.
  2. Clone it on the local machine.
  3. Migrate code to the cloned project.
  4. Upload project from the local machine.
  5. Trigger remote build.

We can successfully perform the first four (4) steps using your NPM library programmatically but during the 5th step, we get the following build error:

Fetching Build Queue Data... -> Fetched data for queue ID xxxxxxxxxxxxxx Preparing Build Environment... Creating Project Build Workspace... Fetching Project Content... Downloading Project Archive... Extracting Project Archive... Fetching Project Info... Build Error: Error: Failed to fetch project info with error : Error: project_info.json not found.

We have noticed that if before the 5th step we trigger the build from the Monaca IDE using a browser manually, then the 5th step is successful using the NPM libraries. However, we want to fully automate this process and we would like to find the fix for the build failure.

Folks at Monaca support believe that it is a monaca-lib issue.

Please find npm project src files with this comment. src.zip

yong-asial commented 5 years ago

@alok-sin sorry for late reply. Looking at the error messageError: Failed to fetch project info with error : Error: project_info.json not found., it seems that the .monaca/project_info.json is missing or something. In the Step 4 - uploading project to the cloud, could you make sure the monaca/project_info.json is uploaded. In addition, you may check .monacaignore file in project directory whether it contains the following lines:

/.monaca/*
!/.monaca/project_info.json