Logging to current liferay portal

Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hello,
I have created my first android app and I was implementing LoginListener to log in to a portal. Everything worked corrected to the moment I have tried to log to portal hosted on https instead of http, because I have encountered below error.
For more informations:
The SSL is configured with a cert signed by a "Certum Domain Validation CA SHA2".
I have even tried reading this cert, as I thought it might be a problem with a intermediate cert as the code below shows:


Error message:

05-31 19:28:38.800 4259-4259/com.example.enxoo.ebokapp E/LiferayScreens: Could not login
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:219)
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103)
at com.squareup.okhttp.Connection.connect(Connection.java:143)
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.squareup.okhttp.Call.getResponse(Call.java:273)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
at com.squareup.okhttp.Call.execute(Call.java:81)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123)
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99)
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576)
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22)
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59)
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41)
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:646)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:197)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:399)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.SslWrapper.doHandshake(SslWrapper.java:374)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:217)
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103) 
at com.squareup.okhttp.Connection.connect(Connection.java:143) 
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185) 
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) 
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) 
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) 
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) 
at com.squareup.okhttp.Call.getResponse(Call.java:273) 
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230) 
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201) 
at com.squareup.okhttp.Call.execute(Call.java:81) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123) 
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99) 
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576) 
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41) 
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:646) 
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495) 
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418) 
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339) 
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94) 
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88) 
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:197) 
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:399) 
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) 
at com.android.org.conscrypt.SslWrapper.doHandshake(SslWrapper.java:374) 
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:217) 
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103) 
at com.squareup.okhttp.Connection.connect(Connection.java:143) 
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185) 
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) 
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) 
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) 
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) 
at com.squareup.okhttp.Call.getResponse(Call.java:273) 
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230) 
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201) 
at com.squareup.okhttp.Call.execute(Call.java:81) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123) 
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99) 
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576) 
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41) 
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 
05-31 19:28:38.832 4259-4259/com.example.enxoo.ebokapp E/LiferayScreens: blad
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:219)
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103)
at com.squareup.okhttp.Connection.connect(Connection.java:143)
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185)
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
at com.squareup.okhttp.Call.getResponse(Call.java:273)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)
at com.squareup.okhttp.Call.execute(Call.java:81)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191)
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123)
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99)
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576)
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22)
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59)
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41)
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:646)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495)
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418)
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339)
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94)
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:197)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:399)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.SslWrapper.doHandshake(SslWrapper.java:374)
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:217)
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103) 
at com.squareup.okhttp.Connection.connect(Connection.java:143) 
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185) 
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) 
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) 
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) 
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) 
at com.squareup.okhttp.Call.getResponse(Call.java:273) 
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230) 
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201) 
at com.squareup.okhttp.Call.execute(Call.java:81) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123) 
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99) 
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576) 
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41) 
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrustedRecursive(TrustManagerImpl.java:646) 
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:495) 
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:418) 
at com.android.org.conscrypt.TrustManagerImpl.getTrustedChainForServer(TrustManagerImpl.java:339) 
at android.security.net.config.NetworkSecurityTrustManager.checkServerTrusted(NetworkSecurityTrustManager.java:94) 
at android.security.net.config.RootTrustManager.checkServerTrusted(RootTrustManager.java:88) 
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:197) 
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.verifyCertificateChain(ConscryptFileDescriptorSocket.java:399) 
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) 
at com.android.org.conscrypt.SslWrapper.doHandshake(SslWrapper.java:374) 
at com.android.org.conscrypt.ConscryptFileDescriptorSocket.startHandshake(ConscryptFileDescriptorSocket.java:217) 
at com.squareup.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103) 
at com.squareup.okhttp.Connection.connect(Connection.java:143) 
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185) 
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128) 
at com.squareup.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341) 
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330) 
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248) 
at com.squareup.okhttp.Call.getResponse(Call.java:273) 
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230) 
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201) 
at com.squareup.okhttp.Call.execute(Call.java:81) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.doSend(OkHttpClientImpl.java:131) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:191) 
at com.liferay.mobile.android.http.client.OkHttpClientImpl.send(OkHttpClientImpl.java:83) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:107) 
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123) 
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99) 
at com.liferay.mobile.android.v62.user.UserService.getUserByEmailAddress(UserService.java:576) 
at com.liferay.mobile.screens.auth.login.connector.UserConnector62.getUserByEmailAddress(UserConnector62.java:22) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59) 
at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41) 
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
at java.lang.Thread.run(Thread.java:764) 


code for setting an sslcontext:

CertificateFactory cf = CertificateFactory.getInstance("X.509");

InputStream caInput = getResources().openRawResource(R.raw.certname);
Certificate ca;
try {
ca = cf.generateCertificate(caInput);
} finally {
caInput.close();
}

KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
keyStore.load(null, null);
keyStore.setCertificateEntry("ca", ca);


// Create a TrustManager that trusts the CAs in our KeyStore
String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
tmf.init(keyStore);

// Create an SSLContext that uses our TrustManager
SSLContext context = SSLContext.getInstance("TLS");
context.init(null, tmf.getTrustManagers(), null);


Thanks for all Your further help guys.
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey!

Maybe you need to install the intermediate certificates on your server as stated here

Another possibility is to create an ssl context as you did, but you have to set this context to the http client that is sending the requests. it is in the mobile-sdk, I've attached here a project that customize the default http client setting the new ssl context. Try using this code to set the ssl context that you created.

I hope it helps emoticon

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,
You don't really know how much You did help me ! The issue was indeed that I didn't set the context to the http client which send request.
Thanks a lot for help and code.

I think I have last question, beacuse know I am able to log in to this portal, but I am unable to reset user password. I have created an account
http://prntscr.com/jq88x6 for reseting password to set his credentials for anynomousApiScreeName and anynomousApiPassword as it follows :
<string name="liferay_anonymousApiUserName">usersEmail</string> (I have also tried user name "reset")
<string name="liferay_anonymousApiPassword">passwordForMyAccount</string>

In my android screenlet I'm implementing ForgotPasswordListener and setting listener on it and of course overriding onForgotPasswordRequestSuccess and onForgotPasswordRequestFailure methods.

In my portal configuration I have set 2 checkboxes for allowing reseting password and requesting for reset link.

I am getting below error:

06-03 12:07:40.244 4167-4167/com.example.enxoo.ebokapp E/LiferayScreens: Could not send password
com.liferay.mobile.android.exception.ServerException: java.lang.RuntimeException
at com.liferay.mobile.android.http.Response.checkPortalException(Response.java:98)
at com.liferay.mobile.android.http.Response.getBody(Response.java:49)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:113)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123)
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99)
at com.liferay.mobile.screens.service.v62.ScreensuserService.sendPasswordByEmailAddress(ScreensuserService.java:66)
at com.liferay.mobile.screens.auth.login.connector.ScreensUserConnector62.sendPasswordByEmailAddress(ScreensUserConnector62.java:21)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.getBasicEventNew(ForgotPasswordInteractor.java:68)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.execute(ForgotPasswordInteractor.java:48)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.execute(ForgotPasswordInteractor.java:31)
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)


Best regards,
Mateusz W-K
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey

Can you try to go to <your-server-url>/api/jsonws and try to invoke the method sendPasswordByEmailAddress using the web interface? To check if the problem is on the server on in the app.
It would be also helpful to see if there is an error showing on the server emoticon

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,
I have tried to find this method on web interface but could not find any similar. I looked at my few instances and on each one there is no such method. http://prntscr.com/jr15uu , http://prntscr.com/jr16q8 (my liferay portal version is 6.2 [maybe here is the issue ? ]).

