Cannot using SQLAdapter of Worklight in WP8.1 device - windows-phone-8

I'm using SQLAdapter in worklight.
I invoke procedure successfully in worklight console and WP8 emulator. But when I deloy app to my WP8.1 device
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://118.xx.xx.xx:3306/petrodb</url>
<user>petro</user>
<password>123#abc</password>
WL.Client.invokeProcedure(loginData,{
onSuccess : loginSuccess,
onFailure : loginFailure
});
worklight console and elulator -> go to loginSuccess function
my wp8.1 device -> goto loginFailure function
Anyone know how to fix it?
Thanks,
Edit:
error log :
Error:"[http: //169. 254.80.80:10080/petro/apps/services/api/Xangdau/windowsphone8/query] Host is not responsive."
169.254.80.80:10080 is server host of worklight?
Edit2:
- When I run this app on Emulator and Device, it call go 169.254.80.80:10080 of worklight. When I close eclipse, my app can't invoke procedure on Emulator,too. I think the reason is that my device cannot find where is 169.254.80.80.

Try to check whether you can able to connect to Worklight server from Device.
Open the worklight server console from your device default browser by entering http://serveripaddress:port/contextroot/console. If you cant able to access the URL then you have to connect to device to the server network
You will get error like Host is not responsive when your worklight server is not reachable from your device.

Related

React-Native - can't fetch from connected Android device to localhost endpoint

Im pretty new to React Native and im trying to make an application.
I have a JSON post request that works on Postman and on Expo when i run it on web browser (with http://127.0.0.1:8080). But when i try to run it on an attached Android device my app doesn't actually fetch the data.
As far as i can tell there is some problem with the connection between my phone and my computer. But i can't seem to find it.
Extra info:
- both devices are connected to my internet
- calls to the firebase API work just fine
- changing the "http://localhost:8080/route" with my computers IPv4 address or 10.0.2.2:8080 doesnt work
First try this
- For android: run the following command in terminal and try again
adb reverse tcp:8081 tcp:8081
If it doesn't work try this
Shake device(android)
Select dev settings and click "Debug server host & port for device"
Under debugging type local ip address and port number. (Ex: http://127.0.0.1:8080)

Authentication fails in Win 10 IoT Insiders preview build 10.0.17035.1000

There is an authentication problem in Win 10 Insiders preview build 10.0.17035.1000. When I try to open Device Portal from Win 10 IoT Dashboard, Device Portal cannot recognize the set up password.
When I run PowerShell as admin and execute the command "Enter-PSSession –ComputerName xx.xxx.xx.xx–Credential xx.xxx.xx.xx\Administrator", the authentication again fails with the message: "Enter-PSSession : Connecting to remote server xx.xxx.xx.xx failed with the following error message : Access is denied...."
I just verified that the Win 10 IoT Core build 10.0.16299.15 does not have this problem. But, unfortunately it does not have the updates in the Insiders Preview build 10.0.17035.1000 I need to correctly run my application.
Please advise me how to solve this problem.
This is a known issue and is under investigation. The same issue has been posted in MSDN. If there is further update, i will let you know.

Error after build AIR for desktop

Is there a way to debug a application after it´s build?
It works perfectly in the IDE (Flash), when I build and execute, it just stop during the execution.
If you check the Permit Debugging option in the Publish Settings then you should be able to connect to the Flash debugger while running the app.
When you start the app you should see a message that it's trying to connect to the debugger in Flash go to Debug > Begin Remote Debug Session and it should connect to the app.

IBM MobileFirst 7.0 with Sencha Touch in Windows Phone 8.1 showing errors

I am using weinre is WEb INspector REmote for debugging IBM Worklight 7.0-sencha touch 2.4 App.
Tested in Windows Phone Emulator 8.1 WVGA 4 inch 512MB.
When Application Starts it Shows :
Local storage capacity reached. Client logs will not be persisted
LocalStorage Quota exceeded, cannot store -x- wmapp0: /www/default/css/app.css locally
LocalStorage Quota exceeded, cannot store -x-wmapp0:/www/default/app.js locally
ondeviceready event dispatched
wlclient init started
CookieMgr read cookies: {}
When We Call Worklight Adapter WL.Client.invokeProcedure Calls it Shows Errors Like:
WL.Utils.getSkinLoaderChecksum(..) should be supported only on environments that support direct update Error: WL.Utils.getSkinLoaderChecksum(..) should be supported only on environments that support direct update.
[/apps/services/api/myApplication/windowsphone8/query] exception. TypeError: Unable to get property 'notificationTitle' of undefined or null reference
Uncaught Exception: Unable to get property 'notificationTitle' of undefined or null reference at (compiled_code):3667
The first error has nothing to do with MobileFirst; if you're using localstorage in your app it seems you have over-used it.
The second error should not happen and sounds like a product defect. You need to open an IBM support ticket (PMR) and provide the following details: full version number (with build number), a test case app that reproduces the error.

SignalR Hub connectivity from Windows Phone 8

What I'm trying should be basic; but must be missing something. Have couple of SignalR Hubs defined inside an MVC3 app running locally. Same solution has a Windows Phone 8 & a Windows Store app, both talking to the SignalR hubs for real-time communication. SignalR server uses latest bits & clients use latest .NET nuget.
On the client side, this is what I'm used to writing:
IHubProxy SignalRChatHub;
HubConnection chatConnection = new HubConnection("http://localhost:53478/");
SignalRChatHub = chatConnection.CreateHubProxy("ChatHub");
await chatConnection.Start();
if (chatConnection.State == Microsoft.AspNet.SignalR.Client.ConnectionState.Connected)
{
// Stuff here.
}
This works perfectly fine with a Windows 8 app client & we have easy connectivity with the SignalR hub running locally on IIS. However, the same code does not work for a Windows Phone client. The connection.start() bombs out with a 404 exception.
After a little research, it looks like the WP Emulator VM is treated as a different machine and uses the host machine's network virtually. So, IIS may be blocking calls from outside not allowing reach into the SignalR hub from Windows Phone 8 app. Accordingly, I tweak applicationhost.config for the SignalR server app to allow connectivity from outside localhost. So now, the SignalR hub is functional from both localhost and also off the local IP. Also, the routing has been changed to allow cross-domain SignalR connectivity in Global.asax.cs:
RouteTable.Routes.MapHubs(new HubConfiguration() { EnableCrossDomain = true });
The Windows Phone client code is changed to:
HubConnection chatConnection = new HubConnection("http://<LocalIP>:53478/");
But this continues to fail the connection.start() with a "Remote server returned an error: Not Found" exception. I have Fiddler sniffing network traffic from the phone emulator and shows absolutely nothing in response to the connection.start() call.
What am I missing? Any pointers would be helpful .. thanks!
Figured it out myself. Turns out the SignalR connectivity issue from the WPDev emulator was actually due to IIS/Windows security. Little more IIS config & opening local ports through Windows Firewall fixed the problem. Will blog about it; but these two posts helped:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580.aspx
https://blogs.iis.net/robert_mcmurray/archive/2013/08/20/connecting-the-windows-phone-8-emulator-to-web-api-applications-on-a-local-computer.aspx