You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Dawid (JIRA)" <ji...@apache.org> on 2017/07/24 08:12:00 UTC

[jira] [Updated] (CB-13092) Plugin addition fails | Uncaught TypeError: undefined is not a function

     [ https://issues.apache.org/jira/browse/CB-13092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dawid updated CB-13092:
-----------------------
    Description: 
Hey guys, 

For a few days now, I am trying to add a plugin myself based on the documentation on the cordova homepage. [https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html]

I started with the German version (because I am from Germany) and was disappointed. It is written terribly. Just the quality of the text itself is bad. I didn't go far enough to evaluate the content.
I switched to the English version which is good, and I think I followed every step and have everything set up as it should be, but when I try to run my project (or a blank project for that matter) with the plugin added, I get the following error: 


{code:java}
07-24 03:51:15.036 29983-29983/? D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
07-24 03:51:15.247 29983-29983/io.cordova.hellocordova D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
07-24 03:51:15.286 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js: Line 28 : Uncaught TypeError: undefined is not a function
07-24 03:51:15.286 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(28)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js (28)
07-24 03:51:15.290 29983-29983/io.cordova.hellocordova D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
07-24 03:51:15.384 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 36 : Uncaught TypeError: Cannot read property 'querySelector' of null
07-24 03:51:15.384 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(36)] "Uncaught TypeError: Cannot read property 'querySelector' of null", source: file:///android_asset/www/js/index.js (36)
{code}

line 28 is the first line from following code: 
{code:java}
			window.echo("echome", function(echoValue){
				alert(echoValue == "echome");
			});
{code}

I appreciate any kind of help. This problem is really annoying me. 

Best regards
Dawid

  was:
Hey guys, 

For a few days now, I am trying to add a plugin myself based on the documentation on the cordova homepage. [https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html]

I started with the German version (because I am from Germany) and was disappointed. It is written terribly. Just the quality of the text itself is bad. I didn't go far enough to evaluate the content.
I switched to the English version which is good, and I think I followed every step and have everything set up as it should be, but when I try to run my project (or a blank project for that matter) with the plugin added, I get the following error: 


{code:java}
07-24 03:51:15.036 29983-29983/? D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
07-24 03:51:15.247 29983-29983/io.cordova.hellocordova D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
07-24 03:51:15.286 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js: Line 28 : Uncaught TypeError: undefined is not a function
07-24 03:51:15.286 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(28)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js (28)
07-24 03:51:15.290 29983-29983/io.cordova.hellocordova D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
07-24 03:51:15.384 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 36 : Uncaught TypeError: Cannot read property 'querySelector' of null
07-24 03:51:15.384 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(36)] "Uncaught TypeError: Cannot read property 'querySelector' of null", source: file:///android_asset/www/js/index.js (36)
{code}

line 28 is the first line from following code: 
{code:java}
			window.echo("echome", function(echoValue){
				alert(echoValue == "echome");
			});
{code}



> Plugin addition fails | Uncaught TypeError: undefined is not a function
> -----------------------------------------------------------------------
>
>                 Key: CB-13092
>                 URL: https://issues.apache.org/jira/browse/CB-13092
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: AllPlugins
>    Affects Versions: 7.0.1
>         Environment: Windows 8 64 bit Enterprise 
> Android Studio 2.3.3
> {code:java}
> $ cordova -v
> You have been opted out of telemetry. To change this, run: cordova telemetry on.
> 7.0.1
> $ npm --version
> 3.10.10
> $ git --version
> git version 2.13.2.windows.1
> $ grunt --version
> grunt-cli v1.2.0
> $ bower --version
> 1.8.0
> {code}
>            Reporter: Dawid
>            Priority: Minor
>
> Hey guys, 
> For a few days now, I am trying to add a plugin myself based on the documentation on the cordova homepage. [https://cordova.apache.org/docs/en/latest/guide/hybrid/plugins/index.html]
> I started with the German version (because I am from Germany) and was disappointed. It is written terribly. Just the quality of the text itself is bad. I didn't go far enough to evaluate the content.
> I switched to the English version which is good, and I think I followed every step and have everything set up as it should be, but when I try to run my project (or a blank project for that matter) with the plugin added, I get the following error: 
> {code:java}
> 07-24 03:51:15.036 29983-29983/? D/CordovaWebViewImpl: onPageDidNavigate(file:///android_asset/www/index.html)
> 07-24 03:51:15.247 29983-29983/io.cordova.hellocordova D/JsMessageQueue: Set native->JS mode to EvalBridgeMode
> 07-24 03:51:15.286 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js: Line 28 : Uncaught TypeError: undefined is not a function
> 07-24 03:51:15.286 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(28)] "Uncaught TypeError: undefined is not a function", source: file:///android_asset/www/plugins/cordova-plugin-echo-js/www/echo.js (28)
> 07-24 03:51:15.290 29983-29983/io.cordova.hellocordova D/CordovaWebViewImpl: onPageFinished(file:///android_asset/www/index.html)
> 07-24 03:51:15.384 29983-29983/io.cordova.hellocordova D/SystemWebChromeClient: file:///android_asset/www/js/index.js: Line 36 : Uncaught TypeError: Cannot read property 'querySelector' of null
> 07-24 03:51:15.384 29983-29983/io.cordova.hellocordova I/chromium: [INFO:CONSOLE(36)] "Uncaught TypeError: Cannot read property 'querySelector' of null", source: file:///android_asset/www/js/index.js (36)
> {code}
> line 28 is the first line from following code: 
> {code:java}
> 			window.echo("echome", function(echoValue){
> 				alert(echoValue == "echome");
> 			});
> {code}
> I appreciate any kind of help. This problem is really annoying me. 
> Best regards
> Dawid



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org