Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordova Android, having a ext.postBuildExtras in a plugin gradle does not output cdvassets.manifest #7600

Closed
dagatsoin opened this issue Aug 7, 2016 · 15 comments

Comments

@dagatsoin
Copy link

dagatsoin commented Aug 7, 2016

Meteor 1.3.5

When building for Android, having a ext.postBuildExtras in a plugin gradle file does not output cdvassets.manifest.

1- create an app and add android platform
2- now add a plugin with a post build extra gradle script

ext.postBuildExtras = {
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }
}

4- meteor build android --server http://localhost:3000
5- open the generated project, wait for gradle to build

When gradle finishes the build, you won't see assets/cdvassets.manifest
If you run it this will crash.

That makes #7046 or

08-07 14:08:08.203 3125-3125/? D/AndroidRuntime: >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
08-07 14:08:08.203 3125-3125/? W/linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
08-07 14:08:08.213 3125-3125/? D/AndroidRuntime: CheckJNI is ON
08-07 14:08:08.213 3125-3125/? D/dalvikvm: Trying to load lib libjavacore.so 0x0
08-07 14:08:08.213 3125-3125/? D/dalvikvm: Added shared lib libjavacore.so 0x0
08-07 14:08:08.223 3125-3125/? D/dalvikvm: Trying to load lib libnativehelper.so 0x0
08-07 14:08:08.223 3125-3125/? D/dalvikvm: Added shared lib libnativehelper.so 0x0
08-07 14:08:08.223 3125-3125/? D/dalvikvm: No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
08-07 14:08:08.253 3125-3125/? D/dalvikvm: Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
08-07 14:08:08.403 3125-3125/? E/memtrack: Couldn't load memtrack module (No such file or directory)
08-07 14:08:08.403 3125-3125/? E/android.os.Debug: failed to load memtrack module: -2
08-07 14:08:08.523 3125-3125/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
08-07 14:08:08.533 3125-3125/? D/AndroidRuntime: Shutting down VM
08-07 14:08:08.533 3125-3132/? D/jdwp: Got wake-up signal, bailing out of select
08-07 14:08:08.533 3125-3132/? D/dalvikvm: Debugger has detached; object registry had 1 entries

                                           --------- beginning of /dev/log/system
