Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13991

www files are required to be readonly

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • cordova-windows
    • None

    Description

      See CB-5421 for original context.

      Currently if a developer makes their www/index.html file readonly, the resulting /platforms/windows/www/index.html file is also readonly, and windows build tooling requires that it NOT be read-only for ensuring utf-8 and BOM.

       

      This can result in an error like the following:

      D:\path>phonegap platforms add windows@6
      Using cordova-fetch for cordova-windows@6
      
      
      Adding windows project...
      
      
      Creating Cordova Windows Project:
      
              Path: platforms\windows
              Namespace: com.example.mobile
              Name: Mobile app
      
      Windows project created with cordova-windows@6.0.0
      
      (node:6248) UnhandledPromiseRejectionWarning: Error: EPERM: operation not permitted, open 'D:\path\platforms\windows\www\index.html'
          at Object.fs.openSync (fs.js:667:18)
          at Object.fs.writeFileSync (fs.js:1326:33)
          at addBOMToFile (D:\path\platforms\windows\cordova\lib\prepare.js:686:12)
          at Array.forEach (<anonymous>)
          at addBOMSignature (D:\path\platforms\windows\cordova\lib\prepare.js:665:1
      0)
          at D:\path\platforms\windows\cordova\lib\prepare.js:625:13
          at _fulfilled (D:\path\platforms\windows\cordova\node_modules\q\q.js:854:5
      4)
          at self.promiseDispatch.done (D:\path\platforms\windows\cordova\node_modul
      es\q\q.js:883:30)
          at Promise.promise.promiseDispatch (D:\path\platforms\windows\cordova\node
      _modules\q\q.js:816:13)
          at D:\path\platforms\windows\cordova\node_modules\q\q.js:624:44
      
      (node:6248) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either b
      y throwing inside of an async function without a catch block, or by rejecting a promise which was not han
      dled with .catch(). (rejection id: 1)
      (node:6248) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, pro
      mise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

      Attachments

        Activity

          People

            purplecabbage Jesse MacFadyen
            purplecabbage Jesse MacFadyen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: