You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Pat Deegan (JIRA)" <ji...@apache.org> on 2016/05/30 13:28:12 UTC

[jira] [Created] (CB-11338) Plugin javascript resources not copied over to platform for ubuntu

Pat Deegan created CB-11338:
-------------------------------

             Summary: Plugin javascript resources not copied over to platform for ubuntu
                 Key: CB-11338
                 URL: https://issues.apache.org/jira/browse/CB-11338
             Project: Apache Cordova
          Issue Type: Bug
          Components: CLI
         Environment: Ubuntu 15.10

Current env (though only recently updated in hopes of resolving issue, which was present with prior versions of cordova/nodejs):

$ cordova -v
6.1.1


$ nodejs -v
v6.2.0


            Reporter: Pat Deegan


Plugin javascript files, including cordova_plugins.js and contents of plugins/ directory, fail to be included in builds for ubuntu.  The issue has been found using a host of different plugins (with notional ubuntu support), and will be demonstrated here using the cordova-plugin-device.

Note: the same plugins do work without issue in Android builds, and the problem may be solved with a simple manual copy, as demonstrated below.

To replicate failure:
=================================================
cordova create plugintest com.example.plugintest plugintest

cd plugintest/

cordova plugins add cordova-plugin-device   --save

cordova platform add ubuntu

cordova prepare ubuntu

cordova run ubuntu --verbose --debug 
=================================================

Using chromium to inspect console output and variables (entries preceded by ">" are my input to the console):

=================================================
Failed to load resource: net::ERR_FILE_NOT_FOUND  
file:///tmp/plugintest/platforms/ubuntu/native/prefix/www/cordova_plugins.js 
Received Event: deviceready
> device
VM67:1 Uncaught ReferenceError: device is not defined(...)
=================================================

To fix:
=================================================
cp ./platforms/ubuntu/platform_www/cordova_plugins.js ./platforms/ubuntu/native/prefix/www/

cp -R ./platforms/ubuntu/platform_www/plugins/ ./platforms/ubuntu/native/prefix/www/

cordova run ubuntu --verbose --debug --nobuild
=================================================

(The --nobuild option is important, otherwise the copied files are destroyed).  At this stage, connecting to the console shows no net::ERR_FILE_NOT_FOUND and the "device" from the plugin is present


=================================================
adding proxy for Device
Received Event: deviceready
> device
Device {available: true, platform: "Linux", version: "15.10", uuid: "{95eabc1234-d601-7563-d35b-abc1234}", ...}
> device.cordova
"4.3.2"
=================================================


I'm not certain whether the fix would allow building of deb packages, but is sufficient for "cordova run" commands to work correctly.

I'd appreciate any info concerning anything I may be missing/doing wrong and/or more permanent/automated fixes.

Thanks,
PatD



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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