On my server I looked for log and found that when I try reseting password from my app appears below error
09:05:07,268 ERROR [http-bio-8080-exec-9][JSONWebServiceServiceAction:97] No JSON web service action with path /screensuser/send-password-by-email-address and method null for //screens-web

Should I install some more dependencies or create web service by myself?

Regards
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey,

I didn't realize it before, sorry, but yeah, you have to install a plugin that exposes those service and some more used in Liferay Screens.

The plugin is this: CE EE

You have to download the version that is compatible with 6.2 which is the 1.3.1 version

Let us know if this works emoticon

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,
that's the thing I was worried about since I have on my all instances problem with installing apps.
Since store on my instance is on never ending loading spinner, I have tried downloading manually lpkg file and installing it also manually in app manager, and now I have encountered an following error " App Manager is temporarily unavailable."


stack trace:
java.lang.NullPointerException
at org.eclipse.gemini.mgmt.internal.BundleUtil.isRemovalPending(BundleUtil.java:168)
at org.eclipse.gemini.mgmt.framework.internal.OSGiBundle.isRemovalPending(OSGiBundle.java:593)
at org.eclipse.gemini.mgmt.framework.internal.OSGiBundle.asCompositeData(OSGiBundle.java:397)
at org.eclipse.gemini.mgmt.framework.BundleState.listBundles(BundleState.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
at javax.management.StandardMBean.invoke(StandardMBean.java:405)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at com.liferay.marketplace.util.BundleUtil.getInstalledBundles(BundleUtil.java:57)
at com.liferay.marketplace.util.BundleUtil.isActive(BundleUtil.java:137)
at com.liferay.marketplace.model.impl.AppImpl.isInstalled(AppImpl.java:106)
at com.liferay.marketplace.service.impl.AppLocalServiceImpl.getInstalledApps(AppLocalServiceImpl.java:239)
at sun.reflect.GeneratedMethodAccessor4943.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at com.sun.proxy.$Proxy410.getInstalledApps(Unknown Source)
at com.liferay.marketplace.service.AppLocalServiceUtil.getInstalledApps(AppLocalServiceUtil.java:326)
at org.apache.jsp.app_005fmanager.view_jsp._jspService(view_jsp.java:832)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portlet.PortletRequestDispatcherImpl.dispatch(PortletRequestDispatcherImpl.java:331)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:362)
at com.liferay.util.bridges.mvc.MVCPortlet.include(MVCPortlet.java:378)
at com.liferay.util.bridges.mvc.MVCPortlet.doView(MVCPortlet.java:144)
at com.liferay.portal.kernel.portlet.LiferayPortlet.doDispatch(LiferayPortlet.java:235)
at com.liferay.util.bridges.mvc.MVCPortlet.doDispatch(MVCPortlet.java:314)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:262)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:55)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:583)
at com.liferay.portlet.InvokerPortletImpl.invokeRender(InvokerPortletImpl.java:656)
at com.liferay.portlet.InvokerPortletImpl.render(InvokerPortletImpl.java:362)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1239)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at com.liferay.portal.servlet.DirectRequestDispatcher.include(DirectRequestDispatcher.java:57)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.doDispatch(ClassLoaderRequestDispatcherWrapper.java:78)
at com.liferay.portal.servlet.ClassLoaderRequestDispatcherWrapper.include(ClassLoaderRequestDispatcherWrapper.java:53)
at com.liferay.portlet.PortletContainerImpl._doRender(PortletContainerImpl.java:638)
at com.liferay.portlet.PortletContainerImpl.render(PortletContainerImpl.java:135)
at com.liferay.portlet.SecurityPortletContainerWrapper.render(SecurityPortletContainerWrapper.java:141)
at com.liferay.portlet.RestrictPortletContainerWrapper.render(RestrictPortletContainerWrapper.java:126)
at com.liferay.portal.kernel.portlet.PortletContainerUtil.render(PortletContainerUtil.java:156)
at com.liferay.portal.layoutconfiguration.util.velocity.TemplateProcessor.processMax(TemplateProcessor.java:171)
at sun.reflect.GeneratedMethodAccessor1354.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:389)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:378)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328)
at org.apache.velocity.Template.merge(Template.java:235)
at com.liferay.portal.velocity.VelocityTemplate.processTemplate(VelocityTemplate.java:112)
at com.liferay.portal.template.AbstractTemplate.processTemplate(AbstractTemplate.java:108)
at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doProcessTemplate(RuntimePageImpl.java:375)
at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.doDispatch(RuntimePageImpl.java:284)
at com.liferay.portal.layoutconfiguration.util.RuntimePageImpl.getProcessedTemplate(RuntimePageImpl.java:96)
at com.liferay.portal.layoutconfiguration.util.RuntimePageUtil.getProcessedTemplate(RuntimePageUtil.java:38)
at org.apache.jsp.html.portal.layout.view.control_005fpanel_jsp._jspService(control_005fpanel_jsp.java:857)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:604)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:543)
at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:302)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:413)
at com.liferay.portal.action.LayoutAction.doExecute(LayoutAction.java:200)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:95)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:168)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:557)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:534)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:486)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:161)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:361)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:308)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:254)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:86)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:268)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:226)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:57)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

:/

Regards
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey

Did you download the version 1.3.1 of the plugin?

I'm not sure about what can be wrong with the app manager, did you try to just put the .lpkg in the deploy folder?

You will have to restart the instance after installing the plugin for this to work

I hope it helps

Regards
Amos Fong, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,
putting the lpkg file in deploy folder made the thing, and it did successfully install :-)
Now using web interface send-password-by-email-address it returns me "true", but android app still occurs an following error:


"06-07 13:09:50.626 7408-7408/com.example.enxoo.ebokapp E/LiferayScreens: Could not send password
com.liferay.mobile.android.exception.AuthenticationException: java.lang.SecurityException
at com.liferay.mobile.android.http.Response.checkPortalException(Response.java:95)
at com.liferay.mobile.android.http.Response.getBody(Response.java:49)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:113)
at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:123)
at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:99)
at com.liferay.mobile.screens.service.v62.ScreensuserService.sendPasswordByEmailAddress(ScreensuserService.java:66)
at com.liferay.mobile.screens.auth.login.connector.ScreensUserConnector62.sendPasswordByEmailAddress(ScreensUserConnector62.java:21)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.getBasicEventNew(ForgotPasswordInteractor.java:68)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.execute(ForgotPasswordInteractor.java:48)
at com.liferay.mobile.screens.auth.forgotpassword.interactor.ForgotPasswordInteractor.execute(ForgotPasswordInteractor.java:31)
at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
"

But now in liferay server logs nothing appears.

Best regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey
Thanks to You I have managed to reset password emoticon

Is there any way to include my js file each time user moves on my liferay portal from one page to another? Because I want to add an event listener when user clicks to log out from website then I would like to log out him also from my aplication. And since my JS file runs only on first page load, when user changes page it does not work (event listener just clears out).

Regards
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey

We've released a new beta version of the library with that feature included: 4.0.0-beta-1

Can you try it and let us know if everything is working fine?

Thanks!
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,

of course, so here are my first thoughts:

1) Moving from one page to another works quite good, but in my portal I have a custom log out created as follows:
In my portal_normal.vm I've got a code which looks like this
<a href="#4" id="sign-out-toggler-id">
<span class="initials-container">
<script>
"use strict";
let userFirstName = '$themeDisplay.getUser().getFirstName()';
document.write(userFirstName[0]);
</script>
</span>
$themeDisplay.getUser().getFirstName()
$themeDisplay.getUser().getLastName()
<span class="icon-ebok-arrow-down" id="sign-out-carret"></span>
<div class="sign-out-container" id="sign-out-container-id">
<a href="/group/guest/change-password">Change password</a>
<a href="$sign_out_url" id="sing-out-link">$sign_out_text</a>
</div>
, which shows logged in user name and surname (screenshot_3.png). If You click on it , it shows 2 options (screenshot_4.png) to change a password or to log out a user.
Js code on portal ussed to toggle this:
var signout = document.getElementById("sign-out-toggler-id");
signout.addEventListener("click", function(){
$( "#sign-out-container-id" ).fadeToggle( "fast" );
$( "#sign-out-carret" ).toggleClass("rotate");
});

