Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25206

Android: Unable to use some native modules with 6.2.0

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: Release 6.2.0
    • Fix Version/s: Release 6.2.0
    • Component/s: Android
    • Labels:
    • Environment:

      Ti SDK: 6.2.0.v20170828180251
      Oneplus 3 7.1.1
      ti.barcode 3.0.0. 3.1.0

    • Story Points:
      2
    • Sprint:
      2017 Sprint 18 SDK

      Description

      Description

      When attempting to use ti.barcode on 6.2.0 the app will crash with the below, the same code works fine in 6.1.2.GA

      [ERROR] TiExceptionHandler: (main) [18084,18184] ----- Titanium Javascript Runtime Error -----
      [ERROR] TiExceptionHandler: (main) [0,18184] - In /app.js:92,13
      [ERROR] TiExceptionHandler: (main) [1,18185] - Message: Uncaught No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-1/base.apk)
      [ERROR] TiExceptionHandler: (main) [0,18185] - Source:     Barcode.capture({
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@bf48a50
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@3237449
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@1ffb7c
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@a260c05
      [ERROR] V8Exception: Exception occurred at /app.js:92: Uncaught No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-1/base.apk)
      [ERROR] V8Exception: No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-1/base.apk)
      

      Steps to reproduce
      1. Download ti.barcode from https://github.com/appcelerator-modules/ti.barcode/releases
      2. Grab the code and tiapp settings from https://gist.github.com/ewanharris/f524cf9758b0b2fac540c60c4f4acd1e
      3. Build to a device
      4. Tap get perms
      5. Tap scan code or scan image from gallery
      Actual

      Crashes with the above error

      Expected

      No crash

      Complete log from startup

      -- Start application log -----------------------------------------------------
      [INFO]  TiApplication: (main) [0,0] checkpoint, app created.
      [INFO]  TiApplication: (main) [37,37] Titanium 6.2.0 (2017/08/28 18:04 undefined)
      [INFO]  MultiDex: VM with version 2.1.0 has multidex support
      [INFO]  MultiDex: install
      [INFO]  MultiDex: VM has multidex support, MultiDex support library is disabled.
      [WARN]  TiAndroid: (main) [283,320] Application instance no longer available. Unable to get current activity.
      [WARN]  TiAndroid: (main) [1,321] Application instance no longer available. Unable to get current activity.
      [WARN]  TiAndroid: (main) [1,322] Application instance no longer available. Unable to get current activity.
      [INFO]  TiApplication: (main) [26,348] Titanium Javascript runtime: v8
      [WARN]  art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
      [INFO]  TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
      [INFO]  TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.testing.TestinappActivity@f3601a4
      [DEBUG] AppTracker: App Event: start
      [DEBUG] AppTracker: App Event: stop
      [WARN]  TiUIScrollView: (main) [97,97] Scroll direction could not be determined based on the provided view properties. Default VERTICAL scroll direction being used. Use the 'scrollType' property to explicitly set the scrolling direction. [TRACE] BoostFramework: mAcquireFunc method = public int com.qualcomm.qti.Performance.perfLockAcquire(int,int[])
      [TRACE] BoostFramework: mReleaseFunc method = public int com.qualcomm.qti.Performance.perfLockRelease()
      [TRACE] BoostFramework: mAcquireTouchFunc method = public int com.qualcomm.qti.Performance.perfLockAcquireTouch(android.view.MotionEvent,android.util.DisplayMetrics,int,int[])
      [TRACE] BoostFramework: mIOPStart method = public int com.qualcomm.qti.Performance.perfIOPrefetchStart(int,java.lang.String)
      [TRACE] BoostFramework: mIOPStop method = public int com.qualcomm.qti.Performance.perfIOPrefetchStop()
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@2b0a8fb
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@5d69d18
      [DEBUG] Window: Checkpoint: postWindowCreated()
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@33548bb
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@57b21d8
      [DEBUG] AppTracker: App Event: start
      [DEBUG] AppTracker: App Event: stop
      [INFO]  Adreno: QUALCOMM build                   : 853a1ff, I9c435c2712
      [INFO]  Adreno: Build Date                       : 01/10/17
      [INFO]  Adreno: OpenGL ES Shader Compiler Version: XE031.09.00.04
      [INFO]  Adreno: Local Branch                     :
      [INFO]  Adreno: Remote Branch                    :
      [INFO]  Adreno: Remote Branch                    :
      [INFO]  Adreno: Reconstruct Branch               :
      [INFO]  OpenGLRenderer: Initialized EGL, version 1.4
      [DEBUG] OpenGLRenderer: Swap behavior 1
      [DEBUG] AppTracker: App Event: start
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@668204d
      [WARN]  W/System.err: java.lang.NoSuchMethodError: No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-2/base.apk)
      [WARN]  W/System.err:   at ti.barcode.BarcodeModule.capture(BarcodeModule.java:309)
      [WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
      [WARN]  W/System.err:   at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
      [WARN]  W/System.err:   at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:921)
      [WARN]  W/System.err:   at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1144)
      [WARN]  W/System.err:   at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:363)
      [WARN]  W/System.err:   at android.os.Handler.dispatchMessage(Handler.java:98)
      [WARN]  W/System.err:   at android.os.Looper.loop(Looper.java:154)
      [WARN]  W/System.err:   at android.app.ActivityThread.main(ActivityThread.java:6290)
      [WARN]  W/System.err:   at java.lang.reflect.Method.invoke(Native Method)
      [WARN]  W/System.err:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
      [WARN]  W/System.err:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
      [ERROR] TiExceptionHandler: (main) [3948,4045] ----- Titanium Javascript Runtime Error -----
      [ERROR] TiExceptionHandler: (main) [0,4045] - In /app.js:92,13
      [ERROR] TiExceptionHandler: (main) [0,4045] - Message: Uncaught No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-2/base.apk)
      [ERROR] TiExceptionHandler: (main) [0,4045] - Source:     Barcode.capture({
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@241dc26
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@2828067
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@5df94b2
      [TRACE] BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@32cbc03
      [ERROR] V8Exception: Exception occurred at /app.js:92: Uncaught No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-2/base.apk)
      [ERROR] V8Exception: No static method getAppCurrentActivity()Landroid/app/Activity; in class Lorg/appcelerator/titanium/TiApplication; or its super classes (declaration of 'org.appcelerator.titanium.TiApplication' appears in /data/app/com.testing-2/base.apk)
      [WARN]  TiVerify: (Timer-0) [955,5000] Verifying module licenses...
      [INFO]  DpmTcmClient: RegisterTcmMonitor from: org.apache.http.impl.conn.TcmIdleTimerMonitor
      [DEBUG] NetworkSecurityConfig: No Network Security Config specified, using platform default
      [INFO]  TiVerify: (Timer-0) [545,5545] Succesfully verified module licenses
      [DEBUG] AppTracker: App Event: stop
      -- End application log -------------------------------------------------------
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                eharris Ewan Harris
                Reviewer:
                Yordan Banev
                Tester:
                Abir Mukherjee
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-11083
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code