Worklight console apps overwritten when same project name, but different contexts - ibm-mobilefirst

I have a base app that I modify slightly for each customer. I have been using version control to switch between customers' versions in the same working directory and restart Eclipse. However, I now want to have multiple versions of the app next to each other (in separate directories). They all have the same app ids and adapter names, but different contexts.
The problem is, as soon as I deploy a second app, the first one gets overwritten by it. Say:
I deploy version 1, open it (common resources) -> it shows version 1.
I deploy version 2, open it -> it shows version 2.
I open version 1 again it -> it now shows version 2.
I presume it has something to do with the app names/id's being equal. I tried switching the Worklight Console DB from Derby to MySQL, but to no avail.
I'm not sure I've tried all possible combinations, but right now version 1 shows version 2 when I click on common resources and version 1 when I click on an actual environment.
This clearly seems to be a bug or a very obscure undocumented peculiarity, doesn't it? Any help with this?
Worklight Studio version is 6.2.0.00-20140918-1910.

I was finally able to reproduce the error in the question. It does appear to be an obscure bug indeed...
I see no workaround other than a restart of the server (a reboot of Eclipse is not required), via the Servers view > green "play" button.
My suggestion is to open a support ticket (PMR) to have this further investigated and possibly have a fix delivered.

Related

How can I stop my IAR ide from hanging when changing build configurations

