Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14478] iOS7: Filesystem - is not working, returning Script Error

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-08-12T21:08:24.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 16, 2013 Sprint 16 API, Release 3.1.2, Release 3.2.0
ComponentsiOS
Labelsios7, qe-3.0.1, qe-3.1.1, qe-closed-3.1.2, qe-testadded
ReporterOlga Romero
AssigneeIngo Muschenetz
Created2013-07-03T16:32:29.000+0000
Updated2015-02-02T20:47:10.000+0000

Description

To reproduce: 1. Install and run KS> Platform> Filesystem Actual result:
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Resources Directory :file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/KitchenSink.app/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Temp Directory :file:///private/var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/tmp/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Application Directory :file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/Applications/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Application Data Directory :file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/Documents/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Application Support Directory :file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/Library/Application%20Support/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] External Storage Available :false
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Separator :/
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] Line Ending :
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] file = [object TiFilesystemFile]
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [INFO] contents blob object = undefined
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [ERROR] Script Error {
	    backtrace = "#0 () at file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/KitchenSink.app/ui/common/PlatformWindow.js:61";
	    line = 22;
	    message = "'undefined' is not an object (evaluating 'contents.text')";
	    name = TypeError;
	    sourceId = 50690080;
	    sourceURL = "file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/KitchenSink.app/ui/common/platform/filesystem.js";
	}
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: JWJ handled JavaScript error!!!
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [DEBUG] Message: 'undefined' is not an object (evaluating 'contents.text')
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [DEBUG] Line number: 22
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [DEBUG] Source: file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/KitchenSink.app/ui/common/platform/filesystem.js
Jul  3 09:27:53 Europa KitchenSink[198] <Warning>: [DEBUG] Backtrace: #0 () at file:///var/mobile/Applications/0FF1FB00-5F80-46A6-9589-89441AE4F43A/KitchenSink.app/ui/common/PlatformWindow.js:61

Comments

  1. Sabil Rahim 2013-07-31

    Fixed filesystem fix from dawson
  2. Federico Casali 2013-08-09

    Verified fixed on iOS7 simulator. Console output:
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   AssertMacros: queueEntry,  file: /SourceCache/IOKitUser_Sim/IOKitUser-920.1.11/hid.subproj/IOHIDEventQueue.c, line: 512
       [INFO] :   Resources Directory :file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/KitchenSink.app/
       [INFO] :   Temp Directory :file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/tmp/
       [INFO] :   Application Directory :file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/Applications/
       [INFO] :   Application Data Directory :file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/Documents/
       [INFO] :   Application Support Directory :file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/Library/Application%20Support/
       [INFO] :   External Storage Available :false
       [INFO] :   Separator :/
       [INFO] :   Line Ending :
       [INFO] :   file = [object TiFilesystemFile]
       [INFO] :   contents blob object = Hello World. this is a filesystem read test.
       [INFO] :   contents = Hello World. this is a filesystem read test.
       [INFO] :   mime type = text/plain
       [INFO] :   Blob's file = [object TiFilesystemFile]
       [INFO] :   nativePath = file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/KitchenSink.app/etc/text.txt
       [INFO] :   Blob's file nativePath= file:///Users/fcasali/Library/Application%20Support/iPhone%20Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/KitchenSink.app/etc/text.txt
       [INFO] :   exists = true
       [INFO] :   size = 44
       [INFO] :   readonly = false
       [INFO] :   symbolicLink = true
       [INFO] :   executable = false
       [INFO] :   hidden = false
       [INFO] :   writable = true
       [INFO] :   name = text.txt
       [INFO] :   extension = txt
       [INFO] :   resolve = /Users/fcasali/Library/Application Support/iPhone Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD/KitchenSink.app/etc/text.txt
       [INFO] :   created = Fri Aug 09 2013 16:11:18 GMT-0700 (PDT)
       [INFO] :   directoryListing = app.js,app.jss,appicon.png,common.jss,debugger.plist,Default-568h@2x.png,Default.png,Default@2x.png,en.lproj,es.lproj,etc,images,Info.plist,KitchenSink,modules,PkgInfo,profiler.plist,Settings.bundle,stylesheet.plist,ui,welcome.js
       [INFO] :   getParent = /Users/fcasali/Library/Application Support/iPhone Simulator/7.0/Applications/895408AF-84B6-44AF-AD73-298C6AD839DD
       [INFO] :   spaceAvailable = 19771637760
       [INFO] :   Created mydir: true
       [INFO] :   newdir [object TiFilesystemFile]
       [INFO] :   directoryListing for newDir = newfile.txt
       [INFO] :   newfile.txt created: Fri Aug 09 2013 16:11:18 GMT-0700 (PDT)
       [INFO] :   newfile.txt modified: Fri Aug 09 2013 16:11:18 GMT-0700 (PDT)
       [INFO] :   newfile.txt renamed as b.txt: true
       [INFO] :   newfile.txt deleted (expected to fail): false
       [INFO] :   b.txt deleted: true
       [INFO] :   mydir deleted: true
       [INFO] :   directoryListing for newDir after deleteDirectory = undefined
       [INFO] :   app.js exists? true
       [INFO] :   app.js size? 4408
       [INFO] :   text.txt exists? true
       [INFO] :   text.txt size: 73 bytes
       [INFO] :   ------------
       [INFO] :   Test file contents:
       [INFO] :   text written via write()
       [INFO] :   Text from text_two.txt
       [INFO] :   Text appended via write()
       [INFO] :   Expected failure: (first parameter is "number")
       [INFO] :   Expected failure: (first parameter is "boolean")
       [INFO] :   Expected failure: (first parameter is "object")
       
       
    Titanium SDK 3.1.2.v20130808180613 Alloy 1.2.0-alpha6 Appcelerator Studio 3.1.2.201308082014 CLI 3.1.2-alpha Node 0.10.13 Xcode 5-DP5 Closing.
  3. Olga Romero 2013-08-15

    Tested and verified the fix with: Appcelerator Studio, build: 3.1.2.201308091728 Titanium SDK, build 3.1.1.GA Alloy 1.2.0 CLI 3.1.2 Device: iPhone5 iOS7

JSON Source