Error migrating Worklight 5.0.6 project to 6.1 - ibm-mobilefirst

I am receiving an error trying to upgrade my Worklight project from v5.0.6 to v6.1. I have done all of the pre-migration steps, including removing Tealeaf libraries from the project and adding the new analytics settings to the initOptions.js file.
During the migration, it fails in the step where it is trying to add Worklight Analytics properties to the Worklight properties file. I am getting the following error:
Migrator class com.worklight.upgrader.upgraders.ios.AppAddAnalyticsIPhonePlistXMLUpgrader has failed
Migrating the bcbst_mma_app_wl project from version 5.0.6 to version 6.1.0.0 has failed because Failed reading bcbstmmaappwlMmaIphone-Info.plist
I am not sure what is causing the issue. I thought it may be file permissions since I am using a copy of the actual 5.0.6 project, but the permissions look fine. I have been able to "successfully" migrate the project before by removing that plist file before the upgrade, but the upgrade complained that the file was missing, and it never really worked correctly.
I am using the Consumer edition of Worklight, in case that makes any difference.
EDIT I got the migration to work. I did a chmod 777 on all of the files in the directory and it worked. Not an ideal solution, but it worked. Thanks to #mikerott for pointing me in the right direction.

Are you using a Mac? Often importing projects with the "copy into workspace" checkbox checked will result in files being placed with the Mac "locked" file permission bit set.
Please find the bcbstmmaappwlMmaIphone-Info.plist file in Finder, right-click -> Get Info. See if the "Locked" checkbox is checked. If so, uncheck it and see if you encounter the same problem.
You may have to do this with multiple files.

Related

Worklight error: File not found: /css/images/wl_app_warning.png

I have found an issue with my worklight project. What i have done here is as follows:
I have a project which was built and deployed without any issues.
I wanted to edit most of the images and re-arrange the whole images folder structure.
So I deleted all the contents in the images folder completely from eclipse so that i can save each new image to the newly created folders
Now, i created new folders in images folder and saved one image to one of the newly created folders.
I tried to run the application on mobileFirst development server and started getting the error message:
"SRVE0190E: File not found: /css/images/wl_app_warning.png"
We did not even have a folder named images in css folder before.
This is what happened for me and does this give any clue for the issue??
Please help.
This is a defect in the admin service, and is tracked as APAR PI51055, which you can find more information about here:
http://www-01.ibm.com/support/docview.wss?uid=swg1PI51055
The issue has been corrected in iFix IF20151103-1015 and later builds.
If you have paid support, you will be able to download an iFix build from IBM Fix Central sometime soon that includes this fix - it is not out there for download right now, but I expect it will be within a couple of weeks. If you need the fix before it appears on IBM Fix Central, you can open a PMR and ask the support team to provide it. If you are using the free Developer Edition from the Eclipse Marketplace, I expect the fix will appear there soon also, and you can use the Eclipse software update function to get it, but I am not sure how frequently the Developer Edition repository is updated.
In my project I created an "images" folder with an image:
I then used it in the HTML:
<img src="css/images/wl_app_warning.png"/>
No errors and the image is displayed...

Worklight 6.2: Reference Error: WLJQ is not defined

My project was working fine before. After I added a few css files and js files from the other project, the preview as common resource or mobilesimulator produced this error. I have tried the suggested methods in this discussion thread (remove the folders in the temp dir, clean the project and reboot). But still could not fix it. Anything special in Worklight 6.2? Thanks.
IBM Worklight 6.1 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined
Fang
I had this problem and after working on a app for a while and then closing down eclipse. On restart I'd often get this problem when working in the browser. I'd delete the $TMPDIR/wl* folders but with no luck.
I had a tip given to me this weekend which seems to work.
Right click on the common folder within your app in WL Studio and Click Run As > Preview.
It seems if you do this at least once it resolves the problem. Not sure why it works, but it works for me and is much quicker than exporting the project and importing it into another workspace... which also works.
Try to export and re-import the project into a new workspace. I had this issue once, and this helped.
IBM Worklight 6.1 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined

"classes.dex not found. Try to rebuild project" in Android Studio

I'm unable to build Android project using Android Studio 0.1.3. Everything worked fine until latest SVN update of the project. This is strange, because no settings were changed (SDK, dependencies etc.). I also didn't update any tools. I keep getting the error:
Android Packager: [trunk] File /home/matis/.AndroidStudioPreview/system/compile-server/apilot_f8e91252/android/intermediate_artifacts/trunk/classes.dex not found. Try to rebuild project
There are no errors in source code, I can build and deploy it on a device without problems using Eclipse. I'm using SDK rev. 17 with SDK Tools rev. 22.
I tried to build source from earlier SVN revision, but the same thing happens.
Has anyone else experienced similar problem? How can I solve it?
Update
After some investigation I found out that dx tool doesn't get called at all (I modified its script so it would create some file if run), but aapt is called properly.

