Automate “Dialog web” always goes to NO path

91 views
Skip to first unread message

Abhishek Verma

unread,
Feb 8, 2026, 6:12:21 AM (2 days ago) Feb 8
to Automate for Android
Goal:
I want the Dialog web block to show an HTML page, let the user enter a value, and then go to the YES path when the user confirms.

Expected behavior from documentation
The dialog should go to YES when the page redirects to http://localhost/ok
It should go to NO when redirected to http://localhost/cancel
The OK button should be enabled when the URL matches regex or when automate.setOkButtonEnabled true is used.

What is happening
YES never triggers.
The flow always goes to NO.
This happens no matter what I click.

Important note
Earlier I did not have this issue.
Everything worked fine before.
This problem started only since the day before yesterday.

Block configuration
Regular expression dot star
Timeout none
JavaScript allowed
HTML page inline

Tests done

Test 1
Code automate.setOkButtonEnabled true
Result OK button highlighted. Pressing OK still goes to NO.

Test 2
Code window.location equals http://localhost/ok
Result Dialog closes and goes to NO.

Test 3
Code window.location equals http://localhost/ok with data parameter
Result Goes to NO.

Test 4
Code set document title to test then redirect to http://localhost/ok
Result NO.

Test 5
Code anchor link to http://localhost/ok
Result NO.

Test 6
Auto redirect on load to http://localhost/ok
Result NO.

Test 7
Code add event listener for automate ok and prevent default
Result OK becomes disabled and dialog goes to NO which is expected.

Observation
In every test except the last, clicks were triggered but result was always NO.
In the last test, OK was disabled as expected.

Demo HTML used

<!DOCTYPE html> <html>  
<body> <h3>Automate Web Dialog All Cases</h3> <input id="val" type="text" placeholder="type something"> <button onclick="enableOk()">Enable OK</button>
<button onclick="goOk()">Redirect YES</button>
<button onclick="goOkWithData()">YES Data</button>
<button onclick="sendViaTitle()">Title YES</button>
<button onclick="goCancel()">Redirect NO</button>
<button onclick="blockOk()">Block OK</button>

<script>  
function enableOk(){  
  automate.setOkButtonEnabled(true);  
}  

function goOk(){  
  window.location="http://localhost/ok";  
}  

function goOkWithData(){  
  let v=document.getElementById("val").value;  
  window.location="http://localhost/ok?data="+encodeURIComponent(v);  
}  

function sendViaTitle(){  
  let v=document.getElementById("val").value;  
  document.title=v;  
  window.location="http://localhost/ok";  
}  

function goCancel(){  
  window.location="http://localhost/cancel";  
}  

function blockOk(){  
  window.addEventListener("automate.ok",function(e){e.preventDefault();});  
}  
</script> </body>  
</html>

1000187866.png


Questions
Is localhost ok interception broken or changed recently
Are query parameters still supported
Could this be an Android WebView issue
Any required flags besides JavaScript
Does Page URL mode affect interception

Device info
Android version 15
Automate version 1.50.0

Please let me know if you need any further information.
And thank you so much for your time.

Mahammad Rafi

unread,
Feb 8, 2026, 9:31:29 AM (2 days ago) Feb 8
to Automate for Android
href missed.  Use this

window.location.href = 'http://localhost/ok?' Value

Abhishek Verma

unread,
Feb 8, 2026, 10:14:21 AM (2 days ago) Feb 8
to Automate for Android
Nope, didn't work.

I guess the root cause is something different. Two reasons: 1. The same code/flow is working in another mobile phone. 2. I already tried with my already functional code running since 5+ days and behaving as expected. But when I ran today, I faced the above issue.

And the code snippet in the above comment was added by ChatGPT,  and it missed to add the exact smaller code which it
gave me to test.

I have also screen recorded the flow and it's bahvior.
I will try to upload that in cloud or compress that and share here for further reference.
1000187908.png

And again thank you.

Abhishek Verma

unread,
Feb 8, 2026, 1:33:15 PM (2 days ago) Feb 8
to Automate for Android
I further did some research and analysis.

And below are the findings:


Troubleshooting steps already performed:
Cleared Automate app storage and cache
Cleared Chrome cache
Cleared Android System WebView storage and cache
Uninstalled and reinstalled Android System WebView updates
Reinstalled Automate app
Restarted device multiple times
Tested with VPN off
Tested with Private DNS off
Verified all required permissions are granted to Automate
Confirmed Chrome and Android System WebView are up to date

None of the above changed the behavior.


Four minimal interception tests and results
Test A
Auto redirect on load to ok
<script>
window.location="http://localhost/ok";
</script>
Result
Dialog closes and NO path is taken
Meaning
Immediate redirect to ok is not detected as YES.

Test B
Manual button redirect to ok
<button onclick="window.location='http://localhost/ok'">
OK TEST
</button>
Result
NO path
In some runs the OK button in the dialog UI remained disabled
Meaning
User initiated navigation to ok is not detected.

Test C
Manual button redirect to cancel
<button onclick="window.location='http://localhost/cancel'">
CANCEL TEST
</button>
Result
NO path
Meaning
Ok and cancel currently lead to the same result. Cancel may not be truly intercepted and NO may just be fallback on close.

Test D
Redirect to ok with query parameter
<button onclick="window.location='http://localhost/ok?x=123'">
OK WITH DATA
</button>
Result
NO path
Result page URL variable does not show the ok URL
Meaning
The final navigated URL may not be reported back to the block.


Device comparison
Problem device
Motorola g34 5G
Android 15
Issue occurs 100 percent of the time
Comparison device
Samsung phone
Android 15
Same flow and same HTML
YES triggers correctly
This suggests device or WebView specific behavior.


Possible explanations

Localhost interception in WebView is not firing on this device
Recent WebView or Chrome update changed localhost handling
Motorola ROM specific WebView behavior
Possible regression affecting Web Dialog on some devices

Concise summary

On this Motorola device, Web Dialog does not detect redirects to localhost ok or cancel. All such redirects close the dialog and lead to NO path. The same setup works on a Samsung device with the same Android version. Cache clears, reinstalls, and WebView resets did not help. This points to a device or WebView specific issue rather than a flow logic error.

Henrik "The Developer" Lindqvist

unread,
Feb 8, 2026, 2:32:29 PM (2 days ago) Feb 8
to Automate for Android
Works as expected when i test it. But referencing the functions in the HTML before declaring them could be an issue, proper would be:
<!DOCTYPE html>
<html>
<head>

<script>  
function enableOk(){  
  automate.setOkButtonEnabled(true);  
}  
function goOk(){  
  window.location="http://localhost/ok";  
}  
function goOkWithData(){  
  let v=document.getElementById("val").value;  
  window.location="http://localhost/ok?data="+encodeURIComponent(v);  
}  
function sendViaTitle(){  
  let v=document.getElementById("val").value;  
  document.title=v;  
  window.location="http://localhost/ok";  
}  
function goCancel(){  
  window.location="http://localhost/cancel";  
}  
function blockOk(){  
  window.addEventListener("automate.ok",function(e){e.preventDefault();});  
}  
</script>
</head>

<body>
<h3>Automate Web Dialog All Cases</h3>
<input id="val" type="text" placeholder="type something">
<button onclick="enableOk()">Enable OK</button>
<button onclick="goOk()">Redirect YES</button>
<button onclick="goOkWithData()">YES Data</button>
<button onclick="sendViaTitle()">Title YES</button>
<button onclick="goCancel()">Redirect NO</button>
<button onclick="blockOk()">Block OK</button>
</body>  
</html>

Abhishek Verma

unread,
Feb 8, 2026, 3:24:09 PM (2 days ago) Feb 8
to Automate for Android
Sorry, didn't work.

Please watch this screen recorded video demonstrating my issue.




I am not able to figure out why it's not working on my phone 😐.


Henrik "The Developer" Lindqvist

unread,
Feb 8, 2026, 7:38:30 PM (2 days ago) Feb 8
to Automate for Android
The only difference from what i tested with was that is saved the HTML to a file, then loaded in using The File read block, to avoid having to escape { and ", etc..
If you enable the Debug logging option in Automate setting then you can use a flow to view the log that should then include browser JavaScript error, etc.

Abhishek Verma

unread,
Feb 9, 2026, 4:08:32 PM (24 hours ago) Feb 9
to Automate for Android
Hi Henrik, 

I used your approach to debug the issue with help of AI and below are the findings 

Device Info:
Model: Motorola
OS: Android 15
Automate Version: 1.50.0
WebView Provider: com.google.android.webview (144.0.7559.109 / 755910933)

I tried below steps: 

1. Removed android system webview updates, and got below logs.

02-10 02:03:11.490 4995 4995 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:03:11.487 4995 4995 W amalab.automate: type=1400 audit(0.0:165589): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:03:12.315 25819 25819 W lab.automate:ui: type=1400 audit(0.0:165591): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:03:12.318 25819 25819 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:03:13.705 25819 25819 I WebDialogActivity: http://localhost/@64: Preparing to exit with: OK
02-10 02:03:15.632 25819 25819 D VRI[WebDialogActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:03:15.638 25819 25849 D Surface : Surface::disconnect
02-10 02:03:15.638 25819 25849 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.WebDialogActivity#24105(BLAST Consumer)pid:25819](id:64db00000010,api:1,p:25819,c:25819) disconnect: api 1
02-10 02:03:15.639 25819 25849 D HWUI : endAllActiveAnimators on 0xb400007d795f1400 (RippleDrawable) with handle 0xb400007d7968d2c0
02-10 02:03:15.719 4995 4995 W amalab.automate: type=1400 audit(0.0:165592): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:03:15.723 4995 4995 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:03:15.739 4995 4995 D VRI[StartActivityForResultActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:03:15.751 25819 25819 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@a1e0732
02-10 02:03:15.758 4995 4995 D Surface : Surface::disconnect
02-10 02:03:15.758 4995 4995 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.StartActivityForResultActivity#24089(BLAST Consumer)pid:4995](id:13830000007f,api:2,p:4995,c:4995) disconnect: api 2
02-10 02:03:15.759 4995 4995 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@4501e1e
02-10 02:03:15.768 25819 25819 E chromium: [ERROR:android_webview/browser/aw_browser_terminator.cc:165] Renderer process (27412) crash detected (code -1).



2.
I again updated the system webview app and got below errors
------- beginning of main
02-10 02:06:00.067 28571 28571 D VRI[FlowDetailsActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:06:00.084 28571 28591 D Surface : Surface::disconnect
02-10 02:06:00.084 28571 28591 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.FlowDetailsActivity#24381(BLAST Consumer)pid:28571](id:6f9b00000001,api:1,p:28571,c:28571) disconnect: api 1
02-10 02:07:01.896 28571 28571 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:07:01.891 28571 28571 W lab.automate:ui: type=1400 audit(0.0:165666): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:07:04.397 4995 4995 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:07:04.391 4995 4995 W amalab.automate: type=1400 audit(0.0:165668): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:07:05.223 28571 28571 W lab.automate:ui: type=1400 audit(0.0:165670): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:07:05.227 28571 28571 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:07:06.323 28571 28571 I WebDialogActivity: http://localhost/@64: Preparing to exit with: OK
02-10 02:07:07.317 28571 28571 D VRI[WebDialogActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:07:07.322 28571 28591 D Surface : Surface::disconnect
02-10 02:07:07.322 28571 28591 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.WebDialogActivity#24549(BLAST Consumer)pid:28571](id:6f9b00000005,api:1,p:28571,c:28571) disconnect: api 1
02-10 02:07:07.323 28571 28591 D HWUI : endAllActiveAnimators on 0xb400007da60d0000 (RippleDrawable) with handle 0xb400007da62f8d40
02-10 02:07:07.449 4995 4995 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:07:07.443 4995 4995 W amalab.automate: type=1400 audit(0.0:165671): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:07:07.468 4995 4995 D VRI[StartActivityForResultActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:07:07.475 4995 4995 D Surface : Surface::disconnect
02-10 02:07:07.475 4995 4995 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.StartActivityForResultActivity#24533(BLAST Consumer)pid:4995](id:138300000086,api:2,p:4995,c:4995) disconnect: api 2
02-10 02:07:07.476 4995 4995 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@889b88b
02-10 02:07:07.488 28571 28571 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@21419ee

On retry step 2
02-10 02:08:01.904 28571 28571 D VRI[WebDialogActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:08:01.923 28571 28591 D Surface : Surface::disconnect
02-10 02:08:01.924 28571 28591 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.WebDialogActivity#24705(BLAST Consumer)pid:28571](id:6f9b00000014,api:1,p:28571,c:28571) disconnect: api 1
02-10 02:08:01.924 28571 28591 D HWUI : endAllActiveAnimators on 0xb400007d8cfee400 (RippleDrawable) with handle 0xb400007daf44e420
02-10 02:08:02.027 4995 4995 W amalab.automate: type=1400 audit(0.0:165703): avc: denied { read } for name="u:object_r:vendor_display_prop:s0" dev="tmpfs" ino=2970 scontext=u:r:untrusted_app:s0:c76,c258,c512,c768 tcontext=u:object_r:vendor_display_prop:s0 tclass=file permissive=0 app=com.llamalab.automate
02-10 02:08:02.032 4995 4995 W libc : Access denied finding property "vendor.display.enable_optimal_refresh_rate"
02-10 02:08:02.053 4995 4995 D VRI[StartActivityForResultActivity]: visibilityChanged oldVisibility=true newVisibility=false
02-10 02:08:02.062 4995 4995 D Surface : Surface::disconnect
02-10 02:08:02.062 4995 4995 D BufferQueueProducer: [com.llamalab.automate/com.llamalab.automate.StartActivityForResultActivity#24689(BLAST Consumer)pid:4995](id:138300000089,api:2,p:4995,c:4995) disconnect: api 2
02-10 02:08:02.063 4995 4995 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@b6fe82b
02-10 02:08:02.067 28571 28571 W WindowOnBackDispatcher: sendCancelIfRunning: isInProgress=false callback=android.view.ViewRootImpl$$ExternalSyntheticLambda11@40428d1

Abhishek Verma

unread,
2:19 AM (13 hours ago) 2:19 AM
to Automate for Android
Still issue not resolved, even though I am not getting the chromium error now.

Please find the flow link


And the system logs along with the exact code I ran and the html file I used.
index.html
logcat&.txt

Henrik "The Developer" Lindqvist

unread,
1:27 PM (2 hours ago) 1:27 PM
to Automate for Android
As said, referencing the functions in the HTML before declaring them could be an issue.
Reply all
Reply to author
Forward
0 new messages