Problem in Mobile APP

  

Hello guys,


I'm having a very weird problem.


I'm using the new P10 functionality to generate mobile apps.

For now I'm trying to generate an .apk for android in debug mode.


I can generate the .APK... I passed it via USB to my device and installed. However when I open it on device it just shows a black screen and after some time, I get a error.. "There was an error processing your request" none information was logged in Service Center.


After it I tried to scan QR Code to install directly from the site. When I tried it I got the same error, and this time was logged to Service Center:

Error: Load timeout for modules: NativeAppBuilder.model
http://requirejs.org/docs/errors.html#timeout


Beyond that, the Native Platform Tab in Service Studio also do not load.

I cant generate apps throught there.


I had some warnings a time ago about my SSL certificate being invalid but don't know if it is related.


Anyone can help?


UPDATE:


I was able to download it via QR Code, however the black screen continue.


After some time before the error "There was an error processing your request"  it android ask me to open an file, when I open it it says Something went wrong.

Attached the file that is shown.

Raphael Ranieri wrote:


I can generate the .APK... I passed it via USB to my device and installed. However when I open it on device it just shows a black screen and after some time, I get a error.. "There was an error processing your request" none information was logged in Service Center.


Beyond that, the Native Platform Tab in Service Studio also do not load.

I cant generate apps throught there.


I had some warnings a time ago about my SSL certificate being invalid but don't know if it is related.

I believe SSL is related. It is required for mobile platform to work. Infra guys will tackle this.

Btw, if you cannot load "Native Platform" Tab how did you generate the apk?


Hey Eric,

About SSL, do you know if it is required also in Dev Environment? I have an auto signed certificate installed in my dev server. But keep getting it is invalid.


I generated the .apk in Service Center.

The tab doesn't work just in Service Studio. 

Hi Raphael,

Don't know if it's related or not but check that all the services in your environment are running:

  • In Service Center -> Monitoring -> Environment Health (everything should be green)

If not, restart the services if you have access to the server or contact OutSystems Support to do it.

Cheers,

José


Hello Jose,

Every thing is okay in the Environment Health.

All green and running :)

I'm still having this problem...

Any help?

Hello Raphael.

That really seems SSL related. Valid SSL is required for all environments. What's the error when you open the Native Tab in Service Studio?

If you have Android Studio, you can see the logcat and you'll probably have the SSL error there.


Hello César I cant open the Native Tab in Service Studio. It just stay in Loading Status.

I can however open it in Service Center. And there I generated an .apk file and tried to run it in device.

But every time I try to run it on Device I get a pop up asking me to open a file and the file is:



I have an auto signed certificate Installed in this server since it is a Dev Environment.

I should have a Full Certificate even if it is Dev?


Hello Raphael.

You should be able to use self signed certificates (or with a custom CA) as long as the devices are set to trust those certificates. This requires that those certificates are installed on the devices before using the mobile applications. Also note that in Android 7.0+ there are security features enabled by default that makes usage of these types of certificates harder (more information: Changes to Trusted Certificate Authorities in Android Nougat )

I'm not sure this is the problem since you are also unable to open the Native Platform tab (Error: Load timeout for modules: NativeAppBuilder.model). 

Are you able to see the app in Chrome (with "Preview In Devices")?

Can you connect the device to Android Studio and check the logcat? 


Hello Cesar thanks for the help.

I got the logs from LogCat they are in Attach.

In a lot of places it says:

[ERROR:ssl_client_socket_openssl.cc(939)] handshake failed; returned -1, SSL error code 1, net_error -100


So I believe it may be because of the SSL...

I didn't install the certificates on the device so I think this is the problem.


Thank you.

I Will try it and give a feedback.


Hey Cesar!

I Installed the certificate in my device, however the error continues.

Im not getting the SSL error anymore but still can't open it.

I will attach again the new logs.


Do you know what can be?

Tks

Hello Raphael.

The SSL error seems to be gone.

1 - If you create a clean app, from scratch, generate and install. Does the error still happen?

2 - Can you open the app in the device using Chrome (e.g.: https://yourhostname/app)?

3 - Using chrome in desktop, if you open the same URL of the app, F12 and Security Tab. Does Chrome report everything "ok"?


Hey Cesar.

1 - If I create an app from scratch I keep getting the error.

2 - Yes I can but with some warnings from certificates.

3 - I have some errors in this tab take a look:


I tried to create a new certificate with a Subject Alternative Name. But I can't install it on my server.

It has been a long way ... And I still don't have a solution :(

Hello Raphael.

There's definitely an issue with the certificate. Until you get it "all green", you'll have issues.

Here's a link that might help: Installing a Valid Certificate on a Dev Server

Thanks