Worklight fails to install customization jar

I have three projects in my workspace, two deploy to the server correctly, the third has just begun to give this error:
Failed to install and start project customization from file <path>MyProj-customization.jar
I've seen this before on other projects and usually it's sufficient to start the server for another project and come back to the one with problems. When that doesn't work the next recipe (found on developer works) is
Exit Eclipse/Worklight Studio
Delete <workspace>/WorkLightServerHome
delete project bin
Start Studio, rebuild
That also doesn't work. Finally there's a further recipe on developer works
When Eclipse is not running, go to:
1. <path-to-your-Eclipse-folder>\configuration\org.eclipse.osgi
2. Delete the .bundle* files
3. Start Eclipse
4. Build and deploy
Again this does not clear the problem, assuming I've understood step 2 correctly, I found exactly one file whose name is of the form .bundle* and a bundles directory with several sub-directories. I deleted only the .bundlexxx file.
Any other suggestions?
I would have expected that creating a new workspace would fix it, but on this occasion no such luck.
No true solution on this occasion. Normally a new workspace as a method of last resot has always worked in the past. In this case I found no alternative to reinstallation of Worklight.
In addition to the attempts you have tried, also try creating a new workspace and import the 'offending' project to it.
If all fails, have a new instance of Eclipse (Java EE, 4.2.2 SR2), re-install Worklight Studio and import the project.

XCode 4 Archive/IPA Error: "The operation couldn’t be completed. No such file or directory"

I've found various proposed solutions to this problem on this internet, but none of them work for me. Does anyone know why this might be happening?
http://answers.unity3d.com/questions/15294/xcode-build-and-archive-error-no-such-file-or-directory
http://blog.joshschumacher.com/2011/04/06/xcode4-the-operation-couldn%E2%80%99t-be-completed-no-such-file-or-directory/
I've tried archiving with every combination of coding signing vs not using code signing, and I've tried using every combination of provisioning profiles, but I still get the same error every time.
I'm very confused as to why I'd even be getting an error like this when trying to save a file. I'm using XCode 4, my application builds for archive fine. In fact, I can even upload my application to itunesconnect (and it was accepted!). I just can't create an IPA for sharing and beta testing before submission.
Any ideas?
The error message
Right before I get the error
After much frustration, I filed a developer support request with Apple. The technician I spoke with was able to save my archive as an .ipa on her computer -- the exact same archive that I was not able to save on mine, which pointed to a possible bug in my system (and from the sounds of it, many other people's).
She recommended that I uninstall and reinstall XCode and the developer tools, and that worked!
Here were her uninstall instructions:
Make sure that your machine is running the latest Mac OS X (10.6.7) and iTunes.
Run the following command in the Terminal application to uninstall your SKD:
sudo <Xcode>/Library/uninstall-devtools --mode=all (where <Xcode> is the path to the directory that contains your SDK.)
Drag your <Xcode> to the trash and restart your machine
Re-download and install Xcode (4.0.2) from the iOS Dev Center. Make sure that the System Tools, UNIX Development, Essentials packages in the Custom Install pane are selected before installing it.
I have the same issue after my distribution certificate was expired. I add new ones (private key and certificate) and xCode "Share" command starts to produce such error.
The problem resolves as soon as I remove old private key & certificate from Keychain Access.
Hope it helps
Selecting "Don't Re-sign" at Identity solved the same issue for me.
I actually had the same problem, but a different solution (and reason). I had Xcode 3 and Xcode 4 both running at one point. I recently deleted Xcode 3 and moved my Xcode 4 from /Xcode4 to /Developer directory. This caused me to have the same issue you describe.
I moved the directory back to /Xcode4 and now my archives save out correctly.
I also had the same problem but I could resolve the problem in the below way.
My project was on the portable disk (formatted as FAT-32) and the project referred some folders on the same disk as "add folder reference for any added folder". I could build it any configurations however I couldn't just make .ipa file with above alert.
So, I copied the referenced folders on the portable disk to the desktop of the disk installed XCode (MacOS). And adding again the folders into the project. I could make .ipa file.
I installed Xcode 4.0.2 in one directory and then manually moved it to another.
When I moved Xcode back to the first directory everything worked.