Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1225] social.js authorize UI crashes on android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2015-01-15T19:42:42.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.7.0
ComponentsBuiltins
Labelsalloy, android, crash, mobile, social.js
ReporterKristen Bachman
AssigneeTim Poulsen
Created2014-11-24T15:39:25.000+0000
Updated2015-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

FileDateSize
app.zip2014-11-24T15:56:09.000+00006097
code.txt2014-11-24T15:39:26.000+00003365
social.js crash.mov2014-11-24T15:39:27.000+00001895276
stack trace2014-11-24T15:39:27.000+000017833

Comments

  1. Kristen Bachman 2014-11-24

  2. Kristen Bachman 2014-11-24

    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.
  3. Patrick van Vuuren 2014-12-11

    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?
  4. Patrick van Vuuren 2014-12-16

    Social.js is working on Android 5. The logs on the Nexus 9 - Android 5.0.1
       [INFO] :   WebViewFactory: Loading com.google.android.webview version 37 (1602158-arm64) (code 111202)
       [INFO] :   LibraryLoader: Loading: webviewchromium
       [INFO] :   LibraryLoader: Time to load native libraries: 91 ms (timestamps 5910-6001)
       [INFO] :   LibraryLoader: Expected native library version number "",actual native library version number ""
       [INFO] :   LibraryLoader: Expected native library version number "",actual native library version number ""
       [INFO] :   chromium: [INFO:library_loader_hooks.cc(106)] Chromium logging enabled: level = 0, default verbosity = 0
       [INFO] :   BrowserStartupController: Initializing chromium process, renderers=0
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   chromium: [WARNING:resource_bundle.cc(315)] locale_file_path.empty()
       [INFO] :   chromium: [INFO:aw_browser_main_parts.cc(63)] Load from apk succesful, fd=67 off=43792 len=2945
       [INFO] :   chromium: [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:68 off:229488 len:643667
       [WARN] :   AudioManagerAndroid: Requires BLUETOOTH permission
       [WARN] :   chromium: [WARNING:proxy_service.cc(901)] PAC support disabled because there is no system implementation
       [WARN] :   chromium: [WARNING:data_reduction_proxy_settings.cc(403)] SPDY proxy OFF at startup
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   AwContents: onDetachedFromWindow called when already detached. Ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [INFO] :   Choreographer: Skipped 43 frames!  The application may be doing too much work on its main thread.
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [INFO] :   chromium: [INFO:SkUtilsArm.cpp(179)] Device supports ARM NEON instructions!
       [INFO] :   chromium:
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   chromium: [WARNING:simple_index_file.cc(337)] Could not map Simple Index file.
       [INFO] :   art: Background partial concurrent mark sweep GC freed 2118(126KB) AllocSpace objects, 2(78KB) LOS objects, 22% free, 54MB/70MB, paused 1.559ms total 102.273ms
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [WARN] :   art: Attempt to remove local handle scope entry from IRT, ignoring
       [INFO] :   I/TiWebChromeClient.console: (main) [5650,8947] The value "device-width;" for key "width" is invalid, and has been ignored. (9:https://api.twitter.com/oauth/authorize?oauth_token=tpFVKZ9nVt9zrjARurRDr46O2TSGfztb&oauth_token_secret=A94NxsWT7MYWtdaPduuKgrs3B0JdXy0T&oauth_callback_confirmed=true)
       [INFO] :   I/TiWebChromeClient.console: (main) [0,8947] The value "1.0;" for key "initial-scale" was truncated to its numeric prefix. (9:https://api.twitter.com/oauth/authorize?oauth_token=tpFVKZ9nVt9zrjARurRDr46O2TSGfztb&oauth_token_secret=A94NxsWT7MYWtdaPduuKgrs3B0JdXy0T&oauth_callback_confirmed=true)
       [INFO] :   I/TiWebChromeClient.console: (main) [0,8947] The value "1.0;" for key "maximum-scale" was truncated to its numeric prefix. (9:https://api.twitter.com/oauth/authorize?oauth_token=tpFVKZ9nVt9zrjARurRDr46O2TSGfztb&oauth_token_secret=A94NxsWT7MYWtdaPduuKgrs3B0JdXy0T&oauth_callback_confirmed=true)
       [INFO] :   I/TiWebChromeClient.console: (main) [1,8948] Error parsing a meta element's content: ';' is not a valid key-value pair separator. Please use ',' instead. (9:https://api.twitter.com/oauth/authorize?oauth_token=tpFVKZ9nVt9zrjARurRDr46O2TSGfztb&oauth_token_secret=A94NxsWT7MYWtdaPduuKgrs3B0JdXy0T&oauth_callback_confirmed=true)
       
    Also, when debugging is enabled, the app does not crash on Android < 5.0 and Android >= 4.0
  5. Patrick van Vuuren 2014-12-16

    Allright I found a workaround for now on Android. When it's trying to set the timestamp it goes wrong on this line (254):
       var scripts = document.getElementsByTagName("script");
       
    I have edited it to:
       var scripts = null; 
       
    And now the authorization popup works and does not crash. Patrick
  6. William Dent 2014-12-19

    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.
  7. Tim Poulsen 2015-01-13

    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.
  8. Kristen Bachman 2015-01-15

    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?
  9. Tim Poulsen 2015-01-15

    [~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.

JSON Source