Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6811] Android: Media - blob.length exception: method not supported

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-01-23T16:18:06.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2012-01, Release 2.0.0, Release 1.8.1
ComponentsAndroid
Labelsmodule_media, parity, qe-testadded
ReporterRuben Fonseca
AssigneeAllen Yeung
Created2011-12-20T08:26:12.000+0000
Updated2012-03-03T23:30:50.000+0000

Description

Problem

Calling "length" on a blob on SDK 1.8.0.1.RC3 returns 0 and prints an error on the log. Example code:

Test case

Ti.Media.openPhotoGallery({
  success: function(e) {
    Ti.API.warn("----> " + e.media.length);
  }
});

Exceptions

The above results in the following error on the log:
W/TiBaseFile(  313): (KrollRuntimeThread) [94,11266] Method is not supported org.appcelerator.titanium.io.TitaniumBlob : size

Comments

  1. Paul Dowsett 2011-12-20

    Hi Ruben Could you state the Android version and Javascript runtime you tested, please, as requested in [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist), and then I can move it to the main project. Cheers
  2. Paul Dowsett 2011-12-20

    Please reopen when you have had a chance to add the missing info, and I will escalate it. Thanks
  3. Ruben Fonseca 2011-12-21

    Hi Paul! Thanks for your help! I've added the Android versions and runtime to the Environment section of the bug. Thanks!
  4. Paul Dowsett 2011-12-21

    Thanks for the update, Ruben. I have moved the ticket across.
  5. Ruben Fonseca 2011-12-23

    Just a update that the problem still exists on 1.8.0.1 final.. It kinda worries me how such a huge problem, with such a simple failing test case is ignored on the final version. I cannot update any of my apps to 1.8.0.1 because of this bug.
  6. Allen Yeung 2012-01-05

    PR Ready: https://github.com/appcelerator/titanium_mobile/pull/1134 For the fail case, use the app.js from the ticket, and verify that you get the error and 0 as the length when you select a picture from the photo gallery. With the changes from the PR, it should display the size of the selected photo.
  7. Wilson Luu 2012-01-12

    Closing bug. Verified fix on: SDK build: 1.9.0.v20120112104633 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201111843 Device: Droid 3 (2.3.4)

JSON Source