Issues with Mobile web page

A place to report bugs and discuss testing
Message
Author
mpinnie
Posts: 55
Joined: Tue Jan 21, 2014 11:38 am
Location: Namibia

Re: Issues with Mobile web page

#41 Post by mpinnie » Tue Dec 15, 2015 1:58 pm

Ok so I disabled the firewall and port forwarded TCP and UDP.

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Issues with Mobile web page

#42 Post by Vaughn » Tue Dec 15, 2015 2:17 pm

mpinnie wrote:Ok so I disabled the firewall and port forwarded TCP and UDP.
Does that imply it did not help?

Earlier you were saying you found those 3 links that did not work, but can you confirm one of the api calls that does work? Because if ANY calls works, that rules out all firewall or json blocking issues. If I can look at the api call that does work, maybe I can find a difference in what they return or something.

A rest web service is really simple, and hardly any code that I can look at. After that log entry is written confirming how many objects are written, only 1 line of code runs

Log.Debug("Looking up objects of the type: " + type + ". I Found " + objects.Count + ".");
return objects;

So we confirmed it found the objects in your log, all it does after that is automatic, it just passes that "objects" back to the browser... But your browsers show my .json, so it is working on both side, and I am lost as to whatever the issue might be. I need to find some other clue...

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Issues with Mobile web page

#43 Post by Vaughn » Tue Dec 15, 2015 2:27 pm

For example, all 3 of those links return an Object Collection.

http://localhost:8732/api/object/SYSTEM/state

Does not return an object collection... Maybe it works, if it does, it is a possible clue at least..

mpinnie
Posts: 55
Joined: Tue Jan 21, 2014 11:38 am
Location: Namibia

Re: Issues with Mobile web page

#44 Post by mpinnie » Tue Dec 15, 2015 2:38 pm

Here is a list of some that work and the ones that does not:

localhost:8732/api/system/states --uri in the browser

["HOME","AWAY","SLEEP"] -- what the browser returns

localhost:8732/api/objects/type/PLACE --uri in browser

Looking up objects of the type: PLACE. I Found 2. ---server log

localhost:8732/api/objects/container/HOUSE

Looking up objects in container: HOUSE. I Found 6. ---server log

localhost:8732/api/objects/basetype/PLACE

Looking up objects of the base type: PLACE. I Found 9. ---server log

with these 3 the browser says the connection was reset, but the server log says that the command was received.

and the one you gave me

http://localhost:8732/api/object/SYSTEM/state

returns this:

{"LastStateChange":"\/Date(1450031991000+0200)\/","StateLabel":"Away","TimeInState":186978,"Value":"AWAY"}

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Issues with Mobile web page

#45 Post by Vaughn » Tue Dec 15, 2015 2:59 pm

Well, I apologize for the difficulties, and thank you for your help in troubleshooting this. Matt wrote this code, and I never even used the REST interface other that 1-2 test runs in the past, but doing my best and getting to understand it all.

Your last post is good and bad news. Good news is all doubts as to firewall issues are gone and so are possibilities of json being blocked or something. The bad news is it still leaves a big mystery as to the cause. (You can turn Windows firewall back on, then test with that last link and make sure you are still getting the json back, or adjust your settings...)

Let me look at it some more. I will compile a list of links for you to easily click. Second, I will try to put some odd data in my db, incase ' in names are breaking the .json, or something like that (malformed json responses). I will add logging to more of the commands.

Do you have google chrome or something that you can try to see if it is a parsing issue with that particular browser, in order to get a second test source besides Android?

Well, I am going to get back to work on it.

mpinnie
Posts: 55
Joined: Tue Jan 21, 2014 11:38 am
Location: Namibia

Re: Issues with Mobile web page

#46 Post by mpinnie » Tue Dec 15, 2015 3:05 pm

No problem I am very great full that you are helping me, I hope I'm not taking away too much time from you.
When I test the commands I do it from the local computer with Firefox and chrome then from a networked pc and after that from the android device.

mpinnie
Posts: 55
Joined: Tue Jan 21, 2014 11:38 am
Location: Namibia

Re: Issues with Mobile web page

#47 Post by mpinnie » Wed Dec 16, 2015 5:53 am

I Installed 047 on my laptop and it does the same thing. Could it be something that I am doing wrong during install?

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Issues with Mobile web page

#48 Post by Vaughn » Wed Dec 16, 2015 8:21 am

I just pulled out the laptop I also use for testing, it was the last machine I installed 047 on before releasing. I pulled up the mobile web site on it and it works fine too.

There is nothing during installing that you could mess up that I know of. You are using the default web server, right? (UWS)

This rest service comes from .NET 3.5, so I can't see your machines being out of date or anything like that either.

We really need a second user with these problems to help the differential.


Did you ever clear your Windows logs and then run the failing links to see if the browsers are writing any error messages to Windows? Your machines are both 64-bit, Windows 10, all patched I assume..

I could log into your machine, but I don't know what I would look at other than the stuff we already covered here. On my laptop for example, I just logged into the main website to make sure it created the first user account, then I went straight to the mobile site... Nothing modified at all from the initial install, and it works, so it should not be related to having to do anything to OSA data, etc...

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Issues with Mobile web page

#49 Post by Vaughn » Wed Dec 16, 2015 8:29 am

I always test against the default path of C:\Program Files\OSA. Not sure how that could have anything to do with anything, but wanted to confirm you are not using custom install locations, else I could do a test run with a modified location..

mpinnie
Posts: 55
Joined: Tue Jan 21, 2014 11:38 am
Location: Namibia

Re: Issues with Mobile web page

#50 Post by mpinnie » Wed Dec 16, 2015 9:19 am

I'm using the default installation paths and both my laptop and pc are windows 7 sp1 64bit.
I will look at the logs later today.

Post Reply