Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-27159

iOS: Ti.UI.WebView cannot load html files from cache

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: Release 8.0.0
    • Fix Version/s: Release 9.0.0
    • Component/s: iOS
    • Environment:

      Ti 8.0.0.GA iOS

    • Story Points:
      5
    • Sprint:
      2019 Sprint 17, 2019 Sprint 18, 2019 Sprint 19, 2019 Sprint 20, 2019 Sprint 21, 2019 Sprint 22, 2019 Sprint 23, 2019 Sprint 24, 2020 Sprint 1, 2020 Sprint 2

      Description

      Note: Issue can be reproduced only on device, webview works as expected on simulator
      New WebView fails to load html files stored in the app with the error:

      default	11:34:49.407006 +0300	com.apple.WebKit.Networking	0x1075e8000 - NetworkResourceLoader::startNetworkLoad: (pageID = 5, frameID = 1, resourceID = 1, isMainResource = 1, isSynchronous = 0)
      default	11:34:49.407054 +0300	com.apple.WebKit.Networking	Task <0AF948FB-871A-4EDD-A632-D67CBB10B3BC>.<1> resuming, QOS(0x19)
      default	11:34:49.407103 +0300	com.apple.WebKit.Networking	[Telemetry]: Activity <nw_activity 16:2 [3A7E50A1-6DED-43AC-8750-A3865F7FCB48] (reporting strategy default)> on Task <0AF948FB-871A-4EDD-A632-D67CBB10B3BC>.<1> was not selected for reporting
      error	11:34:49.407332 +0300	kernel	Sandbox: com.apple.WebKit(10340) deny(1) file-read-data /private/var/mobile/Containers/Data/Application/B7D5C2EF-634E-4F7E-A7EC-BAB4DDF48868/Library/Caches/307/platform_article_1112110663/article.html
      default	11:34:49.407402 +0300	com.apple.WebKit.Networking	0x1075e8000 - NetworkResourceLoader::startNetworkLoad: (pageID = 5, frameID = 1, resourceID = 1, description = LocalDataTask <0AF948FB-871A-4EDD-A632-D67CBB10B3BC>.<1>)
      error	11:34:49.407557 +0300	com.apple.WebKit.Networking	Task <0AF948FB-871A-4EDD-A632-D67CBB10B3BC>.<1> finished with error - code: 1
      error	11:34:49.407608 +0300	com.apple.WebKit.Networking	Task <0AF948FB-871A-4EDD-A632-D67CBB10B3BC>.<1> load failed with error Error Domain=kCFErrorDomainCFNetwork Code=1 UserInfo={_NSURLErrorRelatedURLSessionTaskErrorKey=<private>, _NSURLErrorFailingURLSessionTaskErrorKey=<private>} [1]
      default	11:34:49.408142 +0300	com.apple.WebKit.Networking	0x1075e8000 - NetworkResourceLoader::didFailLoading: (pageID = 5, frameID = 1, resourceID = 1, isTimeout = 0, isCancellation = 0, isAccessControl = 0, errCode = 1)
      

      Reading iOS documentation I noticed that local files should be loaded using loadFileURL method as in https://github.com/appcelerator-modules/Ti.WKWebView/blob/master/ios/Classes/TiWkwebviewWebView.m#L198 but I don't see that in https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiUIWebView.m#L664

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vijaysingh Vijay Singh
                Reporter:
                nipoul Nikos Poulios
                Reviewer:
                Jan Vennemann
                Tester:
                Lokesh Choudhary
              • Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Source Code