0
votes

I've made a few projects already with MFP, but this morning I created a brand new one:

mfp create feb21
cd feb21
mfp add hybrid
mfp add environment (selected iphone + android)
mfp start

On start, it ran, but then failed in the iPhone area:

BUILD FAILED /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:128: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:305: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:315: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:294: Failed building application: com.worklight.builder.exception.WorklightBuildException: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Problem reading info.plist file /Users/raymondcamden/Desktop/trash/feb21/apps/App1/iphone/native/Entitlements-Debug.plist (No such file or directory) Nested exception: /Users/raymondcamden/Desktop/trash/feb21/apps/App1/iphone/native/Entitlements-Debug.plist (No such file or directory)

I then tried it again, for the heck of it, and now it fails in the Android area:

BUILD FAILED /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:128: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:305: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:315: The following error occurred while executing this line: /Applications/IBM/MobileFirst-CLI/mobilefirst-cli/node_modules/generator-worklight-server/lib/build.xml:294: Failed building application: com.worklight.builder.exception.WorklightBuildException: com.worklight.builder.exception.WorklightBuildRuntimeException: Resource Manager - Error while reading XML file: /Users/raymondcamden/Desktop/trash/feb21/apps/App1/android/native/AndroidManifest.xml (No such file or directory) Nested exception: /Users/raymondcamden/Desktop/trash/feb21/apps/App1/android/native/AndroidManifest.xml (No such file or directory)

After multiple retries, I only get errors in this area. I can confirm that the file does indeed not exist, but I don't know why.

2
Ray can you provide the output of the command "mfp info" , this would provide more info for example JDK JAVA_HOME (it should be 1.7). Also can you try removing the directories "native" for both App1/iphone/native and App1/android/native. The run mfp build but this time in debug mode so it prints more info. "mfp build -d"csantanapr
Oops, sent comment before done. Removed native folders, here is the output of mfp build -d: gist.github.com/cfjedimaster/dc6b775e401d35fe4f95Raymond Camden
As just an FYI, I made another project, doing the exact same command line calls as above (well, I changed the name), and I get the same error. Am I using the CLI incorrectly here? My thinking was: New project. Hybrid. I want to support iOS + Android.Raymond Camden

2 Answers

0
votes

If you don't have any native code, then remove the environment - iPhone and android, and add again. I had the same issue, removing and adding the environment did the trick.

0
votes

When the unknown happens the last resources is to clean mfp environment. At least for Mac try this:

Check is the mfp test server and analytics services are running and kill them. One way is to reboot your computer.

Another is to find the process ID (PID) using lsof:

$ lsof -i :10080
COMMAND   PID       USER   FD   TYPE 
java    70031 csantana23  171u  IPv4 0xc20be7c0903a7517      0t0  TCP *:10080 (LISTEN)
$lsof -i :10777
COMMAND   PID       USER   FD   TYPE
java    70031 csantana23    6u  IPv4 0xc20be7c0aee2c9f7      0t0  TCP *:10777 (LISTEN)

Kill the process using the PID value from the output of lsof:

$ kill -9 70031

Clean the temporary directory for MFP test server:

$ rm -r $HOME/.ibm/mobilefirst

Create a new Project with a Hybrid App for iOS and Android:

$ mfp create MFProject
A MobileFirst Project was successfully created at /Users/csantana23/MFProject
$ cd MFProject/
$ mfp add hybrid App1
A new Hybrid App was added at /Users/csantana23/MFProject/apps/App1
$ cd apps/App1/
$ mfp add environment iphone,android
A new android Environment was added at /Users/csantana23/MFProject/apps/App1/android
A new iphone Environment was added at /Users/csantana23/MFProject/apps/App1/iphone
$ mfp start
Cannot find the server configuration. Creating a new MobileFirst test server.
Initializing MobileFirst Console.
Starting server worklight.
Server worklight started with process ID 70325.
$ mfp preview

Hope this helps!