Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8305] MobileWeb: If an app does not contain Resources/mobileweb/apple_startup_images, the build process crashes.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-03-26T16:05:26.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-07
ComponentsMobileWeb
Labelsqe-port
ReporterBryan Hughes
AssigneeChris Barber
Created2012-03-26T08:53:05.000+0000
Updated2012-08-13T10:18:01.000+0000

Description

If the apple startup images folder does not exist, then the compiler crashes with:
Traceback (most recent call last):
  File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0/mobileweb/builder.py", line 21, in <module>
    main(sys.argv)
  File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0/mobileweb/builder.py", line 18, in main
    compiler.Compiler(project_dir,deploytype)
  File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0/mobileweb/compiler.py", line 95, in __init__
    self.copy(os.path.join(self.resources_path, 'mobileweb', 'apple_startup_images', 'Default.jpg'), self.build_path)
  File "/Library/Application Support/Titanium/mobilesdk/osx/2.0.0/mobileweb/compiler.py", line 624, in copy
    shutil.copy(src_path, dest_path)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 116, in copy
    copyfile(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'workspace/Sample.Mapping/Resources/mobileweb/apple_startup_images/Default.jpg'
Because of this issue, any projects created by users prior to 2.0 will crash.

Comments

  1. Chris Barber 2012-03-26

    This is because someone created a project with the old directory layout. I'll add checks to see that the files exist first.
  2. Bryan Hughes 2012-03-26

    FYI the projects in question are all of the samples that Ping created, Kitchen Sink, Bravo, NBC, and everything else I could get my hands on.
  3. Chris Barber 2012-03-26

    Pull request: https://github.com/appcelerator/titanium_mobile/pull/1848
  4. Lokesh Choudhary 2012-08-13

    Verified fix on: Titanium studio : 2.1.1.201207271312 SDK version : 2.2.0.v20120810194112 Android 4.0.4 - default ,chrome 18.0 Iphone 4.3.5 - safari mobile Mountain lion(10.8) - chrome 21.0,safari 6,firefox 14.0.1

JSON Source