And during this animation showing this 2 available options, screen flashes with white screen. which is a little bit unwanted.

2) In my mobile js file, which I add as a rawjs, I have a code which looks like this

function setListenerOnLogout() {
logoutLink.addEventListener("click", function(event) {
window.Screens.postMessage('logout-fired', 'true');
}, false);
}

setListenerOnLogout();

which sets listener on a log-out link which is mentioned in the first point.

Here is my my onScriptMessageHandler method:

if ("logout-fired".equals(namespace)) {

SessionContext.logout();

new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(getApplicationContext(), MainActivity.class);
startActivity(intent);
}
});
}

Using old liferay screens (3.1.0) this solution worked on a very begging - when app started and loaded the first page, it set a listener on a log out link and it has worked. When I moved to another page and tried to log out, it didn't work since page reloaded and listener was not set.
But now using the same code in 4.0.0-beta-1 version I get an following error:


06-08 16:53:27.952 4214-4214/com.example.enxoo.ebokapp E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.enxoo.ebokapp, PID: 4214
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.enxoo.ebokapp/com.example.enxoo.ebokapp.MainActivity}: java.lang.InstantiationException: java.lang.Class<com.example.enxoo.ebokapp.MainActivity> cannot be instantiated
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.InstantiationException: java.lang.Class<com.example.enxoo.ebokapp.MainActivity> cannot be instantiated
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1174)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) 
at android.app.ActivityThread.-wrap11(Unknown Source:0) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:164) 
at android.app.ActivityThread.main(ActivityThread.java:6494) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) 

Regards emoticon
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Also I have got 2 more questions which may help also people in the future -
1) is there a built in serivce that allows me to download a file which is showed on my portal (but the file is located on ftp and in browser I display a link, when user clicks on it, javascript fires and start to download file. Here I would like to do the same thing, but download a file and save it on his device.


2) is there any easy way to attach a file in a web form on my mobile app? On my web portal I've got a form with <input type="file"> where user can attach any file (which after submitting a form is send to salesforce). I would like to implement same functionality on my mobile app, so when user clicks on mobile app in liferay portal on an input type file, then he can choose a file from his storage or make a photo and instantly attach it to an input.

And 2 cool things that could be implementhed I think:
I know that in android apps You have to handle it for Yourself rotating a screen, but since it is a liferay screens it could work implicitly to stay on the same page when you rotate right or left. And there could be a method to override that if a user wants to have custom logic, he can override the method.

Second thing which would be nice to have to use also implicitly back button on android. It could store in cache a queue of last pages visited, and using back button You could go backwards.


For some more info: in my portal I connect with a salesforce to gather some informations using an rest client. Everything worked well, but now when I used beta version it sudennly stop working throwing an "com.sun.jersey.api.client.UniformInterfaceException: GET LINK_HERE returned a response status of 500" (I don't really know if it's because of the liferay screens, I just want to inform You guys that something like this happened emoticon )

Best regards
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey emoticon

Let's go question by question

Mateusz Wolak:
And during this animation showing this 2 available options, screen flashes with white screen. which is a little bit unwanted.


I think this is a problem with Android's webview, anyway, if you have a sample that we can use to debug it and try to fix it, it would be very helpful emoticon

