Connection Error when starting selendroid server - android

I am trying to run android hybrid app tests with selendroid standalone server. When I start the server it successfully starts but I get the following error for the emulators. -
WARNING: Could not get avdName for device emulator-5672
io.selendroid.standalone.exceptions.AndroidDeviceException:
Cannot establish a connection to device.
at io.selendroid.standalone.android.TelnetClient.<init>(TelnetClient.java:40)
Can anyone help with this ?

I haven't used Selendroid before, but it seems to be that your emulator is not properly recognized or you given it a bad name. According to:
http://selendroid.io/setup.html
Please follows your steps:
You can check that the application(s) and the devices are recognized by opening a browser and navigating to: http://localhost:4444/wd/hub/status.
Check if emulator-5672 has specific name and use it on run.
Also read patiently above tutorial and check on its GitHub page if there isn't any simillar issue to this.
Hope it help

Related

Error: ConnectFailure (No route to host)

Context: I have a Xamarin.Android app that it connects to an WebAPI for different information.
Issue: When trying to access the server I get the following error:
System.Net.Http.HttpRequestException: An error occurred while sending the request ---> System.Net.WebException: Error: ConnectFailure (No route to host)
Issue context: we have 2 servers in the same network, configured the same (at least we hope so, is at client site) and if we use the same app (same build) we can connect to server A, but get the mentioned error when connecting to B. About the B server: I can access from device browser the http://address/help or /token page, I can also do the desired request from 'REST Api Client' from Google Play and get a successful response. The only problem it seems when connecting from our app to the server B. This issue is also not present on our environments (as I mentioned, the A and B are at client site).
Question: What would be the problem and where should we look further?
Thank you!
I found this answer on Xamarin forms, this didn't solve my problem, but maybe it could help in yours. https://forums.xamarin.com/discussion/70731/connection-error-no-route-to-host-only-happens-on-android
I had this problem because I didn't dispose my HttpClient object. It didn't happen with the first or second request, however from request 10 it would start giving me problems. Especially when they were happening asynchronously.
I don't know if this will solve your problem, as both these seem to be a special case instance. Maybe yours is a special case as well.
Check the mobile device can able to access the API server first. Is completely related network issue. Might be your mobile app and web server used different LAN connections or WIFI networks.
I had same issue, fixed it by enabling fast deployment:
In solution explorer, right click on 'yourproject.Android' -> 'Properties' -> 'Android Options' -> check 'Use Fast Deployment'
In my case, the problem occured only when running the application through the Visual Studio 'Run' button (I used a physical device to debug on).

500 Server Error using Python

Please bear with me as I am a complete noob and trying to create a database for my app using App Inventor.
According to Google App Launcher, I have successfully created my app. However, when I load mcdougaltextspeak.appspot.com into my browser, I get the following message:
Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error message and the query that caused it.
I am following the directions provided on http://appinventorapi.com/program-an-api-python/ and I'm sure my issue is because I am not correctly modifying the default app.ymal file
Here's what I have according to the directions:
application: textspeakedtech597
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /images
static_dir: images
- url: .*
script: main.py
I initially just changed myapp to mcdougaltextspeak, however I got a message that I needed to modify the code for python 2.7 according to this site:
https://developers.google.com/appengine/docs/python/python25/migrate27
This site also included modifications for other things, so I am wondering if my error stems from this. The directions do not make note of modifying any other code. Do I need to modify/add the code that appears on the migrate to python 2.7 page (see above link) and if so where does it go.
My app is stuck without a location to hold data.
Any advice on how to proceed is greatly appreciated.
Have you actually created an app on https://appengine.google.com?! You need to do that first, then your app.yaml should contain the appid that you have created i.e. application: mcdougaltextspeak & not what it is in the tutorial.
After you've edited the app as you want, you must then deploy the app to the Google App Engine Servers (refer to the GUI deploy). You would get detailed logs when deploying, which would tell if the deployment was successful or not.
After deploying, you can then goto https://mcdougaltextspeak.appspot.com & play around with your online app. If you still get errors, check https://appengine.google.com/dashboard?&app_id=mcdougaltextspeak for the logs & report them here.

unable to cast to personal whitelisted receiver app

I have successfully used the Android TicTacToe app to cast to the TicTacToe receiver app (AppID "TicTacToe"), using unmodified code from the TicTacToe example on github.
Next, I tried to use my personal receiver app. I got the email a couple of hours letting me know that my device was whitelisted and providing the AppID. I put the AppID in line 90 on GameActivity.java (not line 91, as stated in the instructions), and I also put it in line 35 of tictactoe.html (this step was missing from the instructions, but I assume it is needed). I also followed all steps in the Common Errors section of the instructions.
When I click the Start button in the Android app, the Tic-Tac-Toe board appears in the Android app, but the Chromecast device does not noticeably react.
Here is the LogCat:
07-28 00:13:47.776: W/StartSessionTask(10892): StartApplicationRequest failed with status: -4
07-28 00:13:47.826: E/ApplicationSession(10892): StartSessionTask failed with error: failed to start application: request failed
07-28 00:13:47.826: D/GameActivity(10892): start session failed: failed to start application: request failed
Try checking the box that says "Send this Chromecast's serial number when checking for updates".
Mine didn't work at first, after doing this and restarting mine seemed to pick up the whitelisted appID.
As mentioned by the author of question: Make sure to do from ChromeOS, Windows or Mac OSX client until they fix the issue from Android app.
Clients can be downloaded here: https://cast.google.com/chromecast/setup
This was fixed for me after I restarted the chromecast by removing power.
I tried Aaron's answer several times (was finally able to get the setting to stick using the Chromecast Mac app) but it still was giving this same error.
Then, I discovered I actually uploaded the receiver file to the wrong url. So double check which url was actually whitelisted!
Though even after fixing the url it still was broken. So I think I must have entered the wrong serial number when I made the whitelist request. I resent the whitelist request and the new app ids are working properly.
I solved same problem by using HTTP instead of HTTPS for my local hosted receiver, it seems Chromecast looks for valid certificate.

Android - Worklight Hybrid application fails to connect to server in the emulator

I created a worklight application. I tried running that application on android emulator and i am getting the following error.
[http://localhost:8080/apps/services/api/MyFirstApp/android/query] Host is not responsive.
Try to manually access the URL through the android emulator browser to verify connectivity
So i tried to enter the same url in the emulator browser, i got the following text:
/*-secure-
{"WL-Authentication-Failure": {"wl_remoteDisableRealm":{"reason":"Login Failed}}} */
Can someone help me with this?
I am using Android OS version: 4.2.2, API level: 17
I haven't changed any application settings myself..
I am trying to go to a basic login page with the url "https://jazz.net/jazz/auth/j_security_check"
This is my adapter XML:
<wl:adapter xmlns:wl="worklight.com/integration"; xmlns:http="worklight.com/integration/http"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; name="RQMAdapter">
<displayName>RQMAdapter</displayName>
<description>HTTP type Worklight Adapter for jazz server</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>jazz.net</domain>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="loginToRQM" />
</wl:adapter>
This is my scenario:
I have a requirement where I need to read information about the projects from jazz.net for a user. They are all available on the jazz server within an XML file. I need to process it to a mobile device to make it available on hand held device... So, now I am told that i will have to download some of the files from the server, so i need to have file IO on my app. I learned that we need to write this part using a Cordova plug-in in Worklight.
please let me know what else is needed for the solution... thank you
Make sure to place the actual IP address of your server machine:
Change the value for worklightServerRootURL in the file
application-descriptor.xml (located at: yourProject\apps\yourApp)
Build and deploy
Right-click on the generated Android project >> Run As >> Run application
If you are using using Worklight 5.0.5, make sure to upgrade to 5.0.6, where a fix is available when only API Level 17 is installed.
As for going to that URL, you need to explain where exactly you're trying to go to it from, and how... you need to be more descriptive. It sounds to me like you haven't gone through the Getting Started material. Please do.
I had the same problem.
I have solved it by using the real IP address of the server in the WL app instead of using localhost:
When the emulator is running your app, press the Menu button.
Select to change your server URL
Remove "localhost" and use the IP address.
Accept and try again.
This fixed my problem.

Using the Google map API in Android, using a proxy

I am using the google map API in a very basic app. But the problem is that on running the app, I only see the grid and the map controls...the map doesnt even load in the virtual device.
I have internet running in the device...the browser seemed to be loading just fine, so it isnt an internet problem.
Also, i did obtain an API key after registering for the map API and included that in my main.xml file...but still it doesnt show the map...just grids.The permissions for using the internet are also granted in the manifest file.
Im using the Google API level 8.Any idea how to fix this?
thx.
EDIT 1: Can anyone please help me out with this...really need help :(
EDIT 2: Well I found the following error in my LogCat:
Sending checkin request
Checkin failed: https://android.clients.google.com/checkin (request #0)
org.apache.http.conn.ConnectTimeOutException: Connect to /209.85.231.100:44 timed out
So basically my connection is timing out...im not really sure why...could anyone provide some fix for this plz?( but the AVD's browser is able to work perfectly, no time out problems..sites are able to load properly)
Also, the pre-installed maps application is showing the following error:
**Network Failure** Wrong remote strings version.GMM Server must be hosting:/strings_remote_533149424.dat
If you know any way i could fix this, it would be extremely helpful...
Thx.
Apparently if you are using a proxy, and have set that in your APN, then your AVD cannot load any application that is using the map, neither the pre-installed one, nor any created by you.
Reference: http://code.google.com/p/android/issues/detail?id=3764#makechanges
Unfortuantely there is no solution for this (yet).
Thx to all who helped :)
PS: If any1 found a solution using the proxy...or any other way to fix this...do post here..
You should not make your network(proxy) settings in your emulator or device. Just open your network settings in your PC. Then go the properties. you will find the list of items in your connections. go to IPV4 and set your default gateway and DNS server.
I faced the same error
**Network Failure** Wrong remote strings version.GMM Server must be hosting:/strings_remote_533149424.dat
Then i followed the above steps. I got the output.....Just check out and reply....
Make sure that these permissions are in your manifest file, outside the closing application tag:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Is your emulator connected to the internet? some times the emulator fails to connect to the internet when it boots, you should see a 3g sign on your notification bar.
Seen this issue posted many times, and have written up a really easy tutorial which has helped folk such as this previous question on SO
It generally tends to be one of 3 issues :
API key is incorrect
You are using the standard Android emulator and not the Google APIs.
You have extended Activity instead of MapActivity
Hope this helps.
This is most likely due to the API-key being wrong. Make sure you're using the correct API-key. (The key will be different for your debug certificate (keystore) and the certificate you use to sign the APK before you publish it to Android Market).
To generate an MD5 fingerprint of the debug certificate, first locate the debug keystore. By default, build tools create the debug keystore in the active AVD directory. The location of the AVD directories varies by platform:
Windows Vista: C:\Users\.android\debug.keystore
Windows XP: C:\Documents and Settings\.android\debug.keystore
OS X and Linux: ~/.android/debug.keystore
See http://code.google.com/android/add-ons/google-apis/mapkey.html for more details.

Categories

Resources