Titanium

[ALOY-951] Social.js builtin: throws JS error after canceling authorization

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-02-07T15:59:53.000+0000
Affected Version/sAlloy 1.3.0
Fix Version/sAlloy 1.4.0
ComponentsBuiltins
Labelsqe-testadded
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-02-06T20:33:26.000+0000
Updated2014-06-22T13:21:19.000+0000

Description

Description: After the Twitter authorization box is displayed, click its "X" button to close. Then, tap Back to exit the app. Android displays an error: Cannot set property value of null Cause is (approx) line 377 of social.js: loading = !0, loadingView.value = 0, estimateID = firstLoad ? ... Changing to the following fixes the issue: loading = !0, loadingView && (loadingView.value = 0), estimateID = firstLoad ? ...

Attachments

FileDateSize
app.zip2014-02-06T20:44:43.000+00005901229

Comments

  1. Tim Poulsen 2014-02-06 Sample project attached
  2. Tim Poulsen 2014-02-06 PR: https://github.com/appcelerator/alloy/pull/332 Functional test: 1) Create a new project 2) Replace its app folder with the attached. 3) Update controllers/index.js with valid Twitter API consumer secret and consumer key values 4) Build for Android 5) Enter a message in the text box and tap Tweet 6) Tap the "X" button to cancel the authorization 7) Tap Back to exit the app. You should not get the code error (You do get the authorization screen again. I'm not sure if that's the expected flow. In any case, it's not something addressed by or related to this ticket)
  3. Tim Poulsen 2014-02-07 Resolved, see functional test in preceding comment
  4. Lokesh Choudhary 2014-05-14 Verified the fix. We do not get JS error after canceling authorization. Closing. Environment: Appc Studio : 3.3.0.201405121247 Ti SDK : 3.3.0.v20140513191712 Mac OSX : 10.8.5 Alloy : 1.4.0-dev CLI - 3.3.0-dev Nexus 5 - android 4.4.2

JSON Source