After installing the Media plugin, i followed the documentation steps to integrate the recording code.
this is my code:
`this.platform.ready()
.then(() => {
const file: MediaObject = this.media.create('my_awesome_file.mp3');
file.startRecord();
window.setTimeout(() => file.stopRecord(), 10000);
});
and when i run it on real device i got this error message:
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'create' of undefined
TypeError: Cannot read property 'create' of undefined
Related
If I try to open a dialog.showMessageBox in Electron it returns Uncaught TypeError: Cannot read property 'showMessageBox' of undefined
Here the full Code:
if (name == '') {
const { dialog } = require('electron')
dialog.showMessageBox(null);
}
I tried the require('electron').remote module but that didn't produce an output that was near ok and I also tried reinstalling electron which didn't work, so I'm left with just the error.
I cannot find cause in extension (Even after removing the affected files it persists...)
Here's the error that I am seeing (Ir just loops with this every second)
let pingTimer = setInterval(ping, 100);
let pingUtilities = new PingUtilities();
function ping() {
let port = chrome.runtime.connect();
if (port) {
pingUtilities.checkTitleInLinkedIn();
pingUtilities.appendBookMarkInPing();
pingUtilities.checkCounter();
port.disconnect();
return;
}
clearInterval(pingTimer);
pingUtilities.onDisabled();
}
Uncaught Error: Extension context
invalidated. Uncaught Error: Extension context invalidated. Uncaught
Error: Extension context invalidated. Uncaught Error: Extension
context invalidated. Uncaught Error: Extension context invalidated.
Uncaught Error: Extension context invalidated. Uncaught Error:
Extension context invalidated.
Do you know what could be causing this?
I took a template that was written with various plug ins and started to convert it to React. Converting the existing JavaScript files to work in React is beyond my ability, so what I did was:
componentDidMount(){
var loadScripts = [
'./vendor/jquery/jquery.js',
'./vendor/bootstrap/js/bootstrap.min.js',
'./js/classie.js','./js/cbpAnimatedHeader.js',
'./vendor/jquery.easing/jquery.easing.min.js',
'./vendor/owl-carousel/owl.carousel.js',
'./vendor/magnific-popup/jquery.magnific-popup.min.js',
'./vendor/formstone/core.js',
'./vendor/formstone/transition.js',
'./vendor/formstone/background.js',
'./vendor/mixitup/jquery.mixitup.js',
'./vendor/wow/wow.min.js',
'./js/contact_me.js',
'./js/jqBootstrapValidation.js',
'./js/vitality.js'];
loadScripts.forEach(function(src) {
var script = document.createElement('script');
script.src = src;
script.async = false;
document.head.appendChild(script);
});
}
and it works perfect locally. When I pushed to heroku, I am getting many errors. The errors lead me to believe the files are loading asynchronously. Does Heroku allow the async = false tag?
Here are the errors:
Uncaught TypeError: Cannot read property 'scrollTop' of undefined
at e (background.js:3)
at HTMLDocument.c (background.js:3)
at b (core.js:3)
at Object.<anonymous> (core.js:3)
at Object.<anonymous> (jquery.js:3366)
at fire (jquery.js:3187)
at Object.add [as done] (jquery.js:3246)
at Array.<anonymous> (jquery.js:3365)
at Function.each (jquery.js:365)
at Object.<anonymous> (jquery.js:3361)
contact_me.js:3 Uncaught TypeError: $(...).jqBootstrapValidation is not a function
at HTMLDocument.<anonymous> (contact_me.js:3)
at fire (jquery.js:3187)
at Object.add [as done] (jquery.js:3246)
at jQuery.fn.init.jQuery.fn.ready (jquery.js:3496)
at jQuery.fn.init (jquery.js:2927)
at jQuery (jquery.js:75)
at contact_me.js:1
background.js:3 Uncaught TypeError: Cannot read property 'container' of undefined
at jQuery.fn.init.g (background.js:3)
at jQuery.fn.init.e (core.js:3)
at jQuery.fn.init.i (core.js:3)
at vitality.js:109
at vitality.js:135
I get
Uncaught TypeError occurs (Uncaught TypeError: Cannot read property
'__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined)
when I am using React JS
<script src="res/build/react-min.js"></script>
<script src="res/build/react-dom.min.js"></script>
The error is thrown because the react-dom cannot find an instance of React. I suppose this has something to do with the fact you are using res/build/react-min.js instead of res/build/react.min.js
Kudos for the function name in the react-dom tho:
(function(React) {
return React.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
});
Yesterday I ran meteor update and updated to 1.0.3.1 and it broke what I was working on.
I'm not sure what broke, but even the hello world project that ships with meteor is broken. When I do:
meteor create test
cd test
meteor run
I get these errors:
minimongo.js:3193 Uncaught SyntaxError: Unexpected end of input
ddp.js:3557 Uncaught SyntaxError: Unexpected end of input
follower-livedata.js:24 Uncaught TypeError: Cannot read property 'DDP' of undefined
application-configuration.js:24 Uncaught TypeError: Cannot read property 'DDP' of undefined
mongo.js:1000 Uncaught SyntaxError: Unexpected end of input
autoupdate.js:25 Uncaught TypeError: Cannot read property 'DDP' of undefined
livedata.js:22 Uncaught TypeError: Cannot read property 'DDP' of undefined
observe-sequence.js:24 Uncaught TypeError: Cannot read property 'LocalCollection' of undefined
blaze.js:28 Uncaught TypeError: Cannot read property 'ObserveSequence' of undefined
ui.js:22 Uncaught TypeError: Cannot read property 'Blaze' of undefined
templating.js:23 Uncaught TypeError: Cannot read property 'Blaze' of undefined
spacebars.js:25 Uncaught TypeError: Cannot read property 'Blaze' of undefined
global-imports.js:9 Uncaught TypeError: Cannot read property 'DDP' of undefined
template.test.js:2 Uncaught ReferenceError: Template is not defined
test.js:5 Uncaught ReferenceError: Template is not defined
The test.js:5 points here:
(function(){if (Meteor.isClient) {
// counter starts at 0
Session.setDefault('counter', 0);
Template.hello.helpers({ // <-error here
counter: function () {
return Session.get('counter');
}
});
I don't understand why this is causing an error.
The .html reads:
<template name="hello">
<button>Click Me</button>
<p>You've pressed the button {{counter}} times.</p>
</template>
which looks fine but maybe I am missing something.
UPDATE:
What I have tried so far:
I ran rm -rf .meteor then ran meteor rebuild and I got:
this is your first time using Meteor! Installing a Meteor distribution in your home directory.
######################################################################## 100.0%
Packages rebuilt.
which sounded good so I ran meteor run:
=> Started proxy.
=> Started MongoDB.
=> Started your app.
=> App running at: http://localhost:3000/
and still got the same errors. actually looks like it works!