Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 9.3.0
-
Fix Version/s: Release 9.3.0
-
Component/s: Android
-
Labels:
-
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).