Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 8.1.0
-
Fix Version/s: Release 9.0.3
-
Component/s: Android
-
Labels:
-
Sprint:2020 Sprint 10, 2020 Sprint 11, 2020 Sprint 12
Description
Since SDK version 8.1.0 I have been unable to specify a URL for a webview that uses a local HTML file with variables in the URL. I pass things like the UDID and other variables to a local HTML file in an Android app. This worked fine up till SDK 8.0.2. It says the file is not found when I add any variable to the local file. Using a remote file has no issue.
var win = Ti.UI.createWindow({
|
backgroundColor: '#fff' |
});
|
|
|
var webview = Ti.UI.createWebView({
|
top: '7dp', |
height: '100%', |
width: '100%', |
url: 'http://google.com', |
});
|
|
win.add(webview);
|
|
var testVar = -40.1; |
|
webview.url = '/index.html?data=' + testVar; |
|
win.open();
|
The above example fails to run with the following error, I have tired with every SDK after 8.0.2.
RROR] : TiAssetHelper: Error while opening asset "Resources/index.html?data=-40.1": |
[ERROR] : TiAssetHelper: java.io.FileNotFoundException: Resources/index.html?data=-40.1 |
[ERROR] : TiAssetHelper: at android.content.res.AssetManager.nativeOpenAsset(Native Method)
|
[ERROR] : TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:744) |
[ERROR] : TiAssetHelper: at android.content.res.AssetManager.open(AssetManager.java:721) |
[ERROR] : TiAssetHelper: at org.appcelerator.kroll.util.KrollAssetHelper.openAsset(KrollAssetHelper.java:140) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.io.TiResourceFile.getInputStream(TiResourceFile.java:71) |
[ERROR] : TiAssetHelper: at ti.modules.titanium.ui.widget.webview.TiUIWebView.setUrl(TiUIWebView.java:616) |
[ERROR] : TiAssetHelper: at ti.modules.titanium.ui.widget.webview.TiUIWebView.processProperties(TiUIWebView.java:464) |
[ERROR] : TiAssetHelper: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1293) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:511) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:501) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:467) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:518) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:501) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:467) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:607) |
[ERROR] : TiAssetHelper: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:328) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:57) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:573) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:721) |
[ERROR] : TiAssetHelper: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47) |
[ERROR] : TiAssetHelper: at android.app.Activity.performCreate(Activity.java:7136) |
[ERROR] : TiAssetHelper: at android.app.Activity.performCreate(Activity.java:7127) |
[ERROR] : TiAssetHelper: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) |
[ERROR] : TiAssetHelper: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) |
[ERROR] : TiAssetHelper: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) |
[ERROR] : TiAssetHelper: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) |
[ERROR] : TiAssetHelper: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) |
[ERROR] : TiAssetHelper: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) |
[ERROR] : TiAssetHelper: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) |
[ERROR] : TiAssetHelper: at android.os.Handler.dispatchMessage(Handler.java:106) |
[ERROR] : TiAssetHelper: at android.os.Looper.loop(Looper.java:193) |
[ERROR] : TiAssetHelper: at android.app.ActivityThread.main(ActivityThread.java:6669) |
[ERROR] : TiAssetHelper: at java.lang.reflect.Method.invoke(Native Method)
|
[ERROR] : TiAssetHelper: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) |
[ERROR] : TiAssetHelper: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) |
[ERROR] : TiExceptionHandler: (main) [668,790] null |
[ERROR] : TiExceptionHandler:
|
[ERROR] : TiExceptionHandler: java.io.Reader.<init>(Reader.java:78) |
[ERROR] : TiExceptionHandler: java.io.InputStreamReader.<init>(InputStreamReader.java:97) |
[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.webview.TiUIWebView.setUrl(TiUIWebView.java:617) |
[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.widget.webview.TiUIWebView.processProperties(TiUIWebView.java:464) |
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1293) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:511) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:501) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:467) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:518) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:501) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:467) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:607) |
[ERROR] : TiExceptionHandler: ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:328) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:57) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:573) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:721) |
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47) |
[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7136) |
[ERROR] : TiExceptionHandler: android.app.Activity.performCreate(Activity.java:7127) |
[ERROR] : TiExceptionHandler: android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) |
[ERROR] : TiExceptionHandler: android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) |
[ERROR] : TiExceptionHandler: android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) |
[ERROR] : TiExceptionHandler: android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) |
[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) |
[ERROR] : TiExceptionHandler: android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) |
[ERROR] : TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808) |
[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106) |
[ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:193) |
[ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6669) |
[ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)
|
[ERROR] : TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) |
[ERROR] : TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) |
Attachments
Issue Links
- relates to
-
TIMOB-28135 Ti.UI.WebView Test Suite: Titanium.UI.WebView TIMOB-27795 Android only
-
- Open
-