Sys.open_url() doesn't work with HTML5

I’m trying to open url with sys.open_url(). Code below:

sys.open_url("https://www.defold.com")

I have following error:

exception thrown: InvalidAccessError: A parameter or an operation is not supported by the underlying object,_dmSysOpenURL@https://localhost:8080/gun.js:1:1796373
HHa@https://localhost:8080/gun.js:12:1
vla@https://localhost:8080/gun.js:6:1
ysa@https://localhost:8080/gun.js:11:1
tua@https://localhost:8080/gun.js:11:1
Asa@https://localhost:8080/gun.js:11:1
asa@https://localhost:8080/gun.js:11:1
J3a@https://localhost:8080/gun.js:17:1
invoke_vii@https://localhost:8080/gun.js:1:1856777
tsa@https://localhost:8080/gun.js:11:1
Dsa@https://localhost:8080/gun.js:11:1
Rra@https://localhost:8080/gun.js:11:1
rja@https://localhost:8080/gun.js:6:1
$ia@https://localhost:8080/gun.js:6:1
WPa@https://localhost:8080/gun.js:7:1
aQa@https://localhost:8080/gun.js:7:1
gw@https://localhost:8080/gun.js:14:1
vn@https://localhost:8080/gun.js:10:1
wn@https://localhost:8080/gun.js:10:1
Tj@https://localhost:8080/gun.js:10:1
_j@https://localhost:8080/gun.js:10:1
I3a@https://localhost:8080/gun.js:17:1
dynCall@https://localhost:8080/gun.js:1:5743
Browser_mainLoop_runner/<@https://localhost:8080/gun.js:1:1719420
runIter@https://localhost:8080/gun.js:1:1720996
Browser_mainLoop_runner@https://localhost:8080/gun.js:1:1719354
a.prototype.$2/window[a]</<@https://connect.facebook.net/en_US/fbinstant.6.2.js:95:485
dmloader.js:303:32
printErr
https://localhost:8080/dmloader.js:303:32
runIter
https://localhost:8080/gun.js:1:1721087
Browser_mainLoop_runner
https://localhost:8080/gun.js:1:1719354
a.prototype.$2/window[a]</<
https://connect.facebook.net/en_US/fbinstant.6.2.js:95:485

What am I doing wrong?

Have you tried adding that single line to a new, empty project with just a script? I just tried that and it works fine in a macOS editor build as well as html5.

2 Likes

Yes. You are right. It works fine as simple html5 app.

We have a problem when we run the HTML5 app as published Facebook instant game.

Are there any ways to solve this problem?

Pls, read guidelines of Instant Games:

Your game should not:
Link outside to any other website or app. The only exception is linking to a privacy policy page.

3 Likes

Yes. We need a link to a privacy policy page.

You can have a link visible in your app without it actually being clickable. For example, I put it on my splashpage

publisherdomain .com/privacy

1 Like