Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

I'm getting a really weird bug or issue...
Started by thomas6 Nov 15 2018 07:15 AM

- - - - -
8 replies to this topic
network request bug issue updating screen weird
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

Hi all,

 

I'm getting a really weird issue that is driving me crazy...

 

For some reason my screen does not update visually with the code that is in a listener function following a netwerk request.

 

EXCEPT, and that's the weird part: as soon as I touch the home button, I see the graphics (text objects, in this case) update, in the split second right before the app "minimises". After that, re-opening it by using the app icon, everything is updated.

 

The code is fairly simple, to be honest, so I'm really at my wit's end about this. Also, the network request is succesful - one of my graphical updates is showing the network response in a text object, and as I said, when I minimise the app, the change appear, but somehow the screen does not update visually otherwise.

 

Does this sound like something someone has come across and potentially has a solution for?

 

thanks,

Thomas

 

p.s. This is unrelated to my questions yesterday about a dynamic config.lua file. This config.lua file is bog standard.



[TOPIC: post.html]
#2

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

More weirdness: rebooting the iPad fixed the issue. Let's hope it's not temporary!

 

Could this be related to live builds somehow? The app is running as a live build at the moment.



[TOPIC: post.html]
#3

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,000 posts
  • Corona SDK

It could be live build related. If you're losing network connectivity to your local area network.

 

Rob



[TOPIC: post.html]
#4

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

hi Rob, it doesn't appear to be about network connectivity though. Or at least, that's what I'm assuming, since the event.response is succesful.



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,000 posts
  • Corona SDK

If your iPad is a 4G model, you could drop your wifi connecting, complete the network.request() and reconnect to wifi and never notice it, but if the app tries to check the live build server while it's off wifi, it could go into an odd state.  

 

network.request() is a call that could easily survive a brief drop from wifi (even without a 4G model) and you might never notice it. Live build networking isn't the same as a stateless connection to a web server.

 

Rob



[TOPIC: post.html]
#6

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

Hi Rob. Thanks for the quick help, as always.

 

I still have the feeling it's not about network stuff: the iPad is not 4G (so it's using the wi-fi connection). Furthermore the weird thing is that it just does not seem to execute the listener, visually. But then, oddly enough, as soon as you minimise, the screen updates visually...



[TOPIC: post.html]
#7

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

Okay, new info: I published a real dev build, so no live build.

 

The network response is now: " The resource could not be loaded because the App Transport Security policy requires the use of a secure connection ". Is this a permissions thing? Do you know if this is on the Corona side, or the PHP/mySQL side?



[TOPIC: post.html]
#8

thomas6

[GLOBAL: userInfoPane.html]
thomas6
  • Contributor

  • 827 posts
  • Corona SDK

Sorry, I should have looked up the docs first. Found this, and will try it out:

 

https://docs.coronalabs.com/guide/hardware/appleATS/index.html



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,000 posts
  • Corona SDK

You're fast. I was just getting ready to point you to that page. Apple doesn't like http: connections, they want you on https:

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: network, request, bug, issue, updating, screen, weird