I'm trying to persist some data for the user in this WL app using:
WL.Client.setUserPref('foo', 'bar');
and getting it back by using
WL.Client.getUserPref('key');
My target environment is Windows 8.1 with the latest Worklight Studio (6.2.0.01-20141015).
With a user logged in, I have tested this in:
Preview Mode
Logged a user in
Set a user pref
Logged out
Closed window/tab
Opened, logged in again
Get back user pref (null)
Using the developer console in Chrome. I can see that there was a call out to save the preference when invoked, and confirmed that it had been set by calling getUserPref.
I've performed much the same test with Visual Studio 2013 by previewing the app and running the commands from the JS Console with the same results.
Is there something I'm missing here?
I found that calling the connect after authenticating and before getting the preferences, i.e.:
WL.Cient.connect({onSuccess:successFunction, onFailure:failureFunction});
var myPref = WL.Client.getUserPref("myPref");
This should do the trick.
Related
When I first launched Bixby Developer Studio, it greeted me with a startup screen with a Login button. I clicked on it and it opened a login page in my browser. I logged in that page using my Samsung developer account. The login was successful and a pop-up appeared asking me if I will allow the page to launch Developer Studio (which was already open at that point). I allowed it, but nothing happened; Developer Studio was still showing the startup screen.
I restarted the application but it again showed me that startup screen with the login button. If I click on the login button, it will just take me again to the login page in the browser. And then nothing would happen if I login again.
I'd suggest verifying if your browser is configured to accept cookies. If that information is verified and the problem still exists, there might be additional information in the ide.log file that can provide more insight
To get that information, follow these steps:
Note the time when you begin the next steps.
Go through the login process until you hit the point of failure.
From the IDE menu, click on Help -> Create Diagnostics Report. This
will popup a dialog that will point you to the location of the
diagnostics report, by default this location is
C:\Users\'User'\bixby-workspace\
Unzip the diagnostics report and look at the ide.log file for any
errors at the time of login.
Feel free to post the errors here or if you prefer, you can open a ticket with Bixby Support too.
There are a couple of points you could work on here -
In this case, I suggest you to keep the browser open in the background while clicking on the login button. I was facing the same issue and somehow it worked for me like this. This has been an issue on a Windows machine. On a Mac this problem is not faced till now.
You could restart the Bixby studio itself for logging in again.
Also, I suggest removing the browser cookies as told by shahnawaz above.
Do let us know if this still persists !
Thank you all for your suggestions. For some reason, it just started working right after I received dozens of Windows updates (it's been a few days since I logged in to my Windows account as I have been using Linux; I rarely use my Windows account now and I wish Bixby Studio was available in Linux too). So, I actually haven't tried any of your suggestions yet. Thanks again, anyways!
I have a VS2013 website developed in VB with Windows 10. I have tested it for years but now after migrating to Windows 10 when I go into debug mode, Edge pops up and asks for a user id and password. I have no user id or password that it accepts and I don't want that to happen anyway since it doesn't happen in production.
How can I get rid of the login requirement?
It sounds like your site has windows auth switched on. Ordinarily IE would negotiate for you and sign you in seamlessly. Edge doesn't seem to handle NTLM in the same way. To get your previous experience you could just switch the debug browser to IE11. This also has the benefit of enabling JS debugging which also currently breaks with Edge as VS2013. I'm sure these issues with Edge and VS will be fixed shortly.
We have developed an office add-in. Its working fine with every other system except one. In that particular system when we try to load the app, it fails with a generic error (This app could not be started. Close this dialog to ignore the problem or click "Restart" to try again.). Event viewer has the following details
The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
and APPID
{9BA05972-F6A8-11CF-A442-00A0C90A8F39}
to the user STC\inmchandr SID (S-1-5-21-2779513660-4158667818-3257731910-104078) from address LocalHost (Using LRPC) running in the application container Unavailable SID (Unavailable). This security permission can be modified using the Component Services administrative tool.
The specified CLSID points to ShellWindows component, which is running with "Interactive User" account. I am unable to change the other security permissions like launching permissions for that component in DCom config. I tried to change the permission for the corresponding registry entry (as suggested in this link) But, nothing worked out.
The winword.exe is running as the same user who logged in. This system and the other systems (where it is working) are in the same network and I tried running gpupdate as well.
(In that problematic system) The same app is loading when we tried to run Word as administrator. The URL used for that taskpane app is launching without any issues from browsers
OS: Windows 8.1
Processor: 64 bit
Office: 2013
Could anyone help us out to resolve the issue?
I've been working with a business partner to get an insurance app working on a Windows 8 tablet and have come across some interesting behavior that I can't explain.
I have managed to recreate the problem using a very simple use case and it appears to fail in the browser as well as when deployed as an app.
To re-create
Create a simple WL Hello World app with no JavaScript libraries
Deploy it to the development server
Open up an IE 10 browser and launch the WL Console.
Run this app using "Preview as Common Resources" and it should work fine (showing the default Hello Worklight)
click F12 to launch the IE debugger and then refresh the browser, click on the show console button to verify there were no errors
Add a WL.Client.connect(...) call into the wlCommonInit method
...
WL.Client.connect({
onSuccess: function(data) {
console.log("connection Successful");
},
onFailure: function(err) {
console.log("Connection FAILED: " + JSON.stringify(err) );
}
});
Save and re-run the app and it fails with an InvalidStateError (verify with F12 debugger)
Open up either a Chrome or Firefox browser to the WL Console page and click the "Preview as Common Resources" and open the developer tools for either and the console shows the connect call succeeding.
Is this a known problem or is there something that I've missed?
The ultimate goal is to deliver a Windows 8.1 tablet app however every time we tried to run the app it failed with this error. After some debugging I thought maybe it has something to do with the OS and tried to replicate it in just the browser with minimum code.
Through testing I've found that the basic Hello Worklight app with a WL.Client.connect() fails on IE but works on other browsers.
So I'm thinking if I get it working in IE browser, then that fix will be good for the tablet app as well.
Any pointers or guidance would be appreciated.
Note I am using WL v6.2 (6.2.0.00-20140915-1601)
Tested on Windows 7 - IE 10.0.9200.17089
Tested on Windows 8.1 - IE 11.0.9600.16663
The error I get is
HTML1300: Navigation occurred.
File: index.html
wlclient init started
before: initOptions.onSuccess
Request [/Connect/apps/services/api/Connect/common/init]
console.trace()
at __log (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:4882:31)
at Anonymous function (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:5240:7)
at createRequestHeaders (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3200:17)
at sendRequest (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3266:18)
at initialize (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:3172:17)
at klass (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:524:4)
at sendInitRequest (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:7870:5)
at connect (http://192.168.80.167:10080/Connect/apps/services/preview/Connect/common/0/default/worklight/worklight.js:7879:3)
SCRIPT5022: InvalidStateError
File: worklight.js, Line: 1055, Column: 3
Uncaught Exception: InvalidStateError at (compiled_code):1055
For future readers, this problem was resolved by moving to a newer fixpack release v6.2.0.00-20141002
When looking at the contents of Version 6.1.0 Fix Pack 1, it doesn't appear to list PI06519 as one of it's constituents, yet when applying the fix pack in a bid to address the slow start up issue, it appears to fix the problem.
Is this supposed to be the definitive list of the contents of the fix pack and is simply an oversight, or should I be looking somewhere else for the full contents of it?
There is some problem with listing this APAR in the list of fixes which has yet to be resolved.
Here is a copy of the fixed APARs in Worklight 6.1.0.1:
Changes since: 6.1.0.0
Fixes (APARs):
PI12596 A HYBRID APPLICATION MAY FORCE CLOSE OR FAIL TO CAPTURE DATA WHEN RETURNING FROM THE CAMERA VIEW.
PI12471 RICH PAGE EDITOR'S PERFORMANCE SUFFERS WHILE TYPING.
PI12337 WHITE LINE AT THE BOTTOM IN IOS 7.1
PI11962 SECURITY ISSUE WITH WORKLIGHT CONSOLE
PI11561 STUCK IN A DIALOG ENDLESS LOOP IN ECLIPSE WORKLIGHT PREFERENCES
PI11502 EVENT LISTENERS ATTACHED WHEN CONNECT() IS INVOKED BUT NEVER UNBOUND.
PI11350 IN THE WL STUDIO WITH BUILT-IN SERVER, THE FEATURE OPEN WORKLIGHT CONSOLE DOES NOT START THE SERVER AUTOMATICALLY.
PI11168 WORKIGHT PAGE DOES NOT RESPOND TO CHANGING RICH PAGE EDITOR DEVICE ORIENTATION TO PORTRAIT
PI10959 JSONSTORE FAILS TO REMOVE ALL DOCS IN THE DOC ARRAY WHEN A DOC ARRAY IS PASSED
PI10818 FAILURE WHEN DEPLOYING WORKLIGHT APPLICATION ON WORKLIGHT PUREAPPLICATION PATTERN WHEN SCALING POLICY IS IN EFFECT
PI10775 SERVER CONFIGURATION TOOL DEPLOYMENT CAN NOT PROCEED WHEN USING DB2 DATABASE IF DB2 INSTANCE OWNER ID DOES NOT HAVE SSH ACCESS
PI10398 PROBLEM CUSTOMIZING TIMEOUTS WITH WL.CLIENT.CONNECT API.
PI10149 MOBILE BROWSER SIMULATOR IS BLOCKED IN BROWSER WHEN USING ORACLE JAVA 7 UPDATE 51 WITH "HIGH" SECURITY SETTING
PI10127 NATIVEPAGE FEATURE DOES NOT WORK PROPERLY ON WINDOWS PHONE 8
PI09913 WORKLIGHT UNDER HIGH VOLUMES SHOWS MEMORY INCREASE WHEN REPORTING ENABLED
PI09863 IF REMOVING THE OPTIONAL FIELD "BADGE", AN ERROR IS RECEIVED: "MANDATORY FIELD 'BADGE' NOT FOUND."
PI09770 IOS PUSH NOTIFICATION ERROR AFTER UPGRADING OR APPLYING FIX
PI09711 [WINDOWS 8] - CANNOT OPEN A WL.SIMPLEDIALOG AFTER IT WAS OPENED AND CLOSED
PI09666 ADDING ENVIRONMENT WAITS ON "BUILD PREVIEW PAGES"
PI09569 WHEN BACKEND IS STALE/SLOW UNDER LOAD THEN GOES BACK TO NORMAL SERVER CANNOT RECOVER UNTIL RESTART
PI09530 ADAPTER INVOCATION IS FAILING IN IOS 5 IN WORKLIGHT 6.1 ENVIRONMENT.
PI09432 CALLING ACQUIREPOSITION AFTER STARTACQUISITION HAS BEEN CALLED WITH A GEO POLICY, MAY NOT ACTIVATE TRIGGERS FOR NEW POSITIONS.
PI09373 RARELY, ON NATIVE ANDROID, MULTIPLE SUCCESS CALLBACK EXECUTIONS CAN TAKE PLACE FOR WLDEVICE.ACQUIREGEOPOSITION.
PI09372 IN NATIVE ANDROID, USE OF THE WLGEOACQUISITIONPOLICY MUST BE DONE IN A LOOPER THREAD.
PI09370 WHEN USING GEO DWELL TRIGGERS, WLGEOFAILURECALLBACK INSTANCES MAY BE EXECUTED AFTER WLDEVICE.STOPACQUISITION() IS CALLED.
PI09356 ADAPT APPLICATION CENTER PUBLISH SHORTCUT TO HANDLE XAP FILES
PI09349 WHEN IMPORTING THE IBMAPPCENTER HYBRID PROJECT, AN INCORRECT WARNING SUGGESTS TO INCREASE THE VERSION
PI09326 APPCENTER OTA INSTALLER: TITLE TRUNCATION ON DETAILS VIEW
PI09325 APPCENTER CLIENT TABLET PORTRAIT, BUTTON TRUNCATION ON DETAILS VIEW
PI09324 APPCENTER CLIENT IOS: DATES APPEAR A PHONE NUMBERS
PI09323 APPCENTER OTA CAN START IN TABLET MODE ON A PHONE IN LANDSCAPE ORIENTATION.
PI09321 WORKLIGHT APPCENTER MOBILE CLIENT: AFTER SENDING A REVIEW, THE APP IS MISSING FROM LISTS IF ITS POSITION CHANGED
PI09315 APPLICATION CENTER MOBILE CLIENT ON TABLET: SOME APPLICATIONS MAY NOT BE DISPLAYED IN CATALOG.
PI09233 WORKLIGHT SERVER THROWS EXCEPTION WHEN RE-AUTHENTICATING WITH THE ANTIXSRF REALM
PI09224 WHEN MIGRATING A PROJECT FROM WORKLIGHT 6.0 TO 6.1, AN ERROR OCCURS STATING THAT THE UPGRADE PATH IS NOT SUPPORTED
PI09029 IOS APP LINK FAILS WHEN SETTING IOS DEPLOYMENT TARGET TO 7.0
PI08960 WL RUNTIME LOGS THE FULL CLIENT REQUEST WHEN AN ERROR HAPPENS
PI08819 INCORRECT DATA MAY RETURNED WHEN SUBSCRIBING/UNSUBSCRIBING FOR SMS EVENTS
PI08807 DESIGN PANE FOR JSF PAGES FAILS TO UPDATE
PI08806 INACCURATE JSP VALIDATION
PI08789 FIX WLJQ.JS TO SUPPORT WINDOWS 8 AND WINDOWS PHONE 8
PI08777 "ITMS-SERVICES" PROTOCOL DOES NOT WORK
PI08689 INCORRECT DATA MAY BE RETURNED FROM THE SERVER TO THE APPLICATION
PI08685 IMPROVE PERFORMANCE WHEN USING THE IBM SDK FOR JAVA
PI08632 APP CLIENT CLOSES WHEN CONNECTING TO SERVER WITH ANALYTICS ENABLED.
PI08609 CLUSTER SYNC TASK REPEATEDLY TRIES TO DEPLOY OLD APP FROM THE DB TO A NEW PROJECT
PI08601 WL.SERVER.INVOKEHTTP WITH DELETE METHOD DOESN'T ACCEPT QUERY PARAM
PI08583 BLACK LINE APPEARS AT TOP OF SPLASH SCREEN ON IPAD RUNNING IOS7
PI08580 ECLIPSE CRASHES WHEN OPENING WORKLIGHT APPLICATION FRAMEWORK VIEW.HTML ON WINDOWS
PI08574 FAILURE TO MIGRATE WORKLIGHT PRE-5.0.5.0 APPLICATIONS TO WORKLIGHT 6.1.0.0
PI08511 OLD LTPA TOKEN IS BEING USED WHEN USER LOGIN AGAIN WITHIN A MINUTE OF LOGOUT
PI08189 ERROR WHEN CONNECTING TO SERVER AFTER SETTING APP TO ACTIVE IN THE CONSOLE.
PI08127 SLOW SERVER PERFORMANCE AND REPEATED DATABASE QUERIES WHEN REMOTE DISABLE IS ENABLED
PI07660 MISSING API GETDEFAULTMOBILECONFIGURATION4ANDROID_IOS() IN LOGINCONFIGURATIONSERVICE INTERFACE
PI07549 SHELL COMPONENT CHANGES ARE NOT SHOWN PROPERLY IN BROWSER DURING PREVIEW
PI07263 SCREEN TURNS BLACK ON IPAD DURING DIRECT UPDATE
PI07256 INAPPBROWSER NOT ABLE TO OPEN LOCAL URL LINKS ON ANDROID 4.4
PI06943 DIRECT UPDATE NOTIFICATION WHEN NONE AVAILABLE, THEN FAILS UPON UPDATE ATTEMPT
PI06828 ANT DEPLOMENT TASKS DON'T WORK WHEN CONSOLE IS PROTECTED WITH LTPA AUTHENTICATION
PI06652 DIRECT UPDATE ALLOWS USERS TO KEEP USING OUTDATED VERSIONS.
PI06586 INCORRECT PUSH NOTIFICATION RECEIVED WHEN MULTIPLE WL APPS ON AN ANDROID DEVICE
PI06568 DIFFERENT VERSIONS OF A WORKLIGHT APPLICATION ENVIRONMENT GET WR ONG SECURITY TEST IF SECURITY TEST IS CHANGED BETWEEN VERSIONS.
PI05454 WORKLIGHT APPLICATION CENTER ON LIBERTY PROFILE 8.5.5 PRODUCES "LAST-MODIFIED" DATES IN BAD FORMAT.
PI05447 NULLPOINTEREXCEPTION OCCURS WHEN CALLING WL.SERVER.LOGACTIVITY.
Status: Fix Pack
Additional Information: Please see http://www-01.ibm.com/support/docview.wss?uid=swg27028172 for information on installing the fix.