Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26330] Android: WebView does not load when Custom Useragent is set

GitHub Issuen/a
TypeBug
PriorityNone
StatusResolved
ResolutionDuplicate
Resolution Date2018-08-23T09:41:07.000+0000
Affected Version/sRelease 7.3.0, Release 7.3.1
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterKeerthi Mahalingam
AssigneeUnknown
Created2018-08-22T18:50:33.000+0000
Updated2018-08-23T09:41:35.000+0000

Description

Steps to reproduce:

1.Use the code below in app.js
var win = Ti.UI.createWindow({
    backgroundColor : 'black',
    layout : 'vertical'
});
 
var webview = Titanium.UI.createWebView({url:'https://www.appcelerator.com'});
webview.setUserAgent('test');
 
webview.addEventListener('beforeload', function(e){
	Ti.API.info("beforeload = e.url=" + e.url);
	
	
	
});
webview.addEventListener('load', function(e){
	Ti.API.info("load = e.url=" + e.url);
	Ti.API.info("userAgent = agent=" + e.userAgent);
 
	
});
 
win.add(webview);
 
win.open(); 

Actual results:

1.The web view does not load

Expected results:

1.Web VIiew should load successfully

Comments

  1. Hans Knöchel 2018-08-23

    Duplicate of TIMOB-26325, fixed in 7.3.1. Workaround: Set the userAgent property on creation of the web-view.

JSON Source