Uploaded image for project: 'Documentation'
  1. Documentation
  2. TIDOC-667

Android: OSes with case sensitivity interfere with JS loading


    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 2.0.1
    • Fix Version/s: 2012 Sprint 26
    • Component/s: APIDoc, Guides
    • Environment:
      • Product: Mobile
      • Titanium SDK: Mobile 2.0.1
      • Platform OS: Android
      • Platform OS Version: Windows7 Ultimate 64bit



      java.io.FileNotFoundException thrown when upper case in the .js file names and in the images folder name (under Windows).

      It seems like when running the simulator under windows it is case insensitive whereas it is case sensitive on the device.

      Steps to reproduce

      Trying to load Abc.js when the filename it might be abc.js

      Work around

      Use lower case filenames only (to get it working as in the simulator).

      Console logs

      05-10 17:01:44.130: I/TiRootActivity(2147): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null 05-10 17:01:44.840: W/TiApplication(2147): (KrollRuntimeThread) [708,708] Registering module with name already in use. 05-10 17:01:44.840: E/TiApplication(2147): (KrollRuntimeThread) [0,708] APP PROXY: ti.modules.titanium.app.AppModule@4056ee58 05-10 17:01:44.870: W/V8Object(2147): Runtime disposed, cannot set property 'userAgent' 05-10 17:01:45.060: E/TiAssetHelper(2147): Error while reading asset "Resources/uidata.js": 05-10 17:01:45.060: E/TiAssetHelper(2147): java.io.FileNotFoundException: Resources/uidata.js 05-10 17:01:45.060: E/TiAssetHelper(2147): at android.content.res.AssetManager.openAsset(Native Method) 05-10 17:01:45.060: E/TiAssetHelper(2147): at android.content.res.AssetManager.open(AssetManager.java:337) 05-10 17:01:45.060: E/TiAssetHelper(2147): at android.content.res.AssetManager.open(AssetManager.java:311) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:77) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:134) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:267) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:160) 05-10 17:01:45.060: E/TiAssetHelper(2147): at android.os.Handler.dispatchMessage(Handler.java:95) 05-10 17:01:45.060: E/TiAssetHelper(2147): at android.os.Looper.loop(Looper.java:130) 05-10 17:01:45.060: E/TiAssetHelper(2147): at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:104) 05-10 17:01:45.140: D/dalvikvm(2147): GC_CONCURRENT freed 582K, 45% free 3958K/7111K, external 877K/1389K, paused 4ms+6ms 05-10 17:01:45.410: D/dalvikvm(2147): GC_EXTERNAL_ALLOC freed 294K, 48% free 3726K/7111K, external 523K/1022K, paused 50ms 05-10 17:01:45.520: I/TiRootActivity(2147): (main) [0,0] checkpoint, on root activity resume. activity = com.app.cg.CardguardActivity@4064b240 05-10 17:01:45.700: W/TiDrawableReference(2147): (main) [189,189] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled. 05-10 17:01:45.710: W/TiDrawableReference(2147): (main) [1,190] Could not open stream to get bitmap 05-10 17:01:45.890: D/TiUIView(2147): (main) [187,377] Nativeview is null 05-10 17:01:45.910: W/TiDrawableReference(2147): (main) [14,391] Bitmap bounds could not be determined. If bitmap is loaded, it won't be scaled. 05-10 17:01:45.910: W/TiDrawableReference(2147): (main) [0,391] Could not open stream to get bitmap 05-10 17:01:45.940: D/TiUIView(2147): (main) [30,421] Nativeview is null

      Further info

      This jira ticket isn't necessarily a bug but a report to address it as there is no way to avoid this as the java.io.File API is system-dependent.



      Documentation needs to explicitly state that transitioning from case-insensitive filesystems (FAT32, NTFS, HFS+) to case-sensitive filesystems (Android, possibly MW, possibly BB) may mean that certain files "may not be found". The issue is that the file name referenced in the source does not match the case of the file on the filesystem.




            • Assignee:
              bhatfield Benjamin Hatfield (Inactive)
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              3 Start watching this issue


              • Created:

                Time Tracking

                Original Estimate - 40 minutes Original Estimate - 40 minutes
                Remaining Estimate - 0 minutes
                Time Spent - 2 hours

                  Git Source Code