08-07 14:08:08.533 1557-1569/system_process I/ActivityManager: Force stopping com.idqc50hm16b987s1xngpmi appid=10063 user=0: from pid 3125
08-07 14:08:08.853 3139-3139/? D/AndroidRuntime: >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
08-07 14:08:08.853 3139-3139/? W/linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
08-07 14:08:08.863 3139-3139/? D/AndroidRuntime: CheckJNI is ON
08-07 14:08:08.883 3139-3139/? D/dalvikvm: Trying to load lib libjavacore.so 0x0
08-07 14:08:08.883 3139-3139/? D/dalvikvm: Added shared lib libjavacore.so 0x0
08-07 14:08:08.883 3139-3139/? D/dalvikvm: Trying to load lib libnativehelper.so 0x0
08-07 14:08:08.883 3139-3139/? D/dalvikvm: Added shared lib libnativehelper.so 0x0
08-07 14:08:08.883 3139-3139/? D/dalvikvm: No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
08-07 14:08:08.963 3139-3139/? D/dalvikvm: Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
08-07 14:08:09.013 3139-3139/? E/memtrack: Couldn't load memtrack module (No such file or directory)
08-07 14:08:09.013 3139-3139/? E/android.os.Debug: failed to load memtrack module: -2
08-07 14:08:09.093 3139-3139/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
08-07 14:08:09.133 1557-1689/system_process I/ActivityManager: Force stopping com.idqc50hm16b987s1xngpmi appid=10063 user=-1: set debug app
08-07 14:08:09.133 1557-1689/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.idqc50hm16b987s1xngpmi/.MainActivity} from pid 3139
08-07 14:08:09.173 1557-1689/system_process D/dalvikvm: GC_FOR_ALLOC freed 1412K, 25% free 11709K/15580K, paused 19ms, total 20ms
08-07 14:08:09.203 3139-3139/? D/AndroidRuntime: Shutting down VM
08-07 14:08:09.213 3139-3145/? D/jdwp: Got wake-up signal, bailing out of select
08-07 14:08:09.213 3139-3145/? D/dalvikvm: Debugger has detached; object registry had 1 entries
08-07 14:08:09.233 3149-3149/? D/dalvikvm: Not late-enabling CheckJNI (already on)
08-07 14:08:09.233 1557-1692/system_process I/ActivityManager: Start proc com.idqc50hm16b987s1xngpmi for activity com.idqc50hm16b987s1xngpmi/.MainActivity: pid=3149 uid=10063 gids={50063, 3003, 1028, 1015}
08-07 14:08:09.313 3149-3149/com.idqc50hm16b987s1xngpmi W/ActivityThread: Application com.idqc50hm16b987s1xngpmi is waiting for the debugger on port 8100...
08-07 14:08:09.333 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: Sending WAIT chunk
08-07 14:08:09.453 3149-3155/com.idqc50hm16b987s1xngpmi I/dalvikvm: Debugger is active
08-07 14:08:09.533 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: Debugger has connected
08-07 14:08:09.533 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:09.733 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:09.933 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:10.133 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:10.343 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:10.543 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:10.743 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: waiting for debugger to settle...
08-07 14:08:10.943 3149-3149/com.idqc50hm16b987s1xngpmi I/System.out: debugger has settled (1305)
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.app.Activity.checkSelfPermission, referenced from method org.apache.cordova.CordovaInterfaceImpl.hasPermission
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 48: Landroid/app/Activity;.checkSelfPermission (Ljava/lang/String;)I
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x0009
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermission
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 93: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x000c
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method org.apache.cordova.CordovaInterfaceImpl.requestPermissions
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 93: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
08-07 14:08:10.973 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
08-07 14:08:10.993 3149-3149/com.idqc50hm16b987s1xngpmi V/WebViewChromium: Binding Chromium to the background looper Looper (main, tid 1) {9d0163a8}
08-07 14:08:10.993 3149-3149/com.idqc50hm16b987s1xngpmi I/chromium: [INFO:library_loader_hooks.cc(112)] Chromium logging enabled: level = 0, default verbosity = 0
08-07 14:08:11.003 3149-3149/com.idqc50hm16b987s1xngpmi I/BrowserProcessMain: Initializing chromium process, renderers=0
08-07 14:08:11.023 3149-3169/com.idqc50hm16b987s1xngpmi W/chromium: [WARNING:proxy_service.cc(888)] PAC support disabled because there is no system implementation


                                                                    [ 08-07 14:08:11.043  3149: 3149 D/         ]
                                                                    HostConnection::get() New Host Connection established 0xb8587620, tid 3149
08-07 14:08:11.133 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: GC_FOR_ALLOC freed 82K, 6% free 3239K/3412K, paused 3ms, total 4ms
08-07 14:08:11.133 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm-heap: Grow heap (frag case) to 5.097MB for 1939932-byte allocation
08-07 14:08:11.133 3149-3158/com.idqc50hm16b987s1xngpmi D/dalvikvm: GC_FOR_ALLOC freed <1K, 4% free 5133K/5308K, paused 5ms, total 5ms
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.webkit.CookieManager.setAcceptThirdPartyCookies, referenced from method org.apache.cordova.engine.SystemCookieManager.<init>
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 19468: Landroid/webkit/CookieManager;.setAcceptThirdPartyCookies (Landroid/webkit/WebView;Z)V
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x0016
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.webkit.CookieManager.flush, referenced from method org.apache.cordova.engine.SystemCookieManager.flush
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 19463: Landroid/webkit/CookieManager;.flush ()V
08-07 14:08:11.173 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
08-07 14:08:11.183 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
08-07 14:08:11.183 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/ClientCertRequest;)
08-07 14:08:11.183 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.webkit.WebViewClient.onReceivedClientCertRequest, referenced from method org.apache.cordova.engine.SystemWebViewClient.onReceivedClientCertRequest
08-07 14:08:11.183 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 19522: Landroid/webkit/WebViewClient;.onReceivedClientCertRequest (Landroid/webkit/WebView;Landroid/webkit/ClientCertRequest;)V
08-07 14:08:11.183 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6f at 0x001a
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/webkit/PermissionRequest;)
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.webkit.PermissionRequest.getResources, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onPermissionRequest
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 19480: Landroid/webkit/PermissionRequest;.getResources ()[Ljava/lang/String;
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x000d
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm: Could not find method android.webkit.WebChromeClient$FileChooserParams.createIntent, referenced from method org.apache.cordova.engine.SystemWebChromeClient.onShowFileChooser
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: VFY: unable to resolve virtual method 19485: Landroid/webkit/WebChromeClient$FileChooserParams;.createIntent ()Landroid/content/Intent;
08-07 14:08:11.193 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: VFY: replacing opcode 0x6e at 0x0000
08-07 14:08:11.203 3149-3149/com.idqc50hm16b987s1xngpmi D/SystemWebViewEngine: CordovaWebView is running on device made by: unknown
08-07 14:08:11.233 3149-3149/com.idqc50hm16b987s1xngpmi E/MeteorWebApp: Could not load asset manager cache
                                                                        java.io.FileNotFoundException: cdvasset.manifest
                                                                            at android.content.res.AssetManager.openAsset(Native Method)
                                                                            at android.content.res.AssetManager.open(AssetManager.java:316)
                                                                            at android.content.res.AssetManager.open(AssetManager.java:290)
                                                                            at com.meteor.webapp.AssetManagerCache.<init>(AssetManagerCache.java:20)
                                                                            at com.meteor.webapp.WebAppLocalServer.pluginInitialize(WebAppLocalServer.java:107)
                                                                            at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:58)
                                                                            at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:172)
                                                                            at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:98)
                                                                            at org.apache.cordova.PluginManager.init(PluginManager.java:87)
                                                                            at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:116)
                                                                            at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:144)
                                                                            at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:214)
                                                                            at com.idqc50hm16b987s1xngpmi.MainActivity.onCreate(MainActivity.java:32)
                                                                            at android.app.Activity.performCreate(Activity.java:5231)
                                                                            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
                                                                            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
                                                                            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
                                                                            at android.app.ActivityThread.access$800(ActivityThread.java:135)
                                                                            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                            at android.os.Looper.loop(Looper.java:136)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5017)
                                                                            at java.lang.reflect.Method.invokeNative(Native Method)
                                                                            at java.lang.reflect.Method.invoke(Method.java:515)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                            at dalvik.system.NativeStart.main(Native Method)
08-07 14:08:11.233 3149-3149/com.idqc50hm16b987s1xngpmi V/StatusBar: StatusBar: initialization
08-07 14:08:11.263 3149-3149/com.idqc50hm16b987s1xngpmi D/dalvikvm: GC_FOR_ALLOC freed 2233K, 43% free 3121K/5444K, paused 2ms, total 3ms
08-07 14:08:11.263 3149-3149/com.idqc50hm16b987s1xngpmi I/dalvikvm-heap: Grow heap (frag case) to 7.674MB for 4762812-byte allocation
08-07 14:08:11.273 3149-3158/com.idqc50hm16b987s1xngpmi D/dalvikvm: GC_FOR_ALLOC freed <1K, 24% free 7771K/10096K, paused 6ms, total 6ms
08-07 14:08:11.403 3149-3149/com.idqc50hm16b987s1xngpmi D/OpenGLRenderer: Enabling debug mode 0
08-07 14:08:11.663 1557-1571/system_process I/ActivityManager: Displayed com.idqc50hm16b987s1xngpmi/.MainActivity: +2s463ms
08-07 14:08:11.673 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err: java.lang.NullPointerException
08-07 14:08:11.673 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at com.meteor.webapp.WebAppLocalServer.remapUri(WebAppLocalServer.java:472)
08-07 14:08:11.673 3149-3149/com.idqc50hm16b987s1xngpmi D/AndroidRuntime: Shutting down VM
08-07 14:08:11.673 3149-3149/com.idqc50hm16b987s1xngpmi W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x9cd1cb20)
08-07 14:08:11.673 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at org.apache.cordova.PluginManager.remapUri(PluginManager.java:473)
08-07 14:08:11.683 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at org.apache.cordova.CordovaResourceApi.remapUri(CordovaResourceApi.java:136)
08-07 14:08:11.683 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at org.apache.cordova.engine.SystemWebViewClient.shouldInterceptRequest(SystemWebViewClient.java:334)
08-07 14:08:11.683 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at com.android.webview.chromium.WebViewContentsClientAdapter.shouldInterceptRequest(WebViewContentsClientAdapter.java:277)
08-07 14:08:11.683 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at com.android.org.chromium.android_webview.AwContents$IoThreadClientImpl.shouldInterceptRequest(AwContents.java:249)
08-07 14:08:11.683 3149-3169/com.idqc50hm16b987s1xngpmi W/System.err:     at dalvik.system.NativeStart.run(Native Method)
08-07 14:08:11.683 3149-3149/com.idqc50hm16b987s1xngpmi E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: com.idqc50hm16b987s1xngpmi, PID: 3149
                                                                          java.lang.NullPointerException
                                                                              at com.meteor.webapp.WebAppLocalServer.onReset(WebAppLocalServer.java:186)
                                                                              at org.apache.cordova.PluginManager.onReset(PluginManager.java:465)
                                                                              at org.apache.cordova.CordovaWebViewImpl$EngineClient.onPageStarted(CordovaWebViewImpl.java:501)
                                                                              at org.apache.cordova.engine.SystemWebViewClient.onPageStarted(SystemWebViewClient.java:145)
                                                                              at com.android.webview.chromium.WebViewContentsClientAdapter.onPageStarted(WebViewContentsClientAdapter.java:438)
                                                                              at com.android.org.chromium.android_webview.AwContentsClientCallbackHelper$1.handleMessage(AwContentsClientCallbackHelper.java:100)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                              at android.os.Looper.loop(Looper.java:136)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:5017)
                                                                              at java.lang.reflect.Method.invokeNative(Native Method)
                                                                              at java.lang.reflect.Method.invoke(Method.java:515)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
                                                                              at dalvik.system.NativeStart.main(Native Method)
08-07 14:08:11.683 1557-1691/system_process W/ActivityManager:   Force finishing activity com.idqc50hm16b987s1xngpmi/.MainActivity
08-07 14:08:11.693 3149-3169/com.idqc50hm16b987s1xngpmi A/libc: Fatal signal 6 (SIGABRT) at 0x00000c4d (code=-6), thread 3169 (m16b987s1xngpmi)

                                                                [ 08-07 14:08:11.703  1557: 1691 D/         ]
                                                                HostConnection::get() New Host Connection established 0xb86edf10, tid 1691
08-07 14:08:11.773 1557-1691/system_process D/dalvikvm: GC_FOR_ALLOC freed 1376K, 29% free 11101K/15580K, paused 10ms, total 10ms
08-07 14:08:11.793 1130-1130/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-07 14:08:11.793 1130-1130/? I/DEBUG: Build fingerprint: 'generic_x86/google_sdk_x86/generic_x86:4.4.2/KK/2872501:eng/test-keys'
08-07 14:08:11.793 1130-1130/? I/DEBUG: Revision: '0'
08-07 14:08:11.793 1130-1130/? I/DEBUG: pid: 3149, tid: 3169, name: m16b987s1xngpmi  >>> com.idqc50hm16b987s1xngpmi <<<
08-07 14:08:11.793 1130-1130/? I/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
08-07 14:08:11.863 2031-3188/com.google.android.gms D/DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics.
08-07 14:08:12.173 1130-1130/? I/DEBUG:     eax 00000000  ebx 00000c4d  ecx 00000c61  edx 00000006
08-07 14:08:12.173 1130-1130/? I/DEBUG:     esi 00000c61  edi 0000000b
08-07 14:08:12.173 1130-1130/? I/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b
08-07 14:08:12.173 1130-1130/? I/DEBUG:     eip b76d7c96  ebp b773cce0  esp 8b2c2580  flags 00200203
08-07 14:08:12.173 1130-1130/? I/DEBUG: backtrace:
08-07 14:08:12.173 1130-1130/? I/DEBUG:     #00  pc 0003bc96  /system/lib/libc.so (tgkill+22)
08-07 14:08:12.173 1130-1130/? I/DEBUG:     #01  pc 00000005  <unknown>
08-07 14:08:12.173 1130-1130/? I/DEBUG: stack:
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2540  00000001  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2544  b847a700  [heap]
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2548  00000015  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c254c  b76a9ef9  /system/lib/libc.so (pthread_mutex_unlock+25)
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2550  b4e8f3c6  /system/lib/libdvm.so (Check_DeleteLocalRef(_JNIEnv*, _jobject*)::__FUNCTION__+6)
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2554  b7737fcc  /system/lib/libc.so
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2558  00000015  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c255c  b76e1e21  /system/lib/libc.so (__sflush+81)
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2560  00000000  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2564  b847a700  [heap]
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2568  00000015  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c256c  b76aec8f  /system/lib/libc.so (dlmalloc+351)
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2570  00000000  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2574  00000000  
08-07 14:08:12.173 1130-1130/? I/DEBUG:          8b2c2578  b76a9d29  /system/lib/libc.so (pthread_mutex_lock+9)
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c257c  b7737fcc  /system/lib/libc.so
08-07 14:08:12.183 1130-1130/? I/DEBUG:     #00  8b2c2580  00000006  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c2584  8f12c288  /system/lib/libwebviewchromium.so
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c2588  b7737fcc  /system/lib/libc.so
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c258c  b76b4436  /system/lib/libc.so (pthread_kill+102)
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c2590  00000c4d  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c2594  00000c61  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c2598  00000006  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c259c  00000000  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25a0  8b2c25e0  [stack:3169]
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25a4  b86901c8  [heap]
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25a8  b76b43d9  /system/lib/libc.so (pthread_kill+9)
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25ac  b7737fcc  /system/lib/libc.so
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25b0  8b2c25fc  [stack:3169]
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25b4  8b2c2648  [stack:3169]
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25b8  1e400005  
08-07 14:08:12.183 1130-1130/? I/DEBUG:          8b2c25bc  b76b47fc  /system/lib/libc.so (raise+44)
08-07 14:08:12.283 1557-1572/system_process W/ActivityManager: Activity pause timeout for ActivityRecord{9d3b7e38 u0 com.idqc50hm16b987s1xngpmi/.MainActivity t7 f}
08-07 14:08:12.333 1133-1133/? D/Zygote: Process 3149 terminated by signal (6)
08-07 14:08:12.333 1557-1587/system_process W/InputDispatcher: channel '9d492490 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
08-07 14:08:12.333 1557-1587/system_process E/InputDispatcher: channel '9d492490 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
08-07 14:08:12.333 1557-1587/system_process W/InputDispatcher: channel '9d3b5c78 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
08-07 14:08:12.333 1557-1587/system_process E/InputDispatcher: channel '9d3b5c78 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
08-07 14:08:12.333 1557-1579/system_process I/BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
08-07 14:08:12.333 1557-1763/system_process I/ActivityManager: Process com.idqc50hm16b987s1xngpmi (pid 3149) has died.
08-07 14:08:12.353 1557-1625/system_process W/InputDispatcher: Attempted to unregister already unregistered input channel '9d3b5c78 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)'
08-07 14:08:12.353 1557-1768/system_process W/InputDispatcher: Attempted to unregister already unregistered input channel '9d492490 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity (server)'
08-07 14:08:12.353 1557-1625/system_process I/WindowState: WIN DEATH: Window{9d3b5c78 u0 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity}
08-07 14:08:12.353 1557-1768/system_process I/WindowState: WIN DEATH: Window{9d492490 u0 com.idqc50hm16b987s1xngpmi/com.idqc50hm16b987s1xngpmi.MainActivity}
08-07 14:08:12.403 1557-3190/system_process W/ActivityManager: Process com.idqc50hm16b987s1xngpmi has crashed too many times: killing!
08-07 14:08:12.523 1557-1821/system_process I/ActivityManager: Exiting empty application process com.idqc50hm16b987s1xngpmi (null)
08-07 14:08:12.543 1714-1714/com.android.launcher D/dalvikvm: GC_FOR_ALLOC freed 1141K, 18% free 10709K/12912K, paused 47ms, total 48ms
08-07 14:08:12.573 2031-3194/com.google.android.gms D/DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics.
08-07 14:08:12.573 2031-3194/com.google.android.gms D/DropBoxEntryAddedChimeraService: User is not opted-in to Usage & Diagnostics.
08-07 14:08:12.733 3192-3192/? D/AndroidRuntime: >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
08-07 14:08:12.733 3192-3192/? W/linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
08-07 14:08:12.743 3192-3192/? D/AndroidRuntime: CheckJNI is ON
08-07 14:08:12.763 3192-3192/? D/dalvikvm: Trying to load lib libjavacore.so 0x0
08-07 14:08:12.763 3192-3192/? D/dalvikvm: Added shared lib libjavacore.so 0x0
08-07 14:08:12.763 3192-3192/? D/dalvikvm: Trying to load lib libnativehelper.so 0x0
08-07 14:08:12.763 3192-3192/? D/dalvikvm: Added shared lib libnativehelper.so 0x0
08-07 14:08:12.763 3192-3192/? D/dalvikvm: No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
08-07 14:08:12.923 3192-3192/? D/dalvikvm: Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
08-07 14:08:13.033 3192-3192/? E/memtrack: Couldn't load memtrack module (No such file or directory)
08-07 14:08:13.033 3192-3192/? E/android.os.Debug: failed to load memtrack module: -2
08-07 14:08:13.123 3192-3192/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
08-07 14:08:13.133 1557-1625/system_process I/ActivityManager: Force stopping com.idqc50hm16b987s1xngpmi appid=10063 user=0: from pid 3192
08-07 14:08:13.343 3192-3192/? D/AndroidRuntime: Shutting down VM
08-07 14:08:13.343 3192-3200/? D/jdwp: Got wake-up signal, bailing out of select
08-07 14:08:13.343 3192-3200/? D/dalvikvm: Debugger has detached; object registry had 1 entries
08-07 14:08:17.803 1677-1924/com.google.android.gms.persistent D/dalvikvm: GC_FOR_ALLOC freed 919K, 27% free 5328K/7208K, paused 9ms, total 9ms
08-07 14:10:16.773 1557-1598/system_process D/ConnectivityService: Sampling interval elapsed, updating statistics ..
08-07 14:10:16.783 1557-1598/system_process D/dalvikvm: GC_FOR_ALLOC freed 1393K, 25% free 11735K/15580K, paused 15ms, total 15ms
08-07 14:10:16.783 1557-1598/system_process D/ConnectivityService: Done.
08-07 14:10:16.783 1557-1598/system_process D/ConnectivityService: Setting timer for 720seconds
08-07 14:10:16.793 1557-1606/system_process V/BackupServiceBinder: doBackup() invoked
08-07 14:10:16.793 1557-1557/system_process V/BackupManagerService: Running a backup pass
08-07 14:10:16.793 1557-1606/system_process V/BackupManagerService: clearing pending backups
08-07 14:10:16.793 1557-1606/system_process V/PerformBackupTask: Beginning backup of 1 targets
08-07 14:10:16.793 1557-1606/system_process D/PerformBackupTask: invokeAgentForBackup on @pm@
08-07 14:10:16.813 1557-1606/system_process I/PerformBackupTask: no backup data written; not calling transport
08-07 14:10:16.813 1557-1606/system_process D/PerformBackupTask: starting agent for backup of BackupRequest{pkg=android}
08-07 14:10:16.813 1557-1606/system_process D/BackupManagerService: awaiting agent for ApplicationInfo{9d08e9a8 android}
08-07 14:10:16.813 1557-1557/system_process D/BackupManagerService: agentConnected pkg=android agent=android.app.backup.BackupAgent$BackupServiceBinder@9d2d5470
08-07 14:10:16.813 1557-1606/system_process I/BackupManagerService: got agent android.app.backup.BackupAgent$BackupServiceBinder@9d2d5470
08-07 14:10:16.823 1557-1606/system_process V/BackupServiceBinder: doBackup() invoked
08-07 14:10:16.823 1557-1606/system_process D/BackupHelperDispatcher: handling existing helper 'wallpaper' android.app.backup.WallpaperBackupHelper@9d3cb418
08-07 14:10:16.823 1557-1606/system_process D/PerformBackupTask: invokeAgentForBackup on android
08-07 14:10:16.833 1557-1606/system_process V/LocalTransport: performBackup() pkg=android
08-07 14:10:16.833 1557-1606/system_process V/LocalTransport: Got change set key=wallpaper:/data/system/wallpaper_info.xml size=-1 key64=d2FsbHBhcGVyOi9kYXRhL3N5c3RlbS93YWxscGFwZXJfaW5mby54bWw=
08-07 14:10:16.833 1557-1606/system_process V/LocalTransport: Got change set key=wallpaper:/data/system/wallpaper_info.xml size=115 key64=d2FsbHBhcGVyOi9kYXRhL3N5c3RlbS93YWxscGFwZXJfaW5mby54bWw=
08-07 14:10:16.833 1557-1606/system_process V/LocalTransport:   data size 115
08-07 14:10:16.833 1557-1606/system_process V/LocalTransport: finishBackup()
08-07 14:10:16.833 1557-1606/system_process I/PerformBackupTask: Backup pass finished.

As a work around I inversed my gradle plugin and the meteor cordova generated gradle:

// PLUGIN GRADLE EXTENSIONS START
apply from: "cordova-plugin-meteor-webapp/idqc50hm16b987s1xngpmi-build-extras.gradle"
apply from: "cordova-plugin-mapbox/idqc50hm16b987s1xngpmi-mapbox.gradle"
// PLUGIN GRADLE EXTENSIONS END

But it totally breaks the workflow as, during dev, I have to:

  • reset meteor
  • rebuild android
  • open android studio
  • tweak gradle
  • run

And a bonus question: is there a particular reason to compile for 1.6 over 1.7?

@abernix
Copy link
Contributor

abernix commented Sep 13, 2016

You'll have to forgive my unfamiliarity with the problem you're referring to and how it applies to Meteor. To my knowledge, Meteor doesn't support overriding build.gradle, build-extras.gradle or AndroidManifest.xml. Again, I'm not familiar with the capabilities of Cordova plugins, but do you think this is something that could be accomplished through a Cordova plug-in?

I would highly recommend asking this question in the Meteor Forums where you might find more people that are familiar with the problem you're having. Meteor Issues are primarily a place to document bugs with the Meteor framework. As of right now, I'm not entirely sure this is a bug or if this is behaving as intended.

@dagatsoin
Copy link
Author

I will do more a few more test next days. I have not this issue anymore since I cleaned up my code. But I suspect another one about not being able to recompile the assets on change. So we can close this for now, I will reopen if needed.

@ernestorocha
Copy link

I'm having the same problem, but in my case that section is empty:

// PLUGIN GRADLE EXTENSIONS START
// PLUGIN GRADLE EXTENSIONS END

I'm on the latest meteor: 1.4.2

@BudgieInWA
Copy link
Contributor

BudgieInWA commented Jul 15, 2017

I have had the same symptoms when updating a plugin so that it includes an ext.postBuildExtras entry. The commit that introduces the stack trace is here: https://github.com/gearit/RadaeePDF-Cordova/commit/c2d0639865aba9998d23ad245b8ca1f76c37b5ad#diff-7a542dfee066efafd02ae74b867867f2

I also found no assets/cdvassets.manifest, but copying the version generated by the build before that commit, at least lets me run the android build. I don't quite know the consequences yet.

@BudgieInWA
Copy link
Contributor

@abernix, here's a super simple reproduction of the problem, created from @dagatsoin's detailed description: https://github.com/BudgieInWA/meteor-cordova-postBuildExtras-bug

My current workaround is to run meteor to trigger a build, comment out the postBuildExtras lines from all plugins when have them, run meteor again to trigger another build (which fails but seems to create the correct cdvassets.manifest file), undo my commenting of the postBuildExtra lines, then finally build again. Future build work until I add new plugins (which require new cdvassets.manifest enties).

@hwillson
Copy link
Contributor

See #9590 - this is still happening with Meteor 1.6.x, so re-opening here.

@hwillson hwillson reopened this Jan 29, 2018
@menelike
Copy link
Contributor

menelike commented Feb 23, 2018

We faced the same problem on 1.6.1. It seems that build-extras.gradle is somehow not fired, so as a workaround we copied the contents from build-extras.gradle into cordova-build-override/platforms/android/build-extras.gradle and voilà, cdvasset.manifest is generated.

image

@Sewdn
Copy link

Sewdn commented Apr 21, 2018

@martijnwalraven @hwillson Could you please look into this.

Currently, no cordova plugins can be used that declare ext.postbuildExtras, because the cdvassets.manifest is not being generated by the build-extra.gradle declared by cordova-plugin-meteor-webapp.

Suggestion of @menelike is no option, cause this will override the build-extras.gradle, disabling all extra configuration declared by other cordova plugins.

This results in cordova packages like phonegap-plugin-push (https://github.com/phonegap/phonegap-plugin-push) and cordova-support-google-services (https://github.com/chemerisuk/cordova-support-google-services) not being able to declare dependency on the Google Services SDK. Therefor it is currently not possible to send and receive Push Notfications to Android 8 devices as described here:
Meteor-Community-Packages/raix-push#334

Thanks for looking into this!

@menelike
Copy link
Contributor

@Sewdn

You are correct, just using https://github.com/meteor/cordova-plugin-meteor-webapp/blob/eb197016813475615ebc353298f40b8a4aa2629c/src/android/build-extras.gradle like mentioned above will of course not work together with phonegap-plugin-push.

If you need to get things working, the proper solution to include phonegap-plugin-push would be the following code snippet, we're using this in our production builds right now. It's just a merge of all related build-extras.gradle files into one single file.

buildscript {
    repositories {
        jcenter()
        mavenLocal()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:+'
        classpath 'com.google.gms:google-services:3.0.0'
    }
}

ext.postBuildExtras = {
    apply plugin: com.google.gms.googleservices.GoogleServicesPlugin

    def inAssetsDir = file("assets")
    def outAssetsDir = inAssetsDir
    def outFile = new File(outAssetsDir, "cdvasset.manifest")

    def newTask = task("cdvCreateAssetManifest") << {
        def contents = new HashMap()
        def sizes = new HashMap()
        contents[""] = inAssetsDir.list()
        def tree = fileTree(dir: inAssetsDir)
        tree.visit { fileDetails ->
            if (fileDetails.isDirectory()) {
                contents[fileDetails.relativePath.toString()] = fileDetails.file.list()
            } else {
                sizes[fileDetails.relativePath.toString()] = fileDetails.file.length()
            }
        }

        outAssetsDir.mkdirs()
        outFile.withObjectOutputStream { oos ->
            oos.writeObject(contents)
            oos.writeObject(sizes)
        }
    }
    newTask.inputs.dir inAssetsDir
    newTask.outputs.file outFile
    def preBuildTask = tasks["preBuild"]
    preBuildTask.dependsOn(newTask)
}

This is of course just a workaround.

@Sewdn
Copy link

Sewdn commented Apr 23, 2018

@menelike thanks for your response. As long as there is no decent solution, we'll have to stick to workarounds like these.

@dagatsoin
Copy link
Author

as the 1.7 is not far away, should it possible to put some ressource on this issue ? @abernix Have you got enough informations?

kcarwilemiller added a commit to kcarwilemiller/cordova-plugin-meteor-webapp that referenced this issue Oct 2, 2018
This fixes the problem where multiple cordova plugins attempting to use the postBuildExtras in the gradle script will simply clobber each other. The cordova provided gradle template provides a defined list for plugins to add their post build extras to so they can all play nicely together.

https://github.com/apache/cordova-android/blob/73edf4de7b751ecc103e9fad3c6d71c149c9118e/bin/templates/project/app/build.gradle#L90

This fixes the problems outlined in: 
meteor/meteor#7600
Meteor-Community-Packages/raix-push#334
@MrSpark2591
Copy link
Contributor

My meteor version : 1.8
phonegap-plugin-push@2.2.3
cordova-plugin-meteor-webapp@1.4.1

  1. Using this comment add this file to path specified.
  2. Adding google-services.json form firebase for your app at <root>/cordova-build-override/google-services.json

This configuration worked for me. I am using this in our production no crashes in last 3 days. :)

@menelike
Copy link
Contributor

menelike commented Jan 15, 2019

Just testing METEOR@1.8.1-beta.15 and phonegap-plugin-push@2.2.3 (2.2.x needs cordova-android >= 7.1.0 https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/INSTALLATION.md#installation-requirements) which has been introduced in 5e26ebb

phonegap-plugin-push now uses

<dependency id="cordova-support-google-services" version="~1.1.0"/>

https://github.com/phonegap/phonegap-plugin-push/blob/d5f3e70eda2420f3e7e6f117a4dd2c7a990cf6b0/plugin.xml#L46

instead. Reading chemerisuk/cordova-support-google-services#17 (comment) this should still result in an error.

Anyway, when I remove the workaround #7600 (comment) I can build the project and it runs in the emulator (did not test push notifications yet)

@stale
Copy link

stale bot commented Dec 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale-bot label Dec 10, 2019
@stale
Copy link

stale bot commented Dec 18, 2019

This issue has been automatically closed it has not had recent activity.

@stale stale bot closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants