I have installed the Worklight Flight Ticket Sample App in Eclipse and Worklight 6.1.from http://ibm.co/1oJaz71
I have followed your instructions on this forum http://bit.ly/1kOPveN to create a senderID and API key on the Google Developer site: http://developer.android.com/google/gcm/gs.html
I have inserted the senderID and API key in the application-descriptor.xml file as follows: (I have replaced the actual values with "..." for the purpose of this post).
<android version="1.0">
<worklightSettings include="true"/>
<pushSender key="......." senderId="....."/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif,
mp4, mp3"/>
<publicSigningKey>Replace this text with the public key of the certificate with
which you sign the APK. For details see the Worklight Developer's Reference Guide.
</publicSigningKey>
</security>
</android>
Please note: I have not inserted my , since I am running in the emulator and haven't seen any requirement in the documentation to do so.
Now when I run the app in the emulator it comes up and and I get the following pop-up:
Failed registering for push notifications
The application will not be able to receive notifications.
Your device does not support GCM. Device does not have package com.google.android.gsf.
If you are using an android emulator make sure it has Google APIs (Google Inc).
Now, in the Android SDK manager I have already installed Google APIs.
Also, when I click on the OK button in the popup window, I soon get a second popup which says:
Confirm. Do you allow Flight Ticket to send notification to you Cancel/OK.
I click OK, and then again soon the first popup window shows up:
Failed registering for push notifications
The application will not be able to receive notifications.
Your device does not support GCM. Device does not have package com.google.android.gsf.
If you are using an android emulator make sure it has Google APIs (Google Inc).
How do you suggest that I debug this?
I am appending part of the error log:
Listening for transport dt_socket at address: 10777
Launching worklight (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130524-0951) on Java HotSpot(TM) Client VM, version 1.7.0_45-b18 (en_US)
[AUDIT ] CWWKE0001I: The server worklight has been launched.
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://ADMINIB-3IAG8DV:10080/module_60_4_FlightTicket/
[AUDIT ] CWWKZ0001I: Application module_60_4_FlightTicket started in 7.968 seconds.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://ADMINIB-3IAG8DV:10080/_MobileBrowserSimulator/
[AUDIT ] CWWKZ0001I: Application _MobileBrowserSimulator started in 0.076 seconds.
[AUDIT ] CWWKF0011I: The server worklight is ready to run a smarter planet.
[ERROR ] FWLSE0099E: An error occurred while invoking procedure [project module_60_4_FlightTicket]FTAdapter/HttpRequestFWLSE0100E: parameters: [project module_60_4_FlightTicket]{
"arr": [
{
"body": {
"content": "oneWay=true&fromDate=1392526800000&toAirport=HKG&fromAirport=LHR&returnDate=1392526800000",
"contentType": "application\/x-www-form-urlencoded; charset=UTF-8"
},
"headers": {
"HOST": "localhost"
},
"method": "POST",
"path": "\/flightticket\/service\/flights\/queryflights",
"returnedContentType": "json"
}
]
}
Http request failed: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
FWLSE0101E: Caused by: [project module_60_4_FlightTicket]org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refusedjava.lang.RuntimeException: Http request failed: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:241)
at com.worklight.adapters.http.HttpClientContext.doExecute(HttpClientContext.java:176)
at com.worklight.adapters.http.HttpClientContext.execute(HttpClientContext.java:160)
at com.worklight.adapters.http.HTTP.execRequest(HTTP.java:135)
at com.worklight.adapters.http.HTTP.invoke(HTTP.java:124)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:169)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:38)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.worklight.integration.model.InvocationContext$DirectExecutorService.execute(InvocationContext.java:284)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at com.worklight.integration.model.InvocationContext.submit(InvocationContext.java:138)
at com.worklight.integration.model.InvocationContextManager.submitInvocation(InvocationContextManager.java:58)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:484)
at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:56)
at com.worklight.integration.services.impl.DataAccessServiceImpl$4.execute(DataAccessServiceImpl.java:387)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:384)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:443)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:427)
at com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation.invokeDynamicProcedure(JavaScriptIntegrationLibraryImplementation.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen._integration_js_1._c_anonymous_10(/integration.js:95)
at org.mozilla.javascript.gen._integration_js_1.call(/integration.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5._c_FlightsREST_getTripFlights_6(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js:64)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5.call(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5.call(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js)
at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:240)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:214)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:194)
at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:104)
at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:169)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:38)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.worklight.server.util.ProjectLocal$1RunnableWrapper.run(ProjectLocal.java:267)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:239)
... 50 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
... 56 more
com.worklight.common.log.filters.ErrorFilter
[ERROR ] FWLSE0099E: An error occurred while invoking procedure [project module_60_4_FlightTicket]FTAdapter/HttpRequestFWLSE0100E: parameters: [project module_60_4_FlightTicket]{
"arr": [
{
"body": {
"content": "oneWay=true&fromDate=1392526800000&toAirport=HKG&fromAirport=LHR&returnDate=1392526800000",
"contentType": "application\/x-www-form-urlencoded; charset=UTF-8"
},
"headers": {
"HOST": "localhost"
},
"method": "POST",
"path": "\/flightticket\/service\/flights\/queryflights",
"returnedContentType": "json"
}
]
}
Http request failed: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
FWLSE0101E: Caused by: [project module_60_4_FlightTicket]org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refusedjava.lang.RuntimeException: Http request failed: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:241)
at com.worklight.adapters.http.HttpClientContext.doExecute(HttpClientContext.java:176)
at com.worklight.adapters.http.HttpClientContext.execute(HttpClientContext.java:160)
at com.worklight.adapters.http.HTTP.execRequest(HTTP.java:135)
at com.worklight.adapters.http.HTTP.invoke(HTTP.java:124)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:169)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:38)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.worklight.integration.model.InvocationContext$DirectExecutorService.execute(InvocationContext.java:284)
at java.util.concurrent.AbstractExecutorService.submit(Unknown Source)
at com.worklight.integration.model.InvocationContext.submit(InvocationContext.java:138)
at com.worklight.integration.model.InvocationContextManager.submitInvocation(InvocationContextManager.java:58)
at com.worklight.integration.services.impl.DataAccessServiceImpl.callProcedure(DataAccessServiceImpl.java:484)
at com.worklight.integration.services.impl.DataAccessServiceImpl.access$100(DataAccessServiceImpl.java:56)
at com.worklight.integration.services.impl.DataAccessServiceImpl$4.execute(DataAccessServiceImpl.java:387)
at com.worklight.core.auth.impl.AuthenticationServiceBean.accessResource(AuthenticationServiceBean.java:76)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeProcedureInternal(DataAccessServiceImpl.java:384)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:443)
at com.worklight.integration.services.impl.DataAccessServiceImpl.invokeDynamicProcedure(DataAccessServiceImpl.java:427)
at com.worklight.integration.js.JavaScriptIntegrationLibraryImplementation.invokeDynamicProcedure(JavaScriptIntegrationLibraryImplementation.java:125)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at org.mozilla.javascript.gen._integration_js_1._c_anonymous_10(/integration.js:95)
at org.mozilla.javascript.gen._integration_js_1.call(/integration.js)
at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5._c_FlightsREST_getTripFlights_6(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js:64)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5.call(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.gen.C_3A_5Ceclipsekepler_5Cmodule_60_4_FlightTicket_5Cadapters_5CFTAdapter_FTAdapter_impl_js_5.call(C%3A%5Ceclipsekepler%5Cmodule_60_4_FlightTicket%5Cadapters%5CFTAdapter/FTAdapter-impl.js)
at com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:240)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:214)
at com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:194)
at com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:104)
at com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
at com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
at com.worklight.integration.model.Procedure.invoke(Procedure.java:166)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:169)
at com.worklight.integration.model.InvocationContext.call(InvocationContext.java:38)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at com.worklight.server.util.ProjectLocal$1RunnableWrapper.run(ProjectLocal.java:267)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at com.worklight.adapters.http.HTTPConnectionManager.execute(HTTPConnectionManager.java:239)
... 50 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
... 56 more
If you are using android emulator you need choose the "Google APIs" enabled one which support push notification feature. When you setup your AVD, you need to choose that API Level.
You can refer to IBM Worklight 5.0.6.1 - Android notification does not reach either device or emulator for more details.
Related
I am getting exception while running appium program. Please ask if extra information needed.
TLDR:
original error: 'app' option is required for reinstall
log4j:WARN No appenders could be found for logger
(org.apache.http.client.protocol.RequestAddCookies). log4j:WARN Please
initialize the log4j system properly. log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.openqa.selenium.WebDriverException: An
unknown server-side error occurred while processing the command.
Original error: 'app' option is required for reinstall Build info:
version: '3.8.1', revision: '6e95a6684b', time:
'2017-12-01T19:05:14.666Z' System info: os.name: 'Windows 7', os.arch: 'amd64', os.version:
'6.1', java.version: '1.8.0_151' Driver info: driver.version:
AndroidDriver remote stacktrace: UnknownError: An unknown server-side
error occurred while processing the command. Original error: 'app'
option is required for reinstall
at getResponseForW3CError (C:\Users\preethi.g\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\preethi.g\AppData\Local\appium-desktop\app-1.10.0\resources\app\node_modules\appium-base-driver\lib\protocol\protocol.js:447:37)
at process._tickCallback (internal/process/next_tick.js:68:7) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
Source) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source)
at
org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at
org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at
org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at
java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at
java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown
Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at
java.util.stream.ReferencePipeline.findFirst(Unknown Source) at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142)
at
io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at
io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at
io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
at
io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:83)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:93)
at
io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:72)
at Mobileapp1.Apptesting.main(Apptesting.java:24)
It seems like you did not add "app" capability in your DesiredCapability and you are using noReset capability. You can add "app" capability and give .ipa or .apk file location.
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability(MobileCapabilityType.APP, "path to ipa/apk file" );
//others capabilities
I've been trying to integrate Facebook ads in my app for Android with the audience-network-sdk:5.0.0 and Facebook sdk crashed with this error:
10-16 13:12:07.128 25301-25725/? D/ProxyCache: Open connection to http://127.0.0.1:43557/ping
10-16 13:12:08.318 25301-25586/? E/ProxyCache: Error pinging server [attempt: 2, timeout: 1200].
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:176)
at com.facebook.ads.internal.r.b.f.b(Unknown Source)
at com.facebook.ads.internal.r.b.f.<init>(Unknown Source)
at com.facebook.ads.internal.r.b.f.<init>(Unknown Source)
at com.facebook.ads.internal.f.d$1.a(Unknown Source)
at com.facebook.ads.internal.f.d$1.call(Unknown Source)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Shutdown server... Error pinging server [attempts: 3, max timeout: 1200].
10-16 13:12:08.318 25301-25586/? I/ProxyCache: Shutdown proxy server
10-16 13:12:08.328 25301-25602/? W/System.err: java.lang.InterruptedException
10-16 13:12:08.348 25301-25602/? W/System.err: at java.lang.Thread.sleep(Native Method)
at java.lang.Thread.sleep(Thread.java:1031)
at java.lang.Thread.sleep(Thread.java:985)
at com.splunk.mint.ExceptionHandler.uncaughtException(ExceptionHandler.java:64)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
10-16 13:12:08.348 25301-25602/? E/AndroidRuntime: FATAL EXCEPTION: Thread-12294
PID: 25301
java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.FileDescriptor.setInt$(int)' on a null object reference
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:93)
at java.net.ServerSocket.implAccept(ServerSocket.java:216)
at java.net.ServerSocket.accept(ServerSocket.java:140)
at com.facebook.ads.internal.r.b.f.e(Unknown Source)
at com.facebook.ads.internal.r.b.f.a(Unknown Source)
at com.facebook.ads.internal.r.b.f$e.run(Unknown Source)
at java.lang.Thread.run(Thread.java:818)
As you can see the trace just tell you that the ping (and the connection to local host) failed but it doesn't tell you more. I am not solving it because it only happens in physical device and only with my app (the example app from Facebook runs great in the same device and same network).
I don't know why is happening and how to fix it.
So I finally found the error and the solution.
Let me explain the error:
Facebook ads SDK uses localhost Proxy cache to download the assets of the ads
I also use Splunk Mint to track errors of my app in production.
Splunk Mint library has issues with the http monitoring:
Disable network monitoring
The solution was to add this line before init Mint SDK:
Mint.disableNetworkMonitoring();
Getting error in Jenkins, while building the project.These are following error "The process cannot access the file because it is being used by another process."
Building on master in workspace D:\Jenkins\jobs\App\workspace
Cleaning local Directory.
java.nio.file.FileSystemException:
D:\Jenkins\jobs\App\workspace\.\app\app.properties: The process cannot access the file because it is being used by another process.
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
at java.nio.file.Files.delete(Unknown Source)
at sun.reflect.GeneratedMethodAccessor2180.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.deleteFile(Util.java:255)
at hudson.Util.deleteRecursive(Util.java:318)
at hudson.Util.deleteContentsRecursive(Util.java:220)
at hudson.Util.deleteRecursive(Util.java:309)
at hudson.Util.deleteContentsRecursive(Util.java:220)
at hudson.scm.subversion.CheckoutUpdater$1.perform(CheckoutUpdater.java:81)
at hudson.scm.subversion.WorkspaceUpdater$UpdateTask.delegateTo(WorkspaceUpdater.java:162)
at hudson.scm.SubversionSCM$CheckOutTask.perform(SubversionSCM.java:988)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:969)
at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:945)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:894)
at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:830)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1738)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Archiving artifacts
Finished: FAILURE
What does this mean, and what can I do about it?
in job configuration page delete workspace option is there. click that option before running the job. Or else if master-slave then check the same file has been used by differ
Need your help with selendroid. Am a new to it and still learning the tricks.
Tried with the basic selendroid app example and the same with Skype apk, it worked perfectly.
However, when tried with other app's apk like tripadvisor and dropbox, I keep getting error.
Following is my code and the error from console . Am using the version details from the manifest xml.
On further exploration -
I compared the manifest xml file of skype, dropbox, etc ... and see permission tag with protection level as 'Signature' for dropbox, tripadvisor. However the same is not present in the skype manifest file. Could this be hindering with our code.
If so, is there any workaround?
Any help with this is much appreciated.
Code -
package testSelendroid;
import java.net.URL;
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidDriver;
import io.selendroid.device.DeviceTargetPlatform;
import org.openqa.selenium.WebDriver;
public class selendroidNativeAppTest {
public static void main(String Args[])
{
WebDriver driver = null ;
//Below versions from Manifest files
//com.skype.raider:3.2.0.6673
//com.dropbox.android:2.3.8
//io.selendroid.testapp:0.10.0
SelendroidCapabilities caps = new SelendroidCapabilities("com.dropbox.android:2.3.8") ;
System.out.println("I am here");
caps.setPlatformVersion(DeviceTargetPlatform.ANDROID19);
System.out.println("I just reached here");
caps.setEmulator(true);
System.out.println("Passed emulator");
//caps.setCapability(CapabilityType.BROWSER_NAME, "Android");
//caps.setCapability("app-package", "com.tripadvisor.tripadvisor:8.7.1-release");
try {
System.out.println("Let me try");
driver = new SelendroidDriver(new URL("http://localhost:4444/wd/hub"), caps);
System.out.println("Driver ...");
driver.switchTo().window("NATIVE_APP");
System.out.print("Got the app");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Console -
I am here
I just reached here
Passed emulator
Let me try
org.openqa.selenium.SessionNotCreatedException: Error occurred while starting selendroid-server on the device
io.selendroid.exceptions.SelendroidException: Error occurred while starting selendroid-server on the device
at io.selendroid.android.impl.AbstractDevice.startSelendroid(AbstractDevice.java:235)
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:290)
at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)
at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:142)
at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:70)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)
at org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Throwable: android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.dropbox.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation target package: com.dropbox.android
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.dropbox.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
... 20 more
Command duration or timeout: 320.45 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ECXIPSAGT6504', ip: '172.25.2.91', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'
Driver info: io.selendroid.SelendroidDriver
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:139)
at io.selendroid.SelendroidDriver.<init>(SelendroidDriver.java:63)
at testSelendroid.selendroidNativeAppTest.main(selendroidNativeAppTest.java:36)
Caused by: io.selendroid.exceptions.SelendroidException: Error occurred while starting selendroid-server on the device
io.selendroid.exceptions.SelendroidException: Error occurred while starting selendroid-server on the device
at io.selendroid.android.impl.AbstractDevice.startSelendroid(AbstractDevice.java:235)
at io.selendroid.server.model.SelendroidStandaloneDriver.createNewTestSession(SelendroidStandaloneDriver.java:290)
at io.selendroid.server.handler.CreateSessionHandler.handle(CreateSessionHandler.java:42)
at io.selendroid.server.SelendroidServlet.handleRequest(SelendroidServlet.java:142)
at io.selendroid.server.BaseServlet.handleHttpRequest(BaseServlet.java:70)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.PathMatchHandler.handleHttpRequest(PathMatchHandler.java:33)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.DateHeaderHandler.handleHttpRequest(DateHeaderHandler.java:21)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:62)
at org.webbitserver.handler.ServerHeaderHandler.handleHttpRequest(ServerHeaderHandler.java:25)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:78)
at org.webbitserver.netty.NettyHttpControl.nextHandler(NettyHttpControl.java:67)
at org.webbitserver.netty.NettyHttpChannelHandler$2.run(NettyHttpChannelHandler.java:72)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.Throwable: android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.dropbox.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
Details:
INSTRUMENTATION_STATUS: id=ActivityManagerService
INSTRUMENTATION_STATUS: Error=Unable to find instrumentation target package: com.dropbox.android
INSTRUMENTATION_STATUS_CODE: -1
android.util.AndroidException: INSTRUMENTATION_FAILED: io.selendroid.com.dropbox.android/io.selendroid.ServerInstrumentation
at com.android.commands.am.Am.runInstrument(Am.java:865)
at com.android.commands.am.Am.onRun(Am.java:282)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:76)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
... 20 more
Check the SelendroidCapabilities id.
First run the server then go to Browser and run localhost URL at 4444 port
And if the Server returns the valid JSON then check the application ID and paste it into your
SelendroidCapabilities("com.dropbox.android:2.3.8")
Then run the JAVA project.
You will get rid from this problem.
If you still find any problem. tell me
Best luck
I'm having an issue where my game compiles to android and desktop but is getting a runtime error saying it can't find any of the files in the package walljumper.tools. It gets all the way to the loading screen, loads and then says this in the browser
GwtApplication: exception: walljumper/tools/Assets
walljumper/tools/Assets
and says this in the console
java.lang.NoClassDefFoundError: walljumper/tools/Assets
at com.me.walljumper.WallJumper.create(WallJumper.java:23)
at com.badlogic.gdx.backends.gwt.GwtApplication.setupLoop(GwtApplication.java:177)
at com.badlogic.gdx.backends.gwt.GwtApplication$1$1.update(GwtApplication.java:138)
at com.badlogic.gdx.backends.gwt.preloader.Preloader$1$1.onSuccess(Preloader.java:184)
at com.badlogic.gdx.backends.gwt.preloader.AssetDownloader$4$1.onEvent(AssetDownloader.java:171)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: walljumper.tools.Assets
at com.google.gwt.dev.shell.CompilingClassLoader.findClass(CompilingClassLoader.java:1090)
at com.google.gwt.dev.shell.CompilingClassLoader.loadClass(CompilingClassLoader.java:1196)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
Thanks in advance
In your Something.gwt.xml in your shared project do you correctly list the translatable source packages?
<module>
<source path="walljumper/" />
</module>