If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53675 by Jaymer
Mon Apr 06, 2020 5:39 pm
3 tries and all of them failed: - - [06/Apr/2020:17:09:19 +0200] "POST /App/request.awmn HTTP/1.1" 200 85 - - [06/Apr/2020:17:09:26 +0200] "POST /App/request.awmn HTTP/1.1" 200 85 - - [06/Apr/2020:17:09:37 +0200] "POST /App/request.awmn HTTP/1.1" 200 85

this is good, because you now know that it is hitting the server for sure.
But you don't know whats in those 85 bytes of a reply.
Probably "unauthorized user"

The key will be in the Server/Tomcat Output Window.
You should see the attempted login, and the user DOMAIN, ID, PW coming in... and the reply from Aware.
So whats in that log area should help.

Also, are you using the default "red" login screen still?
#53676 by karelh
Mon Apr 06, 2020 6:10 pm
Hey Jaymer

Thank you very very much for the info. Interesting results.

Whether I log in with the right or wrong credentials I get the same error BUT in the tomcat output, I can see it failing to authenticate AND actually successfully logging into the app.

So this shows that the App correctly authenticates to the server but fails to display the actual home page or in the case of the wrong credentials, return the correct error message.

I am not using the red login screen but all I changed was a logo on top and the color of the button.

Hopefully, I am close to getting this solved and if so we can continue developing mobile apps.

So basically the log output is the same when I log in from a working app vs the new app published via Monaca.
#53678 by Jaymer
Mon Apr 06, 2020 7:51 pm
from the phone...

to Aware, initially, there is NO DIFFERENCE between the Mobile App logging in, vs. the Mobile Browser logging in.
So if you are using the same credentials, then there is no reason it should work from Browser, and NOT work from NativeApp.

If IT DOES NOT WORK, then I would think the issue has to be in the parms sent from the Red screen to logonOp.aw
Besides userid & pw, it also sends Domain. if thats wrong, you'd get invalid credentials.
Maybe there's a typo in what you entered for the Domain.

To test logging in from the phone Browser, I'd make sure you connect to logonAdmin.html so that it makes you enter the Domain.
Check the source code in the unzipped Phonegap.zip file inside "index.html" and make sure that domain field matches what you enter when logging in from the Browser.
I think you just have a typo somewhere.

But you're very close. At this point, Monaca has nothing to do with it. its ALL in the index.html file (the red screen)
#53679 by karelh
Mon Apr 06, 2020 8:11 pm

I agree but the strange part is that although it gives the connection error I can see it authenticate with the correct credentials, domain, and url in the tomcat logs. It also loads the dashboard and queries as if everything loaded correctly. So I am confident that to log in and domain info is correct but its struggling to load the initial page...

Monaca has a debugger app that you can run on your phone that syncs the app from their cloud and runs it in, I suppose, a container. This works fine.

Also, if you enter the wrong credentials the app should say "Incorrect credentials" but you also get that error.
#53681 by Jaymer
Mon Apr 06, 2020 8:42 pm - - [06/Apr/2020:17:09:19 +0200] "POST /App/request.awmn HTTP/1.1" 200 85 - - [06/Apr/2020:17:09:26 +0200] "POST /App/request.awmn HTTP/1.1" 200 85 - - [06/Apr/2020:17:09:37 +0200] "POST /App/request.awmn HTTP/1.1" 200 85

From the dev instance where it works: - - [06/Apr/2020:17:15:22 +0200] "POST /App/webif.awr HTTP/1.1" 200 1251

the phone is only getting 85 bytes sent back to it - this is when you are getting the error.
but when the login is valid, it send 1251 bytes.
this makes sense.

so I'm missing something in the last msg from you - if it logged in and authenticated and sent the dashboard, then those lines in the Tomcat log should look different than those above. My .awmn login sends back 4500 bytes

Who is online

Users browsing this forum: Google [Bot] and 20 guests