I have come across this particular problem several times across several versions of the IAR embedded workbench (EW430 5.40.7 [EW 6.0], EW430 5.51.2 [EW 6.4], EW430 6.20.1 [EW 7.0]), but each time only after a long period of having no problems. The problem doesn't seem to have affected the other firmware developers in the office, so no help can be offered there. I'm currently on Windows 10, but the problems first occurred when I was on Windows 8.1 (same PC.)
The problem is that, for no obvious trigger, the IAR ide will start to hang until terminated (or it will just crash on one of the EW versions) on any attempt to change the active build configuration in MSP430 projects using the emulator.
From my testing, it appears to be directly related to something the IDE is doing with the emulator, as when the build configuration is changed, I can see the emulator menu in the menu bar disappear, then the hang happens. Under normal circumstances, the menu will disappear, but then reappear once the other debug configuration is completely loaded.
I have tried the default project "flashing the LED" to see if it was only my project - but if I select the msp430x4xx (C) - Debug, right click it and select "Set as Active" from the context menu, to make this the active project, the IDE also hung. I then reopened the EW IDE, and opened the LED flashing project again. The original 1xx asm project was the active project.
I then changed the settings of the 4xx (C) Debug project (without making it the active project) from the emulator to the simulator, and clicked OK. The program did NOT crash.
I then set the 4xx (C) Debug project as the active project and it did NOT crash. The simulator even runs without problems.
The version of the FET firmware didn't change from when the IDE worked correctly to when it didn't, and the FET is not even used at this point. It can be completely disconnected and the same results will occur.
I have tried the following, without success:
erasing the files in my project folder's settings subfolder
erasing the *.dep files in the project folder.
deleting the IarIdePm.ini file from AppData\Roaming\IAR Embedded Workbench
making sure none of the project files are read-only
reinstalling the program to the same location
removing and reinstalling the program to the same location.
What does solve the problem (until it reoccurs) is to reinstall the program, but to a different directory (for e.g., the default directory will be in program files (x86)\IAR Systems\Embedded Workbench x.x. Installing again into program files (x86)\IAR Systems\EWx (just so it is different) allowed that installation to work, but the old installation continued to fail.
Best advice so far (from our support person) has been to do the above, install to another directory and live with it, as it doesn't happen often.
Since it has happened to me on 3 occasions with 3 different versions of the program, I would like to know how to fix or prevent it! If anyone could offer anything to try (or even better, a straight solution :)) that would be greatly appreciated!
Cheers!
Since newer versions and updates on W10, it seems that old compatibilities are being removed from this OS. I have no direct solution for this problem since Microsoft does not promise support for old software and hardware. Even I tried to find a solution for that problem, and I found on the IAR website a list of IDE's and their compatible versions. (remember, old versions are not compatible)
( https://www.iar.com/knowledge/support/technical-notes/ide/windows-10-and-iar-embedded-workbench/ )
You will need to update your IDE and program version to a newer version if you plan to continue to use this IDE natively on Windows 10 or you may use Virtual machines with an old operational system (like Windows 7) to compile your program on old IDE.
P.S.1 I manually uninstalled KB4592449 recently updated and the program return to work natively. Probably it will continue working until this update (or other similar) being installed again on the computer, but probably there is any vulnerability that the computer will be exposed to, and in this case, I'm paying the price.
P.S.2 KB4580325 promotes the same behavior in IAR 5.11 on windows 10. Both KB's implement securities about the flash player - that I Don't use - then, I can securely uninstall it.
P.S.3 Since I updated my windows up to Windows 10 version 21H1 (compilation 19043.1165) AND I configured Windows defender to not be monitoring IAR IDE (IarIdePM.exe) disabling all protections available, everything works fine. But Remember: my program is original, not cracked or altered by anything, then I am secure to do what I did.
It is a 'natural' that software problem. Not found way of fixing it. The solution temporary is modify manually the file .eww for change of project active. The ultimate solution is to use another development environment.

Cannot select latest uploaded version to add to testflight

I cannot select the latest version I have uploaded to seed to beta in external testing. First of all whenever I upload a build two version appearing, that have upload time difference of 5 to 15 minutes between them. One of them gets changed from processing to normal available state, but other does not. But now selecting the available build also selects the processing one and my selection is blocked and I cannot select the OK button because probably my selection is blocked by the processing one. I think it is UI frontend issue at itunesconnect side but it could be something I am doing wrong. Please help me if anyone has been able to tackle this issue if they faced. Please see checkout the attached image.
Update:
I Included <key>ITSAppUsesNonExemptEncryption</key><false/> in my subsequent builds that I uploaded according to the new Export compliance message on the iTunes Connect home page. I am still facing the issue. I have contacted Apple Dev support, will keep you updated if I find a solution.
The issue has been mysteriously solved by uploading the application from Application Loader with Aspera turned off instead of using Xcode's organizer window as suggested by Apple Developer support. Make sure you add: <key>ITSAppUsesNonExemptEncryption</key><false/> in your info.plist file before archiving the build. Although mysteriously my previously uploaded builds have also become available for external testing.
Body of email that helped solve the issue:
After further research, it looks like their may be an issue from your
end with your network while trying to upload to this app record in
iTunes Connect.
First, for the best upload experience make sure that all ports and IP
addresses are accessible. Additionally, it’s important to make sure
the internet connection is very good, and that there are no firewalls
blocking the uploads. More information can be found here:
http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Second, it may be beneficial to try using the latest version of
Application Loader. Please note that you can export your project from
Xcode to upload through Application Loader. As a temporary workaround,
once you have Application Loader open, you can go to the File menus
and select the following:
Application Loader > Preferences
Then, select Advanced, and as a temporary workaround you can try
deselecting Aspera and upload the build again. You can follow the
steps below to use the latest version of Application Loader.
Download the latest version of Xcode from the Mac App Store:
-http://help.apple.com/itc/apploader/#/itc8e7ec5a60
Open the latest version of Xcode
Go to the File menu and select Xcode > Open Developer Tool > Application Loader
Lastly, try uploading again to see if the issue persists.
Hello my dear friend there,
I am also having your issue yesterday, I have this similar screen with yours:
The build is duplicated which one of them are processing forever until today.
My personal problem solving was:
Increase my build number in Xcode so that I can reupload my build
Rearchive the build then export for iOS App Store Deployment in Xcode Organizer
Reupload the build using Application Loader
Then try to reconfigure the build in iTunes Connect. For a while it is processing like usual, but it will not take forever, after one hour, the build will be available for testing.
Hope my personal troubleshooting can be applied to your issue too.

Worklight Console does not show new changes to project -- seems to use original code

I am running Eclipse Luna 4.4.1 with Worklight Studio 6.2...
I have made changes to my Worklight project. For some reason, I cannot get these changes to be seen/previewed when opening in the Worklight Console...
I have made simple changes such as adding print (console.log) statements to see if these changes are making it out to the console... I have even removed design elements to see if I can get this preview to error out...
Here is what I do:
Highlight the app folder (the folder under the "apps" folder) and right-click
Select Run As > 2 Build All Environments
Once that is complete, I highlight the project folder (the topmost folder in the project) and right-click, selecting Open Worklight Console, which opens the console in Firefox
Click the Preview as Common Resources link in the Console
The "old" code/project runs -- no changes appear
I have tried Cleaning the project, closing and re-opening Eclipse, rebooting my machine, etc. but nothing seems to shake this up. Worklight seems to use the "old" code no matter what I do in Eclipse...
Is there a setting on Worklight I may be missing?
Starting Worklight 6.2 you do not need to either build or deploy your application in order to see changes made to web resources.
The following should suffice:
Create a Project and application
Run As > Run on Worklight Development Environment
Open console, view the application (keep this tab open)
In Eclipse, change some resource (image, CSS, HTML, JavaScript)
Return to the previously opened tab and refresh it
The change should be visible to you.
Something to try:
Close Eclipse
Open your TMPDIR and delete the wlBuildResources folder
Open Eclipse, try again
You can also try adding a mobile environment to your application; there are some reports this some times, show how, helps 'refreshing' the web resources used while previewing applications
You can also make sure you are using the very latest 6.2.0.01 iFix; there were preview-related fixes in the past. You can get it from IBM Fix Central website (assuming you are an IBM customer/business partner; for evaluation purposes you should download the latest available version, from the Eclipse Marketplace - v6.3)
Note that Run As > Build all environment does not actually deploy your modified web resources to the server, it only generates the .wlapp for later consumption elsewhere, so I suggest to follow my steps at the very top of this answer, by using Run As > Run on Worklight Development Server, and later on simply save (ctrl/cmd-s) and then go to the console to verify the changes are there.

Worklight Direct Update doesn't work when wlapp built outside of studio

We have a worklight i/OS hybrid application built and deployed to the worklight console using RTC jazz team build and the ant-builder ant tasks (6.1.0.1). The ipa packaging is done on a separate machine, though using the same level of Worklight Studio (6.1.0.1).
I've compared the wlapp files that are generated, and they are basically identical except for some whitespace characters (tabs, line feeds), probably due to the different environments (Windows vs AIX), and the following:
index.html
"WORKLIGHT_NATIVE_VERSION": "3921556017",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140311-2356",
"WORKLIGHT_NATIVE_VERSION": "1475155033",
"WORKLIGHT_PLATFORM_VERSION": "6.1.0.01.20140311-2356",
deployment.data
native=3921556017
native=1475155033
However, the direct update never happens when the wlapp is updated on the server.
on the WL.Client.connect call, the following json comes back as part of the response
gadgetProps":{"directUpdate":{},"ENVIRONMENT":"iphone"}
What are we missing here? What can be preventing the direct update from triggering?
Any help would be greatly appreciated.
The 6.1.0.1 iFix version 6.1.0.01.20140518-1532 from IBM Fix Central seems to have resolved this problem for us.
And what if you are not using ant, but rather built the project in Worklight Studio straight to Xcode from then install the .ipa and test Direct Update. Does it work?
From your question it is not clear whether or not you've confirmed one or the other.
Regardless, since the v6.1.0.1 build you are using, several Direct Update-related fixes were introduce; one with close proximity to the error you mention (directUpdate:{ }), so I suggest to to open a PMR in order to receive the latest available iFix (not yet available at IBM Fix Central).

Worklight Console can not be opened because the Worklight Server is not running

I'm just getting started with some of the samples at the Getting Started site, working with the Developers Edition. Whenever I Open Worklight Console, the eclipse environment abends. I'm sure I missed a set up item, but all seemed to install well. I appreciate any help / direction. Thanks.
I tried to post an image of the error, but stackoverflow indicates I need 10 reputations to post an image. Go figure.
The first line is Java was started but returned exit code=8096
There are some hits on this indicating that the license may not be compatible with the Rational license installed. Not sure what to do with that.
There's another post indicating Environment Variable corruption, but I don't have the corrupt Temp environment variables indicated.
StackOverflow has a FAQ explaining what one can and cannot do and when. It makes sense. Read it.
Did you at least create a new Worklight project and application?
If you do that and run the application by right-clicking on the application in the project tree and choose Run As > Run on Worklight Development Server this will: start the server + build the app + deploy the app.
Then you can right-click on the project icon and choose Open Worklight Console and you will see the console...
So unless you have some errors preventing the server from loading, the above should work.
Host the image elsewhere, like imgur.com
Explain what you have installed in your Eclipse. Which Eclipse is it? Did you install only Worklight Studio, or another plug-in in addition? Which?
What are those "hits" you mention? Elaborate.
Searching for the exit code in Google, I see the following IBM tech notes:
http://www-01.ibm.com/support/docview.wss?uid=swg21303648
http://www-01.ibm.com/support/docview.wss?uid=swg21567836
http://www-01.ibm.com/support/docview.wss?uid=swg21627887
Perhaps one of them is relevant for you as well.
If you have followed Idan's advice to Run on Worklight Development Server and it is still not started, try this:
Switch to the Servers view (on the bottom pane of Eclipse by default).
Check your Worklight Development Server status
Right-click and select Clean...
Select OK when prompted to discard all publish start.
Redeploy your app using Run As > Run on Worklight Development Server
I am not sure if this would clean up your environment variable error message as I have not seen that one, but it has helped with several other errors that have caused my server to not start or run properly. (The most common one I get is an Out of Memory in the server.)