As a workaround, (and I think it would have a better UX) you can just catch the click on the button with Js, communicate with the native side with (window.Screens.postMessage..) and render a native dialog with the options needed. After the user have clicked the option in the native dialog, you can execute a javascript function to trigger the action of the web button with the method:
webScreenlet.injectScript(new JsScript("optionclick", "yourjavascriptfunction()");


Mateusz Wolak:
2) In my mobile js file, which I add as a rawjs, I have a code which looks like this


Android cannot start an activity with the applicationContext (only if you pass the new_task flags). Can you try using the activity context? you will have to do something like:

Intent intent = new Intent(MainActivity.this, MainActivity.class);
startActivity(intent);


Mateusz Wolak:
Also I have got 2 more questions which may help also people in the future -
1) is there a built in serivce that allows me to download a file which is showed on my portal (but the file is located on ftp and in browser I display a link, when user clicks on it, javascript fires and start to download file. Here I would like to do the same thing, but download a file and save it on his device.


You can inject a js that catches that event and does something with it:


// find your link or register a event for all
var link = document.getElementsByTagName('a')[0];
				
				link.addEventListener('click', function(event) {
					// Check if there this is the link you want to intercept (event.target.href)
                                        // prevent default behaviour
					event.preventDefault();
                                       // send message to the native side and download the file there
                                       window.Screens.postMessage('namespace', event.target.href)
				});


Mateusz Wolak:

2) is there any easy way to attach a file in a web form on my mobile app? On my web portal I've got a form with <input type="file"> where user can attach any file (which after submitting a form is send to salesforce). I would like to implement same functionality on my mobile app, so when user clicks on mobile app in liferay portal on an input type file, then he can choose a file from his storage or make a photo and instantly attach it to an input.


As far as I know, this is the default behavior in mobile, if you have an input type file, the SO allow you to insert the image from the camera or from the gallery. What is happening in your case when you have this kind of input type?

Mateusz Wolak:
And 2 cool things that could be implemented I think:
I know that in android apps You have to handle it for Yourself rotating a screen, but since it is a Liferay screens it could work implicitly to stay on the same page when you rotate right or left. And there could be a method to override that if a user wants to have custom logic, he can override the method.


I think I didn't understand this, what behavior are you expecting? WebScreenlet staying on the same page when you rotate?
You can perform actions in your activity onSAveInstanceState and onRestoreInstanceState to keep the state when phone rotation happens.
What would you need apart from that? (to think how we can add this to the screenlet) emoticon

Mateusz Wolak:
Second thing which would be nice to have to use also implicitly back button on android. It could store in cache a queue of last pages visited, and using back button You could go backwards.

This should be working in 4.0.0-beta-1, is your server configured with SPA?

I hope this helps, thank a lot for the feedback, we appreciate this a lot!

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Hey,

Since using beta version I don't know if something happend with remembering my user that he is logged in. I think that worked before, and now can't really tell.

The good thing that I mentioned in previous post that I had a internal server error on my integration connetions - I have already fixed it, and fortunately it wasn't the library fault emoticon o

