[ALOY-951] Social.js builtin: throws JS error after canceling authorization
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-02-07T15:59:53.000+0000 |
Affected Version/s | Alloy 1.3.0 |
Fix Version/s | Alloy 1.4.0 |
Components | Builtins |
Labels | qe-testadded |
Reporter | Tim Poulsen |
Assignee | Tim Poulsen |
Created | 2014-02-06T20:33:26.000+0000 |
Updated | 2014-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
File | Date | Size |
app.zip | 2014-02-06T20:44:43.000+0000 | 5901229 |
Sample project attached
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)
Resolved, see functional test in preceding comment
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