[ALOY-1225] social.js authorize UI crashes on android
GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2015-01-15T19:42:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.7.0 |
Components | Builtins |
Labels | alloy, android, crash, mobile, social.js |
Reporter | Kristen Bachman |
Assignee | Tim Poulsen |
Created | 2014-11-24T15:39:25.000+0000 |
Updated | 2015-01-15T19:42:42.000+0000 |
Description
Upon calling the 'authorize' method, the loading view opens and then immediately crashes, resulting in the following error.
[INFO] : libc: Fatal signal 11 (SIGSEGV) at 0x00000014 (code=1), thread 2206 (KrollRuntimeThr)
The behavior is consistent. However, if I open and close a facebook authorize dialog before opening the twitter authorize dialog, the twitter dialog will usually work. The issue may lie in the "popIn" animation: it appears that the window expands beyond the mobile screen viewport, and will crash at about the time the window should zoom back into the viewport.
See the attached video for a demo of the bug.
Functionality is fine in iOS v 8.1.
Other notes:
* Line 514 of the social.js file makes us of the deprecated "Ti.UI.AUTODETECT_NONE"
* The default navigation/action bar at the top becomes visible
Attachments
app.zip contains primary files for recreating the issue. Should be able to copy contents of app.zip into the "app" directory of a clean alloy project. Then move the included tiapp.xml from "app" to root. Will also need to include own Facebook and Twitter API keys in index.js. Will also need to include Facebook key in tiapp.xml.
Is this issue being looked at? Currently busy implementing a twitter share option and looking at the exact same issue right now. Also is there an alternative to share a message to twitter instead of using this library?
Social.js is working on Android 5. The logs on the Nexus 9 - Android 5.0.1
Also, when debugging is enabled, the app does not crash on Android < 5.0 and Android >= 4.0
Allright I found a workaround for now on Android. When it's trying to set the timestamp it goes wrong on this line (254):
I have edited it to:
And now the authorization popup works and does not crash. Patrick
I found that animation.popIn(window); on/around line 511 in social.js is the culprit for the libc: Fatal signal 11 (SIGSEGV) at 0x00000014 (code=1), thread 2206 (KrollRuntimeThr) and by just changing this to "window.opacity = 1;" solves the issue and works every time on Android.
I just tested this issue and the social.js library worked fine for me. I'm wondering if the changes made in ALOY-953 and ALOY-951 may have resolved this issue. I'm using 3.4.1.GA SDK, Alloy 1.5.1, and building to my Galaxy S5 running Android 4.4.4. I was able to authorize and post a tweet. If you are still having issues, please post your Alloy and SDK versions. Or, test with the newest versions if you're not already using them.
I updated my app to use 3.4.1.GA and updated to the latest stable version of Alloy. (Running
alloy -v
in the command line yielded a version number of 1.5.1.) When I initially ran my app after Tim's post, I was still having issues with the app crashing...even after cleaning the project. So I deleted the app's Resources folder and re-ran the application, which is what finally solved the problem. Is there a way to programmatically remove/update the Resources folder after SDK and/or node updates so that the app reflects the latest changes?[~bachmakm] I'm glad the library working for you. I'll close this ticket. ALOY-1063 adds cleaning of the Resources folder but it won't make it to a published version of Alloy for a bit. It's a hook, which should be easy enough to add yourself to your projects. See the associated PR and check our docs on how to install CLI hooks.