By your help I've managed to pass url to the file and try to download a file using class attached below.
Before even firing class which downloads a file, I check for permissions using this code:
" if(ContextCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (ActivityCompat.shouldShowRequestPermissionRationale(this,
Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
} else {
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}, 0);

}
} else {"
, so I grant access for the app to write external storage, but I can't see anywhere the files which I download.

Second thing is that this input type files which I mentioned earlier - when I log in to my portal using mobile web browser I can attach files from my camera and storage, my when I log in through the app - I can't.

Since this input looks like this (so it's style is set to display : none ) :

<label class="custom-file-upload" for="file-upload">
<input name="documentFile" id="file-upload" type="file" style="display:none" multiple
onchange="handleFiles();">
<spring:message code="portlet.service.add-file" />
</label>

I created a simple code in js to click on input when on page is element with class "custom-file-upload" and it's clicked.


function attachListenerOnInputFile() {
var labelInputs = document.getElementsByClassName("custom-file-upload");
for(var i = 0; i < labelInputs.length; i++) {


var labelInput = labelInputs;
labelInput.addEventListener("click", function(event) {
window.Screens.postMessage('check-read-permission', 'true');
var input = document.getElementById("file-upload");

input.onclick = "";

input.click();
}, false);

}

}
attachListenerOnInputFile();

Again here - nothing really happens and I can't attach any file.

If Your provide me Your email I can always send You my apk file, so You could debug some things like I mentioned before that my screen flashes when I press on my user screen name and want to log him out ;)

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
Oh and there is one major thing still - since I have installed screens-web on my production enviroment I have a lot of issues with connetion with my portal.
It restart on it's own sometimes and sometimes I have to do it by myself.

Last log which I was able to retrieve from catalina.out:

' at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp 11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process( AbstractProtocol.java:620)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoin t.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor. java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor .java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskTh read.java:61)
at java.lang.Thread.run(Thread.java:748)
"


AND



Jun 12, 2018 3:25:36 PM org.apache.shindig.gadgets.features.FeatureResourceLoader$UriResource getContent
WARNING: Unable to retrieve remote library from http://www.google.com/ig/lib/libanalytics.js
Jun 12, 2018 3:25:36 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/liferay-portal-6.2-ce-ga5/tomcat-7.0.62/webapps/resources-importer-web has finished in 1,696 ms
Jun 12, 2018 3:25:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 12, 2018 3:25:36 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 12, 2018 3:25:36 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 91563 ms
Jun 12, 2018 3:25:42 PM org.apache.shindig.gadgets.http.BasicHttpFetcher fetch
INFO: Got Exception fetching http://www.google.com/ig/lib/libga.js - 5006ms
org.apache.http.conn.ConnectTimeoutException: Connect to www.google.com/172.217.16.164:80 timed out
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:125)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:123)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:147)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:597)
at org.apache.shindig.gadgets.http.BasicHttpFetcher.fetch(BasicHttpFetcher.java:354)
at org.apache.shindig.gadgets.features.FeatureResourceLoader$UriResource.getContent(FeatureResourceLoader.java:250)
at org.apache.shindig.gadgets.features.FeatureResourceLoader$UriResource.<init>(FeatureResourceLoader.java:229)
at org.apache.shindig.gadgets.features.FeatureResourceLoader$UriResource.<init>(FeatureResourceLoader.java:217)
at org.apache.shindig.gadgets.features.FeatureResourceLoader.loadUri(FeatureResourceLoader.java:122)
at org.apache.shindig.gadgets.features.FeatureResourceLoader.load(FeatureResourceLoader.java:86)
at org.apache.shindig.gadgets.features.FeatureRegistry.loadFeature(FeatureRegistry.java:459)
at org.apache.shindig.gadgets.features.FeatureRegistry.loadResources(FeatureRegistry.java:402)
at org.apache.shindig.gadgets.features.FeatureRegistry.register(FeatureRegistry.java:151)
at org.apache.shindig.gadgets.features.FeatureRegistry.<init>(FeatureRegistry.java:88)
at org.apache.shindig.gadgets.features.FeatureRegistry$$FastClassByGuice$$536f6a5.newInstance(<generated>)
at com.google.inject.internal.cglib.reflect.FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:60)
at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
at com.google.inject.SingleParameterInjector.inject(SingleParameterInjector.java:42)
at com.google.inject.SingleParameterInjector.getAll(SingleParameterInjector.java:66)
at com.google.inject.ConstructorInjector.construct(ConstructorInjector.java:84)
at com.google.inject.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:111)
at com.google.inject.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:45)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:811)
at com.google.inject.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:42)
at com.google.inject.Scopes$1$1.get(Scopes.java:54)
at com.google.inject.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:48)
at com.google.inject.SingleFieldInjector.inject(SingleFieldInjector.java:56)
at com.google.inject.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:109)
at com.google.inject.InjectionRequestProcessor$StaticInjection$1.call(InjectionRequestProcessor.java:106)
at com.google.inject.InjectorImpl.callInContext(InjectorImpl.java:804)
at com.google.inject.InjectionRequestProcessor$StaticInjection.injectMembers(InjectionRequestProcessor.java:106)
at com.google.inject.InjectionRequestProcessor.injectMembers(InjectionRequestProcessor.java:74)
at com.google.inject.InjectorBuilder.injectDynamically(InjectorBuilder.java:168)
at com.google.inject.InjectorBuilder.build(InjectorBuilder.java:113)
at com.google.inject.Guice.createInjector(Guice.java:92)
at org.apache.shindig.common.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:73)
at com.liferay.opensocial.messaging.OpenSocialHotDeployMessageListener.onDeploy(OpenSocialHotDeployMessageListener.java:101)
at com.liferay.portal.kernel.messaging.HotDeployMessageListener.doReceive(HotDeployMessageListener.java:55)
at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:67)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
at java.lang.Thread.run(Thread.java:748)
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts
OK.

I have fixed downloading the file and I'm attaching sample file to download a file from links on portals (maybe someone will need it in the future).

The rest of the errors still bother me..

Regards
thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
Hey,

While we are working in a proper solution for this, you can use the following workaround to work with <input type="file"> in the WebScreenlet:

You will have to follow the points 2 and 3 of the section "Using Cordova in Web Screenlet" of this tutorial

Basically, you have to create an attribute of your activity class where the WebScreenlet is located:

CordovaLifeCycleObserver observer = new CordovaLifeCycleObserver();


And them implement all the activity lifecycle methods and forward the calls to the observer as follows:


Override
protected void onStart() {
    super.onStart();
    observer.onStart();
}

@Override
protected void onStop() {
    super.onStop();

    observer.onStop();
}

@Override
public void onPause() {
    super.onPause();

    observer.onPause();
}

@Override
public void onResume() {
    super.onResume();

    observer.onResume();
}

@Override
public void onDestroy() {
    super.onDestroy();

    observer.onDestroy();
}

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    observer.onSaveInstanceState(outState);
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    observer.onActivityResult(requestCode, resultCode, data);
}

@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, 
    @NonNull int[] grantResults) {
        super.onRequestPermissionsResult(requestCode, permissions, grantResults);

        observer.onRequestPermissionsResult(requestCode, permissions, grantResults);
}

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);

    observer.onConfigurationChanged(newConfig);
}


And after doing that, you will have to include a new setting in your configuration object:


WebScreenletConfiguration configuration =
        new WebScreenletConfiguration
                .Builder("your-url")
                .enableCordova(observer)
                .load();


After doing this, your HTML input should be working right away without the need of adding any js emoticon
--------------------------------------------------

In regard of the server failures, I don't see any evidence in the stack trace that the plugin is the one responsible for the crashes. Can you open a thread in the backend section of the forum, please? Maybe someone can help you solve that there emoticon


I hope it helps!

Thanks a lot for adding the working code here

Regards
Mateusz Wolak, modified 7 Years ago. Junior Member Posts: 27 Join Date: 1/17/18 Recent Posts

Hey,
first of all sorry for the gap with answer ;)
Second of all when can I expect that You guys will fix issue with attaching files? Because if it will not be long enough then I can just wait for it :)
Last but not least I would like to ask if You managed to replicate the issue with flashing white screen, when trying to move to another page or according to my problem - during toggling? I can still send You an apk file to test some things if You would like, just write me an email if You want one :) !

Regards

thumbnail
Victor Galan, modified 7 Years ago. Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts

I don't know if you managed to read my comment before it was gone, but I will post it again:

We don't know when it will be available, but you can watch this issue to track the status. It will be useful to access your problematic webpage to debug it in our side, did you try to use the workaround with the native view? This will improve the UX for that window

 

I hope it helps,

Thanks!