iOS giving cookie.mom error when building MFP project - ibm-mobilefirst

We have a worklight project version 6.2.0.1 and I have migrated it to MFP 7.
During my build (Ant or eclipse) I'm getting this error for iOS:
ANT:
builtin-copyPlist --convert binary1 --outdir /Users/Sam/Desktop/ProjectName/temp/source/ProjectName/apps/ProjectName/iphone/native/CordovaLib/build/ProjectName.app -- WorklightSDK/resources/Cookies.mom
[exec]
/Users/Sam/Desktop/ProjectName/temp/source/ProjectName/apps/ProjectName/iphone/native/WorklightSDK/resources/Cookies.mom:0:
error: reading data: The file “Cookies.mom” couldn’t be opened because there is no such file.
If I built the project through eclipse and ran it to xCode i get:
Inside WoklightSDK, I don't see the cookies.mom
How to fix this error?

The mentioned files in the screen shots no longer exist in a MFP project (so it is OK that they are not there in a fresh project) The migration process was supposed to remove them and so the build should not have errored on them.
But you're getting an error, this means to me that the project was not migrated to MFP 7.
Edit: per the test project in the PMR you've opened, this is happening because in your project you use using the nativeResources folder. Use of this folder is no longer considered a best practice you should stop using it.
The error here is that After the migration process, that part of it removes the old cookies.mom files, the builder takes the contents of the nativeResources folder and copies it to the native folder. In this process it replaces the updated .xcodeproj (now with removed references to the cookies.mom files that no longer exist), with your old .xcodeproj file that does contain these references - to files that do not exist... thus when building in Xcode, it fails because it has references to files that do not exist.
Delete the .xcodeproj file from your nativeResources folder and re-building. Next, in Xcode, re-references your custom class files. After the build succeeds in Xcode and your app is working, copy back the updated .xcodeproj file to the nativeResource folder, if you choose to continue using it.
By continuing to use this folder, you void your support - as I mentioned, this folder is no longer considered a best practices and may disappear in the future.

Related

compiling golang using intellij is looking for wrong path of 3rd party packages

I'm using IntelliJ with the go plugin to write my application.
version of Go: go version go1.7beta2 darwin/amd64
Operation system: OSX El Capitan 10.11.5
Intellij Version: 2016.1.3
Go Installation Location: /usr/local/go
Go Pkg Location ($GOPATH): /Users/ufk/projects/go
when I open terminal, browse to my application's main source file, and type go it compiles it properly without any errors.
but when I try to Run the program using Intellij, which also compiles it, i get the following error:
/usr/local/go/pkg/tool/darwin_amd64/link: cannot open file /usr/local/go/pkg/darwin_amd64/github.com/codegangsta/negroni.a: open /usr/local/go/pkg/darwin_amd64/github.com/codegangsta/negroni.a: no such file or directory
lookgs like it's looking for the negroni package in the location when I have go installed, and not where I the 3rd party packages are installed according to $GOPATH. My project is configured to use $GOPATH, and the real time error of the intellj editor doesn't complain about packages that are not installed which means that Intellij does check the $GOPATH variable.
so what am i missing ?
thanks
update
Hi :)
I noticed something new... I have 2 go projects, one of them is the JSON Api Server, and the other is for the web server.
The project that is causing issues is the Api Server.
now, the web server also uses and imports negroni, but the problem occurs only on the Api Server Project.
so I decided to go wild and delete the .idea and iml file from the Api Server, reopen it with intellij, and see what happens... welp, what happens is that now it complains about a different module.
/usr/local/go/pkg/tool/darwin_amd64/link: cannot open file /usr/local/go/pkg/darwin_amd64/github.com/jingweno/negroni-gorelic.a: open /usr/local/go/pkg/darwin_amd64/github.com/jingweno/negroni-gorelic.a: no such file or directory
the thing is.. that my web server project also uses negroni-gorelic and things are fine!
I tried downgrading go from 1.7beta2 to 1.6.2, deleting the content of the modules ($GOPATH/pkg and in src directory github.com and golang.org)
then I got all the modules again.. tried to compile with intellij and the results are the same.
so... hope this helps to further investigate the issue.

VSTS build for UWP app not producing a .appxupload file

Issue: When building a UWP using the VSTS build service no .appxupload file for store submissions is created.
What I did: I created a build definition using the Universal Windows App template that contains 4 build steps. Apart from setting the repository to my external Git repository I didn't change anything.
After the build finishes I only have the _Test folder in my drop. No .appxupload file.
What I tried so far:
According to Build your Universal Windows Plattform app I have to add the UapAppxPackageBuildMode (set to CI) switch to the MSBuild arguments. I did it exactly as shown there. However, neither the .appxupload nor the _Test folder are created but the build step itself completes successfully. (Actually, the AppxPackages folder that is specified by default using the AppxPackageDir switch is missing, too)
I tried running the Create App Packages... option from within Visual Studio. This results in both, the .appxupload and _Test folder.
[Update] I found another switch to try at the MSBuild arguments which is AppxPackageIsForStore (set to true). This will generate the _Test folder but still not .appxupload package.
I could reproduce your issue. If don't use argument /p:UapAppxPackageBuildMode=CI, I could only get _Test folder. If add argument /p:UapAppxPackageBuildMode=CI, I'll get error message during Publish Artifact step:
Not found PathtoPublish: C:\a\1\b\AppxPackages
But I just tried argument /p:UapAppxPackageBuildMode=StoreUpload, it can generate both _Test folder and .appxupload file, you may have a try.

RNCryptor Dyld Error Message: Library not loaded

So, I've tired everything to get this to work after I've archived the application, but it keeps failing to open with the error message:
Dyld Error Message:
Library not loaded: /Library/Frameworks/RNCryptor.framework/Versions/A/RNCryptor
Referenced from: /Users/USER/Desktop/Project.app/Contents/MacOS/Project
Reason: image not found
I've added the Framework to the Copy Files Build Phase, I've changed the Runpath Search Paths to #loader_path/../Frameworks and the Framework Search Path to #executable_path/../Frameworks and it still doesn't want to open.
It opens fine in Xcode itself, but as soon as it's archived, it complains and doesn't run.
Any help is much appreciated :)
Ok, so I was able to fix it.
So the application was actually looking for the Framework in /Library/Frameworks/ on my Mac, I originally had thought it was looking for a reference in my actual .app file.
To fix it I opened up Terminal, cd' into the folder containing a copy of RNCryptor.framework and used this command
install_name_tool -id #executable_path/../Frameworks/RNCryptor.framework/RNCryptor RNCryptor.framework/RNCryptor
Then removed the old framework from the Xcode Project and re-inserted it using the Framework I just used from the directory I cd' into, and added the new Framework to the Copy Files Build Phase.
And voila, it worked :)

Worklight 6.1 - "All Build" fails and gives java.lang.NullPointerException

Worklight 6.1 Studio.
Created Android and iPhone Platform. While do "All Build" it fails and gives java.lang.NullPointerException.
Log:
[2014-03-13 21:08:27] Starting build process: application 'MobileApp', all environments<br>
[2014-03-13 21:08:33] Application build failed: java.lang.NullPointerException
Try the following:
Delete the native folder
Close Eclipse
Locate your temp folder (Windows, OS X)
Delete the wlBuildResources folder
Open Eclipse
Re-build
If you have native code in your native\ folder, you can do the following for Android (and similarly for iOS):
copy android\native\res\xml\config.xml to android\nativeResources\res\xml folder (if the folder doesn't exist, create it)
copy android\native\src\com\your-app-name\*.java files to android\nativeResources\src\com\your-app-name folder (if the folder doesn't exist, create it)
copy android\native\AndroidManifest.xml to android\nativeResources folder
This way you do not need to fear removing the native folder; upon build time the files will be copied to their location in the native folder.

SpecFlow error on build server

I am getting a strange error on the build server, this does NOT happen locally.
Error during file generation. The target file 'C:...\AcceptanceTest\Features\HelloWorld.feature.cs'
is read-only, but different from the transformation result. This
problem can be a sign of an inconsistent source code package. Compile
and check-in the current version of the file from the development
environment or remove the read-only flag from the generation result.
To compile a solution that contains messaging project on a build
server, you can also exclude the messaging project from the
build-server solution or set the msbuild
project parameter to 'true' in the messaging project file.
I'm not sure what to do to fix this, I don't have a "messaging" project (or know what is being referred too). And the code is the latest
This is the full message (some folder names have been obfuscated):
13>C:\Builds\2\Services\PService\src\packages\SpecRun.Excel.1.1.0\tools\TechTalk.SpecFlow-buildfix.targets(47,5):
error : Error during file generation. The target file
'C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\Features\HelloWorld.feature.cs'
is read-only, but different from the transformation result. This
problem can be a sign of an inconsistent source code package. Compile
and check-in the current version of the file from the development
environment or remove the read-only flag from the generation result.
To compile a solution that contains messaging project on a build
server, you can also exclude the messaging project from the
build-server solution or set the msbuild
project parameter to 'true' in the messaging project file.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
13>C:\Builds\2\Services\PService\src\packages\SpecRun.Excel.1.1.0\tools\TechTalk.SpecFlow-buildfix.targets(47,5):
error : Could not find file
'C:\Users\tfsbuild\AppData\Local\Temp\tmpPWithData.feature.xlsx.cs'.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
13>C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\Features\PWithData.feature.xlsx
: error : Generation error: Could not find file
'C:\Users\tfsbuild\AppData\Local\Temp\tmpPWithData.feature.xlsx.cs'.
[C:\Builds\2\Services\PService\src\PService\Test\PService.AcceptanceTest\PService.AcceptanceTest.csproj]
Delete HelloWorld.feature.cs from source control.
TFS will checkout files as read-only during a build and so SpecFlow fails to re-generate the file because it already exists and SpecFlow doesn't overwrite read-only files.
I created a new request for SpecFlow to not automatically add the file to source control here: https://github.com/techtalk/SpecFlow/issues/592
I'm not sure what the messaging project refers to, that's something I haven't seen before.
However the error reads as if the problem is due to an issue with the generation of the *.feature.cs from the *.feature file, but I am confused as to why this should be happening on the build server. Normally the generation of *.feature.cs occurs in the IDE when you save the *.feature file. This gets checked in and with some version control systems (VCS) you may end up with a read-only file status.
Your error reads as the build server is trying to re-generate the *.feature.cs file and cannot overwrite it.
Some things to check;
What VCS are you running? Does it leave checked-in files as read-only?
How are you building the files on the build server? Is there a custom step involved, or is it just a simple compile?
Can you replicate this error on your machine by setting the *.feature.cs to read-only and running the same build script on your local machine?
Good luck.