Issue #010 [Fixed/closed] - Safari Mobile Bug

Posted by oliver.rewald

If you want to control webiopi with your IPhone/IPad you can use every button only once. After activating and deactivating a buttonk, they stop working.

Tested on an IPhone 5 (6.0) and IPad 3 (6.0.1)


Comment 3

Posted by trouch

Tested with an iPhone 4 on iOS 6 and I cannot reproduce the bug


Comment 4

Posted by nwndarkness

I can confirm this. Tested with an iPhone 4S on iOS 6.1.


Comment 5

Posted by kim.hopmeier@alcatel-lucent.com

I can also confirm there is a problem with iPhone 5 and iPad 3 running IOS 6.1. However it works fine with iPhone 3G IOS 4.1. It looks to me like a timing issue where an update of the pin state clashes with the change pin state request from safari. The appearance is, you tap the pin and it briefly changes colour then is reset within a second without affecting the IO port.


Comment 6

Posted by trouch

Need some javascript console error log. Cannot reproduce it on my side : Works on iPhone 4@6.0.1 and Safari 6.0.6


Comment 7

Posted by acbmeister

iPhone 5 does not work. The pin states changes then rests to off with no action taken.

Using Chrome on iPhone 5 the functions work correctly.


Comment 8

Posted by macecchi

Hi. This seems to be a Mobile-Safari-only bug. When you change a pin state it goes back to what it was before.

I activated debugging and checked the mobile javascript console but there is no error output. Actually, checking the page requests from the inspector shows that the POST requests with the new values are sent successfully and they even get a response from the server with the new current value, as if it had changed. I mean, the server is responding as if it changed the value, but in fact nothing happened.

However, on Chrome for iOS, as mentioned above, works fine.

My guess... Is there anything on the server-side, in the http code, that verifies the agent from the POST requests? Because, if I am not mistaken, Chrome for iOS uses Mobile Safari's engine to render the pages, so if it was a Javascript problem, this would happen on both browsers.

Thanks!


Comment 9

Posted by trouch

If you got it working with other browser, this is not a server issue. There is no agent filtering (not yet) Do you have plugged something on the GPIO like a LED to see if the output has changed ?

You may try to start webiopi in a teminal to see if there is error to stop existing webiopi service : sudo /etc/init.d/webiopi stop then to start webiopi foreground : sudo python -m webiopi


Comment 10

Posted by gustaf.nilklint@jayway.com

I can confirm that this issue exists (running iPhone 5 ios6.0.2), would very much appreciate if anyone could come up with a solution other than using chrome. Im willing to help if need help testing or such.


Comment 11

Posted by trouch

You may try to start webiopi in a teminal to see if there is error to stop existing webiopi service : sudo /etc/init.d/webiopi stop then to start webiopi foreground : sudo python -m webiopi

On my side it works fine on Safari Mobile with an iPhone 4 on iOS6. I think I need an iPhone 5 to try it out...


Comment 12

Posted by gustaf.nilklint@jayway.com

I tried running it in foreground but no messages shown in the log.


Comment 13

Posted by Gustaf.Nilklint

I found this thread on SO that seems to be quite relevant to this issue. https://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results


Comment 14

Posted by trouch

Very nice post, thanks. I just made some changes on the trunk to add the cache control header. Can you checkout sources, install and give a try ?


Comment 15

Posted by trouch


Comment 16

Posted by Gustaf.Nilklint

That seems to do the trick! The sample index.html works like a charm. At first my own page didn't work but after resetting safari it's working aswell.

Thank you for a your fast feedback! great job with the project!


Comment 17

Posted by trouch

thanks for feedback, I close the issue so. the fix will be included in the next release.