Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Universal Windows App - JS Errors

Hello,


I'm trying to create an universal windows app for Windows 10 device. As per the instructions given out in the guide (https://template.neptune-software.com/neptune/sdk/explored.html#doc00163EDC99661EE4B4A951220E987B8F), i managed to build an App using VS 2015 successfully. When i executed the App in the local machine, it opened up a new window requesting the User Name and Password.


Once i entered the credentials, the screen showed "No Connection" error and i saw a bunch of JS errors in the VS console (see screen print below).


What could have gone wrong? Please help!


Best Regards,

Bala


image



This is the error i'm getting when i try to login in the windows app... 


Also, I downloaded the Neptune Client in Windows 10 Machine with the idea to drop building a universal windows app. But, the same error shows up (No Connection) in there too:



image


Attaching the screen print of the Universal Windows App:


image



Hi Bala


How is your settings in NAM for the Launchpad you have published to Neptune Client ? 


The Server URL is important,, and should be in the format: https://template.neptune-software.com



Regards

Ole-André

Thanks Andre!


I followed the same format for the Server URL... With the same Launchpad Settings in NAM, it works in iOS device (iPad), but not in Windows 10.


By the way, both the options below for Windows 10 do not work and gives me "No Connection" error.


1. Create Universal Windows App using VS 2015

2. Using Neptune Client in Windows 10 device


Appreciate your help!



Hello,


After doing some research and debug of the Universal Windows App build using Visual Studio 2015, i figured out the way to make the app work. This is how the App works in windows 10 device:


After build and deploy, i opened the App and it displayed the login screen. If i directly enter the User name and Password and hit Log On, it throws "No Connection" error. But, when i clicked "Log out" as shown below and then try to Log On by entering the credentials, it works!!!


So, every time i access the App, i had to click log out and then log in.  I'm still trying to find out why it is behaving this way in windows 10 device...Not sure if this is something to do with NAM settings.


I'd greatly appreciate your input!


Best Regards,

Bala





image


Hi Bala


The right documentation is this one: Windows Universal App


In the index file, please uncomment this part to avoid double triggering of the startup function.


 

    // Browser Startup
    window.onload = function() {
        if (!window.device) {
            onDeviceReady();
        }
    }

 


Also add the plugin, it is attached to this reply.

<Capability Name="privateNetworkClientServer"/>


I hope this will help. We will also update our Neptune Windows 10 Client by the end of next week, to get all the new stuff from SP03.


Regards

Ole Andre 


zip
(469 Bytes)

Hello Ole Andre,


Thank you for your information. Good to know the Neptune Windows 10 Client is getting updated.


I followed the steps to build the app as per your instructions. But the problem still persists. I debugged the app and found that the ajax call (shown below) fails when attempting to logon. But, when i log out first and then Log on, the ajax call is successful. Not sure if this is something to do with AppCache startup issue. 


Any idea?


image




Hi Bala & Ole,

Has there been any progress with the windows 10 UWP build? 

I've followed the 'explored' instructions and have also built from the standard cordova project (adding in the extra script and capabilities).  Both ways I get a fully working build when run from my development machine.  If I deploy the app to another machine or run in an emulator (on the development machine) I get the same issue that Bala has described.  The first ajax call to logon is rejected, and likely not even sent.  After logout the ajax call goes through.

image


I've built the app on my laptop and on a windows 10 virtual machine, both running the latest creators edition of windows.  Both times the app has run fine on the local machine.  Unfortunately I can't test in the emulator on the virtual machine as the emulator requires access to virtualization.

Keen to see if we can get some shared experiences together on this one as the Windows 10 build, when it works, is looking great and is a nice alternative to browser deployment, especially for things like camera access and the SQL database for offline use.

cheers,
S.

 

Hi Bala and Steve


If you run Windows Client inside a corporate network, we have seen that you need to enable the privateNetworkClientServer  capability in Visual Studio, to make all network calls compliant with your network. Working from outside your network, this is not needed. 


If you have embedded Cordova into your Windows Client, you also need to change this in the header, to prevent a double start of AppCache.Startup();


image



Are you running on internal or external network ? 


Regards

Ole Andre 


Yes, done both those things.

S.

Hi Bala and Steve


Let's try another approach now and see if it helps. If not I suggest a web session with you Steve to share our experience with this topic.


 In the index.html file, can you change the method AppCache.setEnableLogonScreen to this one - added one more line to trigger the logoff request sent to SAP. 

    setEnableLogonScreen: function() {
        AppCacheLogonABAP.Logoff();
        AppCacheNav.to("AppCache_boxLogon", "show");
        AppCache_statusItem.setTitle();
        AppCache_boxLogon.addContent(AppCache_listStatus);
    },

  

Regards

Ole Andre 

Hello Andre,


Few weeks ago, I did the same changes to the index.html file and the App let me sign in at the first attempt v/s doing a Log out and log in. But i was unsure if that was the right approach, And now that you have suggested to do this, i feel good.


Can this change be automatically included in the index.html file when we build the NAM zip file? This will help to avoid the additional step in the VS project build.



Thanks and Appreciate your response!


Bala

Hi Bala


Sure, we will add this functionality into our next support package. Happy to hear that it helped you. 


Regards

Ole Andre 

Hi Ole Andre,


The Neptune Client (Windows App) also gives the same error (No Connection). Do you think this could be related? 


The Neptune Client ios version works absolutely fine.


I'm curious to know if anyone was successful in connecting Neptune Client Windows App?


Best Regards,

Bala


Login or Signup to post a comment