Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19596] Cannot load docx into webview from SDK3.4.x

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionWon't Do
Resolution Date2019-11-19T22:36:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsdocx, webview
ReporterPhil Delalande
AssigneeUnknown
Created2014-11-18T03:02:36.000+0000
Updated2019-11-19T22:36:52.000+0000

Description

What worked up to SDK3.3.x is I could load a hosted docx file in a webview.
var webview = Titanium.UI.createWebView({url:'link/to/file.docx'});
From SDK3.4.x it starts loading the document up to the first table, then times out with this console error:
[DEBUG] :  New scheme: <NSMutableURLRequest: 0x78fbeec0> { URL: http://www.myurl.com/.../b4b8bfcee.docx }
[DEBUG] :  2014-11-18 10:53:48.814 myApp[61079:13647576] *** Assertion failure in +[WMTableCellStyle resolveStyleColorWithPercentage:foregroundColor:backgroundColor:], /SourceCache/OfficeImport_Sim/OfficeImport-222/qlviewer/WordMapper/WMTableCellStyle.mm:272
[DEBUG] :  2014-11-18 10:53:48.820 myApp[61079:13647576] EXCEPTION NSInternalInconsistencyException: Foreground color is not set.
I am generating docx files with phpWord and there is no Foreground Color attribute that can be set.

Comments

  1. Rakhi Mitro 2015-08-24

    Hello, I have tested this issue in updated environment. This works fine for iOS but not working in android . *Test Environments:* Operating System= Mac OS X, Version 10.10.1 CLI Version = 4.0.1 Titanium SDK Version = 4.1.0.GA Android: Google Galaxy Nexus - 4.1.1 - API 16 - 720x1280 Appc Studio: Appcelerator Studio, build: 4.1.1.201507141126 iOS SDK: 8.1,iOS Simulator: iPhone 4s *Test code:* app.js
       
       
           var win1 = Ti.UI.createWindow();
       
       
           var document = Ti.UI.createWebView({
       
       
               url: 'test_document.docx',
       
       
           });
       
       
           win1.add(document);
       
       
           win1.open();
       
       
    Thanks
  2. Alan Hutton 2019-11-19

    Closing issue as "Won't do." This is by design. Android does not support docx files for web view.

JSON Source