I'm trying to get the new kendo scheduler widget to work in a kendo mobile application. As soon as I switch views (Go from month to week), it crashes. Same code works great on Chrome and Firefox. The error in logcat is
Uncaught TypeError: Cannot call method 'destroy' of undefined at file:///android_asset/www/app/frameworks/kendoui/js/kendo.all.min.js:30
I know this question is pretty old, but I ran into this issue today. It seems like if you set the individual "editables" to false you get the same results without the error.
So instead of:
editable: false
try using:
editable: {
create: false,
destroy: false,
resize: false,
update: false
}
Related
I am setting up what I THINK is a simple e2e test for my Angular 8 app. I am trying to learn BDD, so I tried swapping out Jasmine for Cucumber since it uses language more consistent with BDD.
When I run Protractor using Jasmine, the test passes:
this works:
navigateTo () {
return browser.get(browser.baseUrl) as Promise<any>;
}
When I run a cucumber version of the test, I get an error.
this fails:
Given ('Evidentia4 is running', (done) => {
browser.get (browser.baseUrl)
.then (done ());
});
"Error while waiting for Protractor to sync with the page: "both angularJS testability and angular testability are undefined."
The protractor config:
exports.config = {
allScriptsTimeout: 61000,
getPageTimeout: 60000,
specs: [
'./src/features/**/*.feature'
],
capabilities: {
browserName: 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
cucumberOpts: {
require: 'features/step-definitions/app-step-definitions.js',
tags: false,
format: 'node_modules/cucumber-pretty',
profile: false,
'no-source': true
}
};
I've read up on the error but have no idea why I am getting it.
Can you check if the AngularTestability API's is_stable flag is true or not. If it is true, please check how long it takes to become true. Sometimes it takes longer for Angular Webpage to become stable. Protractor uses the is_stable flag to sync with the page. You can try switching it off (not advised for angular pages) but give it a shot to pin point the error. You can do it by explicitly setting browser.ignoreSynchronisation = true. Now your tests will not wait for Angular promises to resolve. If this works, then you should see how long its taking the is_stable flag to turn true. Sometimes there can be a third party application that is causing the webpage not to be stable. Note that an angular webpage is stable only when all the promises are resolved. If that is the case, you can just wait for the page to be stable before the test execute.
The reason it is working in jasmine and not in cucumber is weird though. Maybe cucumber executes faster than jasmine. I'm not sure though.
Also please set SELENIUM_PROMISE_MANAGER to false in your browser so that you know if you are missing any promises.
I am working on a nativescript app for android and ios in which I have used REST APIs to store/get data in JSON format.
Based on JSON result from APIs sometime I need to show alert to the user.
It was working fine with Nativescript 4.1 but since I have upgraded to 4.2 app is unable to show alert boxs in ios. It shows the blank page and shows the following error.
(UIKitCore) Warning: Attempt to present <UIAlertController: 0x7fb5834eb000> on <UIViewControllerImpl: 0x7fb58659a670> whose view is not in the window hierarchy!
I have suspected that I am calling alert too early so I have tried to add timeout before alert but still it's the same.
if (result.status === 'E') {
setTimeout(function () {
const alertOptions = { title: 'Error', message: result.errMsg, okButtonText: 'OK', cancelable: false };
dialogs.alert(alertOptions).then(() => {
resolve('Error');
});
}, 700);
Points to note here is I am using nativescript-autocomplete component in one of my tabs. and this problem occurs only when user searches something using that component.
So it could be something related to that component.May be when autocomplete closes the modal, app looses the parent reference ?
Found an interim solution for now.
nativescript-fancyalert works like a charm. Will stick with that for sometime.
It is based on SCLAlertView for ios.
Do you know what could be causing the permissions request dialog on iOS to show behind the app? It actually flashes quickly and then goes behind. I have to press the home button to bring it to the front. Until then the UI is blocked.
I am using Everlive and I am calling the register method in the app's launchEvent as such:
var pushSettings = {
//iOS - specific settings
iOS: {
badge: true,
sound: true,
alert: true,
clearBadge: true
},
notificationCallbackIOS: function (userInfo) {
...
},
//Android - specific settings
android: {
projectNumber: '944301213976'
},
notificationCallbackAndroid: function callback(data) {
...
}
}
el.push.register(pushSettings, function (data) {
...
}, function (error) {
});
Thank you.
EDIT: I should add that I am testing on iOS 9.3.4 and right before the dialog goes behind the app, I get the following warning in the console: enabledRemoteNotificationTypes is not supported in iOS 8.0 and later. Not sure if it matters, but I wanted to mention it, just in case.
So, it turns out that it was a timing issue. I was running the code when the app was initializing. The popup will get displayed, but shortly after, the first screen (login in my case) gets initialized, stealing the focus from the popup.
Once I moved the code in a button tap event (after the screen loading was completed) everything worked as expected.
I am not sure if this is the best way to handle this. I am open for suggestions.
Also, you can see https://github.com/NativeScript/push-plugin/issues/38 for more info. Thank you Anton Dobrev for pointing me to the right direction.
I'm using a custom Modernizr build, v3.3.0. I've created a simple JSFiddle example to illustrate: https://jsfiddle.net/cqkg7x45/6/.
console.log(Modernizr);
will show the Modernizr object, and when I inspect it in the JS console I can see "videoautoplay" is a property with a value of "true".
But, when I do
console.log(Modernizr.videoautoplay)
it returns "undefined".
I was originally seeing this issue in a WordPress theme I'm developing, but was also able to recreate in JSFiddle and a separate stand-alone HTML page. Also, Modernizr is putting the "videoautoplay" class on my HTML tag, even when I know the device does not support that feature (iPhone 5).
Update: This issue appears to be happening in Chrome (v47.0.2526.106), but not Firefox (v43.0.2).
I'm going to answer my own question in case anyone else runs into this problem. I found the solution on this SO post: How do I detect if the HTML5 autoplay attribute is supported?.
Since this is an "async" test you can't access the property using the syntax
Modernizr.videoautoplay
You have to use the .on() function, as shown in the above SO post:
Modernizr.on('videoautoplay', function(result){
if(result) {
alert('video autoplay is supported');
} else {
alert('video autplay is NOT supported');
}
});
When I resize the column in Chrome, the screen freezes for 20 ~ 30 seconds. In Firefox, this doesn't happen.
I'm using slickgrid v2.0 alpha from Github.
<!--- JQUERY -->
<script type="text/javascript" src="js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
On my workstation I have Chrome 17.0.963.83 m and on the workstations with issues I have Chrome 6.0.495.0 m. I upgraded one of the workstations to the newest version of Chrome and I can't resize the collumns, it freezes up for 20 ~ 30 seconds.
I'm wondering what tests can I do to find out what is wrong, I don't see any errors in Javascript Console or anything else.
Thanks.
LATER EDIT
I'm initializing my grid as following
// additional options
var options = {
enableCellNavigation: true,
enableColumnReorder: false,
showHeaderRow: true,
editable:true,
asyncEditorLoading: false,
autoEdit:true,
defaultColumnWidth:90
};
And I'm not sure if this code affects the resize plugin
// header code
grid.onColumnsResized.subscribe(function (e, args) {
updateHeaderRow();
$('#pager').html("Count : " + grid.getDataLength());
});
Please don't ask why I'm not using the Dataview method provided with Slickgrid.
the solution was to upgrade the Chrome client to the latest version on faulty workstations, no coding errors whatsoever