Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28252

Android: Modules built before 9.3.0 will return empty string instead of null

    Details

    • Story Points:
      8
    • Sprint:
      2020 Sprint 24

      Description

      Noticed during the SDK 9.3.0 migration: If you call a module getter and the value is null, thee app now crashes, because a Symbol type is returned instead of a bare null value. This works fine on iOS and used to work fine on Android as well (comparing to 9.2.2.GA).

      It's easy to replicate:
      1. Create a native module and add the following code:

      @Kroll.getProperty
      public String fcmToken()
      {
      	return null;
      }
      

      2. Add the module to your tiapp.xml with an 9.3.0 SDK included and call the getter:

      console.warn(require('ti.test').fcmToken));
      

      3. Notice the error
      4. Change the SDK version back to 9.2.2.GA and run the same app again
      5. Notice that it's behaving correctly and returning null.

      I guess it's a regression from some kind of V8 change (see the full 9.2.2 <-- master diff here). Also see the ti.test module for quick reproduction attached to this ticket.

      EDIT: Found a possible regression candidate this commit (as part of TIMOB-27787).

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              hknoechel Hans Knöchel
              Reviewer:
              Joshua Quick
              Tester:
              Lokesh Choudhary
            • Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration