iOS 13 Beta: evaluateJavaScript Broken

I have been able to confirm that the evaluateJavaScript function is not functioning as expected in the latest iOS 13 public beta. Here is the script in question:


let url = "http://Living-Room.local";
let wv = new WebView();
await wv.loadURL(url);

var js = `
function runit() {
     document.getElementsByTagName('input').item('1').value = 'https://www.radiantmediaplayer.com/media/bbb-360p.mp4'; 
     document.getElementsByClassName('submit-button')['0'].click();
  }
  
  runit();
`;

wv.evaluateJavaScript(js, false);

This loads the VLC app’s Remote Playback locally hosted site from my AppleTV and attempts to insert the URL into a text field and hit play. On my iPad running iOS 12 there are no problems (I see the video file begin to load on my Apple TV) but on my iPhone XS running iOS 13 the script doesn’t error out but I see nothing in the VLC app.

I’ve also confirmed the script works when using a web browser on my desktop computer.

Is this a known issue? Any plans on a fix?

What version of Scriptable are you using? Is it the latest version available through TestFlight - v1.4(101) I think?

I’m on the latest version through the app store: 1.3.4. I’m happy to beta test 1.4. How can I get access?

I’m not sure right now. Simon put something out on Twitter some time back about signing up, but that’s been and gone.

Just be aware that if you are running iOS13 beta and not beta apps updated for iOS13, you may well encounter issues that are known and fixed.

I don’t know if this one is fixed as I haven’t taken the leap to the OS beta just yet.

Yeah I’m an iOS dev myself and understand the challenges that come with betas. However I also appreciate when users let me know about broken experiences as a result from the beta so I can fix it before public release.

@simonbs just as a heads up I have found a workaround for this iOS 13 issue for now. I have added a call to setTimeout in order to delay the button click half a second and for whatever reason that has resolved the issue. This isn’t an issue on iOS 12 or via Safari desktop browser. Just FYI.


let url = "http://Living-Room.local";
let wv = new WebView();
await wv.loadURL(url);

var js = `
function runit() {
     document.getElementsByTagName('input').item('1').value = 'https://www.radiantmediaplayer.com/media/bbb-360p.mp4'; 

    setTimeout(function() {
      document.getElementsByClassName('submit-button')['0'].click();
    }, 500);
  }
  
  runit();
`;

wv.evaluateJavaScript(js, false);

Thanks for the heads up! I’ll look into it and see if its caused by a bug in Scriptable or if its a new behavior in iOS 13.

This might not be helpful but I am on the beta as well and Scritpable acts like it’s empty. Whenever I save a script or a starter one it just disappears.

No worries though I am on a beta so all good.

We should probably move this to a separate thread, but this is resolved in the latest release!