{ "id": "173623", "key": "TIMOB-27079", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2019-05-14T09:04:29.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [], "versions": [ { "id": "19882", "name": "Release 8.0.0", "archived": false, "released": true, "releaseDate": "2019-03-14" } ], "issuelinks": [], "assignee": null, "updated": "2019-05-14T09:05:19.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Steps to reproduce the behavior*\r\n# Create a new app with a space in it's name: {{ti create -t app -n space name}}\r\n# Add the following code snipped to {{app.js}}\r\n{code}\r\nconst file = Ti.Filesystem.getFile('app.js');\r\nconsole.log(file.nativePath);\r\n{code}\r\n# Build and run the app with {{ti build -p ios}}\r\n\r\n*Actual behavior*\r\nThe app throws the following error:\r\n{code}\r\n[ERROR] Script Error {\r\n[ERROR] column = 17;\r\n[ERROR] line = 50;\r\n[ERROR] message = \"*** -[NSURL initFileURLWithPath:]: nil string parameter\";\r\n[ERROR] nativeStack = \"3 Foundation 0x00000001026c5cf3 -[NSURL(NSURL) initFileURLWithPath:] + 127\\n4 Foundation 0x00000001026c655f +[NSURL(NSURL) fileURLWithPath:] + 45\\n5 TitaniumKit0x0000000105903479 -[TiFilesystemFileProxy nativePath] + 46\\n6 TitaniumKit0x000000010591aed1 -[KrollObject valueForKey:] + 200\\n7 TitaniumKit0x0000000105918b57 KrollGetProperty + 317\\n8 JavaScriptCore 0x0000000100c24c81 _ZN3JSC16JSCallbackObjectINS_20JSDestructibleObjectEE14callbackGetterEPNS_9ExecStateExNS_12PropertyNameE + 225\\n9 JavaScriptCore 0x00000001010bafcf llint_slow_path_get_by_id + 5743\\n10 JavaScriptCore 0x0000000100be6cbd llint_entry + 25130\\n11 JavaScriptCore 0x0000000100befb71 llint_entry + 61662\\n12 JavaScriptCore 0x0000000100be08d9 vmEntryToJavaScript + 200\\n13 JavaScriptCore 0x0000000100fc51d8 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 11304\\n14 JavaScriptCore 0x0000000101238280 _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 288\\n15 JavaScriptCore 0x0000000100c1c4d4 JSEvaluateScript + 676\\n16 TitaniumKit0x0000000105957612 -[KrollEval jsInvokeInContext:exception:] + 199\\n17 TitaniumKit0x000000010591f34a -[KrollBridge loadCommonJSModule:withSourceURL:] + 321\\n18 TitaniumKit0x000000010591fd23 -[KrollBridge loadJavascriptText:fromFile:withContext:] + 68\\n19 TitaniumKit0x000000010592113c -[KrollBridge require:path:] + 400\";\r\n[ERROR] sourceURL = \"file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js\";\r\n[ERROR] stack = \" at file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js:50:17)\\n at global code@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/app.js:52:70)\\n at require@[native code]\\n at require@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.internal/extensions/binding.js:21:25)\\n at file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.main.js:40:10)\\n at loadAsync@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.internal/bootstrap.loader.js:108:13)\\n at global code@file:///Users/jvennemann/Library/Developer/CoreSimulator/Devices/4DDA0F33-7B7B-41FA-BF96-5800581D3BBB/data/Containers/Bundle/Application/E17895D9-7709-4D36-9880-02A24CA88280/space%20test.app/ti.main.js:37:52)\";\r\n[ERROR] toJSON = \"\";\r\n[ERROR] }\r\n{code}\r\n\r\n*Expected behavior*\r\nThe app does not throw an error and the full native path of the {{app.js}} file inside the app bundle gets logged.", "attachment": [], "flagged": false, "summary": "iOS: File API broken for projects with space in their name", "creator": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "jvennemann", "key": "jvennemann", "displayName": "Jan Vennemann", "active": true, "timeZone": "Europe/Berlin" }, "environment": null, "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }