@planckdensity still struggling here.
my app builds and deploys to Cordova… it just crashes/shuts down
I succesfully build the “hellow meteor” default app meteor create someapp
the meteor run android-device
with the same corodva plugins I am running in my app.
cordova-android-support-gradle-release@1.4.2
cordova-custom-config@5.0.2
cordova-plugin-calendar@4.4.7
cordova-plugin-compat@1.2.0
cordova-plugin-console@1.1.0
cordova-plugin-contacts@2.3.1
cordova-plugin-customurlscheme@https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git#d220fb3769b8ddbb197b91f18b57ceb315a85f44
cordova-plugin-device@1.1.6
cordova-plugin-file@4.3.3
cordova-plugin-geolocation@2.4.3
cordova-plugin-image-picker@1.1.3
cordova-plugin-inappbrowser@1.7.2
cordova-plugin-ios-ble-permissions@1.0.1
cordova-plugin-media-capture@1.4.3
cordova-plugin-meteor-webapp@1.4.2
cordova-plugin-speech-recognition-feat-siri@2.1.1
cordova-plugin-speechrecognition@https://github.com/pbakondy/cordova-plugin-speechrecognition.git#9302a31f7007a0180bd291e52da4130b48661924
cordova-plugin-splashscreen@4.1.0
cordova-plugin-statusbar@2.3.0
cordova-plugin-wkwebview-engine@1.1.4
cordova.plugins.diagnostic@3.0.2
phonegap-plugin-push@1.10.5
I have the following code to check permissions (which used to work ):
if(Meteor.isCordova) {
Meteor.startup(function() {
cordova.plugins.diagnostic.isCameraAuthorized(
authorized => {
if(!authorized) {
cordova.plugins.diagnostic.requestCameraAuthorization(
granted => {
console.log("Authorization request for camera use was " +
(granted ? "granted" : "denied"));
},
error => { console.error(error); }
);
}
},
error => { console.error(error); }
);
cordova.plugins.diagnostic.isLocationAuthorized(
authorized => {
if(!authorized) {
cordova.plugins.diagnostic.requestLocationAuthorization()(function(status) {
console.log("Authorization request for location use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied"));
}, function(error) {
console.error(error);
});
}
},
error => { console.error(error); }
);
cordova.plugins.diagnostic.isContactsAuthorized(
authorized => {
if(!authorized) {
cordova.plugins.diagnostic.requestContactsAuthorization()(function(status) {
console.log("Authorization request for contacts use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied"));
}, function(error) {
console.error(error);
});
}
},
error => { console.error(error); }
);
if(gIsAndroid()) {
cordova.plugins.diagnostic.isExternalStorageAuthorized(
authorized => {
if(!authorized) {
cordova.plugins.diagnostic.requestExternalStorageAuthorization(function(status) {
console.log("Authorization request for external storage use was " + (status == cordova.plugins.diagnostic.permissionStatus.GRANTED ? "granted" : "denied"));
}, function(error) {
console.error(error);
});
}
},
error => { console.error(error); }
);
}
});
}
In the test app, I get the same/similar errors I am getting, but the app does NOT crash.
[[[[ ~/Documents/development/test_cordova_android ]]]]]
=> Started proxy.
cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-android-support-gradle-release: ERROR: EXCEPTION: Failed to load dependencies. If using cordova@6 CLI, ensure this plugin is installed with the --fetch option: Error: Cannot find module 'xml2js'
WARNING: You are testing your app on a remote device. For the mobile app to be able to connect to the local server, make sure your device is on the same network, and that the network configuration
allows clients to talk to each other (no client isolation).
=> Started MongoDB.
=> Started your app.
=> App running at: https://buzzy.ngrok.io
=> Started app on Android Device.
I20180525-13:12:15.640(10)? 05-25 13:12:12.005 32323 32323 I CordovaLog: Changing log level to DEBUG(3)
I20180525-13:12:15.696(10)? 05-25 13:12:12.161 32323 32323 I chromium: [INFO:library_loader_hooks.cc(36)] Chromium logging enabled: level = 0, default verbosity = 0
I20180525-13:12:15.697(10)? 05-25 13:12:12.569 32323 32363 E chromium: [ERROR:devtools_http_handler.cc(292)] Cannot start http server for devtools. Stop devtools.
I20180525-13:12:15.697(10)? 05-25 13:12:13.531 32323 32323 I MeteorWebApp: Serving asset bundle with version: 7ceaca237e8d4404c07dd201adbb09e0cd171727
I20180525-13:12:15.697(10)? 05-25 13:12:14.294 32323 32375 E chromium: [ERROR:BudgetService.cpp(160)] Unable to connect to the Mojo BudgetService.
I20180525-13:12:17.150(10)? 05-25 13:12:16.486 32323 32323 I chromium: [INFO:CONSOLE(90)] "Uncaught ReferenceError: gIsAndroid is not defined", source: http://localhost:12656/app/app.js?hash=a1ce55d7d11f9c3d89433ec32e0abfdfd991693e (90)
I20180525-13:12:17.225(10)? 05-25 13:12:16.560 32323 32323 I chromium: [INFO:CONSOLE(309)] "Error in Success callbackId: Diagnostic1770786983 : TypeError: cordova.plugins.diagnostic.requestLocationAuthorization(...) is not a function", source: http://localhost:12656/cordova.js (309)
I20180525-13:12:17.226(10)? 05-25 13:12:16.561 32323 32323 I chromium: [INFO:CONSOLE(309)] "Error in Success callbackId: Diagnostic1770786984 : TypeError: cordova.plugins.diagnostic.requestContactsAuthorization(...) is not a function", source: http://localhost:12656/cordova.js (309)
I20180525-13:12:17.228(10)? 05-25 13:12:16.562 32323 32323 I chromium: [INFO:CONSOLE(309)] "Error in Success callbackId: Diagnostic1770786986 : TypeError: successCallback is not a function", source: http://localhost:12656/cordova.js (309)
I20180525-13:12:17.230(10)? 05-25 13:12:16.563 32323 32323 I chromium: [INFO:CONSOLE(309)] "Error in Success callbackId: Diagnostic1770786987 : TypeError: successCallback is not a function", source: http://localhost:12656/cordova.js (309)
I20180525-13:12:17.267(10)? 05-25 13:12:16.602 32323 32323 I chromium: [INFO:CONSOLE(69)] "Uncaught (in promise) TypeError: cordova.plugins.diagnostic.requestLocationAuthorization(...) is not a function", source: http://localhost:12656/app/app.js?hash=a1ce55d7d11f9c3d89433ec32e0abfdfd991693e (69)
I20180525-13:12:17.273(10)? 05-25 13:12:16.603 32323 32323 I chromium: [INFO:CONSOLE(80)] "Uncaught (in promise) TypeError: cordova.plugins.diagnostic.requestContactsAuthorization(...) is not a function", source: http://localhost:12656/app/app.js?hash=a1ce55d7d11f9c3d89433ec32e0abfdfd991693e (80)
I20180525-13:12:17.277(10)? 05-25 13:12:16.604 32323 32323 I chromium: [INFO:CONSOLE(466)] "Uncaught (in promise) TypeError: successCallback is not a function", source: http://localhost:12656/plugins/cordova.plugins.diagnostic/www/android/diagnostic.js (466)
I20180525-13:12:17.277(10)? 05-25 13:12:16.605 32323 32323 I chromium: [INFO:CONSOLE(324)] "Uncaught (in promise) TypeError: successCallback is not a function", source: http://localhost:12656/plugins/cordova.plugins.diagnostic/www/android/diagnostic.js (324)
I20180525-13:12:54.242(10)? 05-25 13:12:53.572 32323 32395 W MeteorWebApp: App startup timed out, reverting to last known good version
I20180525-13:13:18.434(10)? 05-25 13:13:17.770 32323 32323 I chromium: [INFO:CONSOLE(59)] "Authorization request for camera use was granted", source: http://localhost:12656/app/app.js?hash=a1ce55d7d11f9c3d89433ec32e0abfdfd991693e (59)
^C
so there are two issues
- the errors above which which occor both in the testapp and my app
- the crash which only occurs on my app
I am not sure if the crash is related to (1) or another reason that I can’t seem to see another event/crash in on the log.
In the Chrome debug console, I see this and then it has the “Appname has stopped - Close App”
cordova.js:1218 deviceready has not fired after 5 seconds.
cordova.js:1211 Channel not fired: onDOMContentLoaded
buzzy-buzz_resources-core.js?hash=40a6c5899ba0d55aaf106a32f42699e807458d0f:83 currentDomain https://buzzy.buzz
buzzy-buzz_resources-core.js?hash=40a6c5899ba0d55aaf106a32f42699e807458d0f:84 BUZZY_TEMPLATE_SERVER:false
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74434 Uncaught TypeError: cordova.plugins.diagnostic.isExternalStorageAuthorized is not a function
at app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74434
at maybeReady (meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899)
at Channel.releaseReadyHold (meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888)
at Channel.fire (cordova.js:842)
at cordova.js:229
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74434
maybeReady @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899
releaseReadyHold @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:229
setTimeout (async)
fireDocumentEvent @ cordova.js:224
(anonymous) @ cordova.js:1315
f @ cordova.js:689
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:1274
cordova.js:309 Error in Success callbackId: Diagnostic928947326 : TypeError: cordova.plugins.diagnostic.requestLocationAuthorization(...) is not a function
cordova.js:309 Error in Success callbackId: Diagnostic928947327 : TypeError: cordova.plugins.diagnostic.requestContactsAuthorization(...) is not a function
cordova.js:309 Error in Success callbackId: Diagnostic928947329 : TypeError: successCallback is not a function
cordova.js:309 Error in Success callbackId: Diagnostic928947330 : TypeError: successCallback is not a function
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:78159 query pageStyle {}
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74414 Uncaught (in promise) TypeError: cordova.plugins.diagnostic.requestLocationAuthorization(...) is not a function
at app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74414
at onSuccess (diagnostic.js:500)
at onSuccess (diagnostic.js:483)
at onSuccess (diagnostic.js:298)
at Object.callbackFromNative (cordova.js:291)
at processMessage (cordova.js:1114)
at processMessages (cordova.js:1137)
at meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74414
onSuccess @ diagnostic.js:500
onSuccess @ diagnostic.js:483
onSuccess @ diagnostic.js:298
callbackFromNative @ cordova.js:291
processMessage @ cordova.js:1114
processMessages @ cordova.js:1137
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
androidExec @ cordova.js:972
Diagnostic.getPermissionsAuthorizationStatus @ diagnostic.js:301
Diagnostic.getLocationAuthorizationStatus @ diagnostic.js:485
Diagnostic.isLocationAuthorized @ diagnostic.js:502
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74412
maybeReady @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899
releaseReadyHold @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:229
setTimeout (async)
fireDocumentEvent @ cordova.js:224
(anonymous) @ cordova.js:1315
f @ cordova.js:689
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:1274
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74425 Uncaught (in promise) TypeError: cordova.plugins.diagnostic.requestContactsAuthorization(...) is not a function
at app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74425
at onSuccess (diagnostic.js:870)
at onSuccess (diagnostic.js:270)
at Object.callbackFromNative (cordova.js:291)
at processMessage (cordova.js:1114)
at processMessages (cordova.js:1137)
at meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74425
onSuccess @ diagnostic.js:870
onSuccess @ diagnostic.js:270
callbackFromNative @ cordova.js:291
processMessage @ cordova.js:1114
processMessages @ cordova.js:1137
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
androidExec @ cordova.js:972
Diagnostic.getPermissionAuthorizationStatus @ diagnostic.js:273
Diagnostic.getContactsAuthorizationStatus @ diagnostic.js:885
Diagnostic.isContactsAuthorized @ diagnostic.js:872
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74423
maybeReady @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899
releaseReadyHold @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:229
setTimeout (async)
fireDocumentEvent @ cordova.js:224
(anonymous) @ cordova.js:1315
f @ cordova.js:689
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:1274
diagnostic.js:466 Uncaught (in promise) TypeError: successCallback is not a function
at onSuccess (diagnostic.js:466)
at onSuccess (diagnostic.js:354)
at Object.callbackFromNative (cordova.js:291)
at processMessage (cordova.js:1114)
at processMessages (cordova.js:1137)
at meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
onSuccess @ diagnostic.js:466
onSuccess @ diagnostic.js:354
callbackFromNative @ cordova.js:291
processMessage @ cordova.js:1114
processMessages @ cordova.js:1137
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
processMessages @ cordova.js:1141
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
androidExec @ cordova.js:972
Diagnostic.getPermissionsAuthorizationStatus @ diagnostic.js:301
Diagnostic.getCameraAuthorizationStatus @ diagnostic.js:630
Diagnostic.isCameraAuthorized @ diagnostic.js:647
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74401
maybeReady @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899
releaseReadyHold @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:229
setTimeout (async)
fireDocumentEvent @ cordova.js:224
(anonymous) @ cordova.js:1315
f @ cordova.js:689
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:1274
diagnostic.js:324 Uncaught (in promise) TypeError: successCallback is not a function
at onSuccess (diagnostic.js:324)
at Object.callbackFromNative (cordova.js:291)
at processMessage (cordova.js:1114)
at processMessages (cordova.js:1137)
at meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
onSuccess @ diagnostic.js:324
callbackFromNative @ cordova.js:291
processMessage @ cordova.js:1114
processMessages @ cordova.js:1137
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
androidExec @ cordova.js:972
Diagnostic.requestRuntimePermissions @ diagnostic.js:358
Diagnostic.requestLocationAuthorization @ diagnostic.js:468
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74414
onSuccess @ diagnostic.js:500
onSuccess @ diagnostic.js:483
onSuccess @ diagnostic.js:298
callbackFromNative @ cordova.js:291
processMessage @ cordova.js:1114
processMessages @ cordova.js:1137
(anonymous) @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:1196
Promise.then (async)
Promise.then @ promise.js?hash=9ba5b4e2acdf19ad7b7bac54d00338de4c1ecd0d:126
nextTick @ cordova.js:930
androidExec @ cordova.js:972
Diagnostic.getPermissionsAuthorizationStatus @ diagnostic.js:301
Diagnostic.getLocationAuthorizationStatus @ diagnostic.js:485
Diagnostic.isLocationAuthorized @ diagnostic.js:502
(anonymous) @ app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74412
maybeReady @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:899
releaseReadyHold @ meteor.js?hash=0ed6f381c727c0ebb1e89e3f1a5c58abf83481f9:888
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:229
setTimeout (async)
fireDocumentEvent @ cordova.js:224
(anonymous) @ cordova.js:1315
f @ cordova.js:689
Channel.fire @ cordova.js:842
(anonymous) @ cordova.js:1274
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65126 LAYOUT AUTORUN 2
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65128 LAYOUT AUTORUN 2 undefined
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65148 about to subs for communityID null listType: all
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:71961 NO CONNECTIONS HEADER
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:74404 Authorization request for camera use was granted
webapp.js?hash=d8189fa667b77a6959459ae756c28fd264ac2eaa:70 Error: Skipping downloading new version because the Cordova platform version or plugin versions have changed and are potentially incompatible
at webapp_local_server.js:36
at Object.callbackFromNative (cordova.js:291)
at <anonymous>:1:9
(anonymous) @ webapp.js?hash=d8189fa667b77a6959459ae756c28fd264ac2eaa:70
(anonymous) @ webapp_local_server.js:37
callbackFromNative @ cordova.js:291
(anonymous) @ VM300:1
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65126 LAYOUT AUTORUN 2
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65128 LAYOUT AUTORUN 2 undefined
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65148 about to subs for communityID null listType: all
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:78159 query pageStyle {}
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:78159 query pageStyle {}
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65416 sign in origin http://localhost:12456
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65416 sign in origin http://localhost:12456
app.js?hash=efb1265cd711afdaeded7001b3a5d77ebbd852c9:65416 sign in origin https://js.stripe.com
Here’s my timeout settings
App.setPreference("LoadUrlTimeoutValue", 40000);
App.setPreference("WebAppStartupTimeout", 40000);
App.setPreference('android-targetSdkVersion', '23');
App.setPreference('android-minSdkVersion', '16');