System.openURL bugs Storyboard

Hi all

I’m currently testing my app in order to put it up on the Windows app store. It still uses Storyboard as it was developed quite a while ago.

The line below is called upon entering the scene:

[lua]system.openURL(“www.google.com”)[/lua]

After this has been called, trying to go to another scene simply doesn’t work. It calls the exitScene function, but it does not actually switch to the specified scene.
 

I can confirm it is ‘openURL’ causing an issue because everything works fine again when commenting that line out.

I do understand Storyboard is pretty much deprecated, but it would be cost ineffective to switch over to Composer at this stage of the project. If anyone has any info on this it would be greatly appreciated!

I don’t see how system.openURL() can impact storyboard, composer, or anything else in the scene.

When you call the function, does it actually display the web page?

Yep, it opens the web page in a separate browser. 

I can’t see it being caused by anything else because this issue only occurs on the Win32 simulator (and when compiled to an executable). I’ve also tried it on an entirely different scene and I’m getting the same result. iOS, OSX and Android are working fine. 

I’m on the latest public release of Corona (2016.2830).

We can’t reproduce it on our end.

Can you send us a simple project that can reproduce this please?

You can do so by clicking the “Report a Bug” at the top of the page.

Also, I highly doubt that there is anything wrong with system.openURL() since it does nothing with native UI.

I suspect that the issue here is that you’re invoking system.openURL() duing a “touch” event’s down phase, which will cause your app to lose the desktop’s focus when displaying the web browser, which means that you’ll not receive the “touch” event’s up phase since your app (which has lost the focus) will stop receiving mouse events from Windows.  This might be putting your app in a bad state.  A simple solution to this would be to invoke system.openURL() via the up phase… or even simpler, use a “tap” event which is the equivalent to a mouse “click” event on the desktop.  A tap/click is registered have a down-to-up touch/click.

I don’t see how system.openURL() can impact storyboard, composer, or anything else in the scene.

When you call the function, does it actually display the web page?

Yep, it opens the web page in a separate browser. 

I can’t see it being caused by anything else because this issue only occurs on the Win32 simulator (and when compiled to an executable). I’ve also tried it on an entirely different scene and I’m getting the same result. iOS, OSX and Android are working fine. 

I’m on the latest public release of Corona (2016.2830).

We can’t reproduce it on our end.

Can you send us a simple project that can reproduce this please?

You can do so by clicking the “Report a Bug” at the top of the page.

Also, I highly doubt that there is anything wrong with system.openURL() since it does nothing with native UI.

I suspect that the issue here is that you’re invoking system.openURL() duing a “touch” event’s down phase, which will cause your app to lose the desktop’s focus when displaying the web browser, which means that you’ll not receive the “touch” event’s up phase since your app (which has lost the focus) will stop receiving mouse events from Windows.  This might be putting your app in a bad state.  A simple solution to this would be to invoke system.openURL() via the up phase… or even simpler, use a “tap” event which is the equivalent to a mouse “click” event on the desktop.  A tap/click is registered have a down-to-up touch/click.