Giter Site home page Giter Site logo

cordova's Introduction

Apache Cordova

  • Mobile apps with HTML, CSS & JS
  • Target multiple platforms with one code base
  • Free and open source

Website and documentation: https://cordova.apache.org/

Filing a Bug

To file a bug, or raise another type of issue, please navigate to the appropriate repo from the list below and create a New Issue from the Issues tab of the repo.

Repositories

All Cordova code is hosted in repositories on GitHub.

An overview of the dependencies among a selection of these repositories is shown in below graph. The leading apache/cordova- has been stripped from all repository names. Dotted edges are implicit dependencies (i.e. not expressed in package.json).

Cordova Dependency Graph

Continuous Integration status of all relevant repositories: https://apache.github.io/cordova-status/

Here is a full list of all repositories:

Platforms

Active Platforms

Other Platforms

Deprecated Platforms

Deprecated Platforms

Core Plugins

Active Core Plugins

Experimental or Unfinished Core Plugins

Deprecated Core Plugins

Deprecated Core Plugins

Tooling

CLIs

Libraries

Testing

Templates

Documentation and Website(s)

Organization / Apache

Organization / Apache

Other

Unused / Outdated / Deprecated

Unused / Outdated / Deprecated

cordova's People

Contributors

breautek avatar dpogue avatar erisu avatar github-actions[bot] avatar janpio avatar niklasmerz avatar purplecabbage avatar raphinesse avatar shazron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova's Issues

[Plugins] Clean up plugin tests

Make sure plugin tests:

This issue will only be closed, when all master and new PRs only fail by real test failures of broken functionality.

[Plugins] Improve plugin tests

Change plugin tests to:

  • test all relevant platforms
  • test all relevant platform versions: #38
  • are structured and built in a similar way
    • same libraries and versions
    • package.json npm scripts
    • CI setup and configuration
  • are faster (= take minimal possible time to run)
  • are more consistent (= not flaky or brittle)
  • are simpler to understand
    • what runs in Travis, what in Saucelabs?
  • are properly documented

Currently blocked by #28

[Plugins] Typings

Typings for TypeScript: Some plugins have them, some don't, some are kept updated, some are not. Are those still needed? What is the simplest way to keep them up to date? Do we want to support them or not?

Commit package-lock.json

Follow up to #3

Tasks

Platforms

Active Platforms
  • cordova-android
  • cordova-ios
  • cordova-windows
  • cordova-browser
  • cordova-osx
  • cordova-test-platform
  • cordova-electron

Core Plugins

Active Core Plugins
Experimental or Unfinished Core Plugins
  • cordova-plugins

Tooling

CLIs
  • cordova-cli
  • cordova-plugman
  • cordova-coho
Libraries
Testing
  • cordova-plugin-test-framework
  • cordova-paramedic
  • cordova-mobile-spec

Templates

  • cordova-app-hello-world (not needed)

Documentation and Website(s)

Other

  • cordova-node-xcode

(Task list was generated with http://cordova.betamo.de/cordova-github-repositories-checkboxes_markdown.php. Anything missing or not needed? Ping me and I will update script.)

No inertial scroll on iOS with facebok plugin page

Hi, i have an app which displays a Facebook content page with the Facebook plugin page.

On iOS, there is no inertial scrolling and i need it. I use Cordova 2.2 (Version edited) with Framework7 2.2.1.

There is the html who display it :

<div id="facebook" class="page-content tab tab-link">
      <iframe src="https://www.facebook.com/plugins/page.php?href=*thereIsTheValidHref*&tabs=timeline&width=340&height=500&small_header=true&adapt_container_width=true&hide_cover=true&show_facepile=false&appId" width="340" height="500" style="border:none;overflow:hidden;display:block;margin-left:auto;margin-right: auto" scrolling="yes" frameborder="0" allowTransparency="true" allow="encrypted-media"></iframe>
       <div class="block text-align-center">
                 <div class="preloader color-blue "></div>
        </div>
</div>

The iframe is well displayed. I saw that is possibly the inertial sroll on iframe with safari wich is a problem but I do not really know if it comes from cordova.
It can ?

cordova-android version check failed ... continuing anyways

As reported by @purplecabbage in [1]:

Installing "cordova-plugin-whitelist" for android

cordova-android version check failed
("/Users/jessem/test/android713/platforms/android/cordova/version"),
continuing anyways.

From a quick code search I found the "version check failed" message in cordova-lib, at: src/plugman/install.js#L182 ([2])

In response to a followup question @purplecabbage wrote:

The cli is linked current master

Looking at the code it looks like this warning message is emitted when attempt to spawn a version check script fails with an error.

I have not been able to reproduce this warning so far, hopeful that someone else can provide a better reproduction scenario. It would be ideal if someone could post a Cordova project that reproduces this issue.

[1] https://lists.apache.org/thread.html/3ab1ed7ac85905b2cd4b85eb58e6ee72c01821c65308e42d5827050f@%3Cdev.cordova.apache.org%3E

[2] https://github.com/apache/cordova-lib/blob/master/src/plugman/install.js#L182

[Plugins] Android tests break when a new CLI is released that pins a new cordova-android version that requires a new Android target to be installed

This is a rerun of a test, that passed 2 months before. So the exact same test, that used to pass, now does not any more: https://travis-ci.org/apache/cordova-plugin-contacts/jobs/431412788

The problem is that the plugin tests install the newest CLI with npm install -g cordova. If there is a new version of the CLI that pins a newer version of cordova-android that requires a newer Android target to be installed by default, this will fail as the Android targets to be installed are defined in travis.yml: https://github.com/apache/cordova-plugin-contacts/blob/99f9ea9ff94959c20a7823619744118725d09e31/.travis.yml#L60

So just by releasing a new CLI version with a new pinned cordova-android, we can make all the plugin tests for Android fail.

Rework use of ~ in build.json

Based on:
apache/cordova-cli#359
apache/cordova-android#563
apache/cordova-docs#909

Conclusion was to not merge any of those PRs, but rework how the support for ~ is implemented. Instead of manually reading env variables, using untildify should be much more stable.

During the discussion also the suggestion came up to support this in all build.json files, not just for cordova-android. (Will have to check if any of those use paths at all, so that it is worth the effort to move this from cordova-android to a more general location.)

Version pinning in Cordova CLI (via cordova-lib)

In https://github.com/apache/cordova-lib/blob/master/src/platforms/platformsConfig.json Cordova "pins" a number of platforms to a specific version, that is used to install the platform is no other version is supplied. This behavior is also mentioned in several places in https://github.com/apache/cordova-coho/blob/master/docs/versioning-and-release-strategy.md.

The clear disadvantage of this behavior is that we need to do a release of cordova-lib (and cordova-cli that contains it) to update the pinned versions. Until then, people just running e.g. cordova platform add android will get an outdated version by default and (from experience on Stack Overflow, Ionic Forum and support issues here) have to be told regularly to update the platform when they encounter a bug (cordova platform add [email protected]) - it is just not really expected behavior for most users that the default command doesn't install the newest version.

  1. Why do we need pinned versions?
  2. What is the history behind this feature?
  3. What are the advantages of it?
  4. Does this behavior still make sense today?
  5. Can we maybe get rid of it and replace it with "will install latest by default, but can of course still be overridden by supplying a specific version" in a future cli/lib version?

Tool to run tests of multiple repos locally

@raphinesse built some nice automation (or used the appropriate tools) for https://github.com/raphinesse/cordova-cross-spawn-test
I think it would be a great idea to expand that into a cordova-all-the-tests repo (maybe with a more appropriate name) that we can clone and use to run all test suites locally.
Something like "manual CI" for all (platform, tooling, plugin) repos on our environments.

Functionality:

  • Set up and prepare repositories
  • Run all tests ("all" being configurable in a file)
  • Run "sets" of tests: tooling, platforms, cli

This has partial overlap with cordova-coho, so we should check if there is some synergy or not.

Fix or remove undocumented plugin directory source-file behavior

Triggered by @ippeiukai in apache/cordova-android#547 (comment):

[...] behaviour of source-file is not documented, [...] it was working with cordova-android@6 but no longer with cordova-android@7.

vaenow/cordova-plugin-app-update#119
(Specifying a directory with many .java files as source-file src no longer works.)

FYI: though not documented officially, it is a known behaviour:
https://stackoverflow.com/q/28042385

The behavior to copy entire directory contents of a element in case of a directory in the src attribute is undocumented. It is now working on cordova-ios@latest, cordova-osx@latest, and cordova-android@6 but not cordova-android@latest. (Source files would be put into incorrect subdirectory on cordova-android@latest.) But there are a couple issues with this undocumented feature on iOS and macOS ("osx"):

  • this feature does not work with header files
  • not possible to specify build flags per source file

I can think of the following possible solutions:

  • explicitly remove this undocumented behavior
  • fix the behavior on cordova-android and document it

[WebView] Class can't cast to SystemWebChromeClient

Hello,
I am using latest apache cordova android version

I have old code for embeding webview and I have connection with WebRtc

So i have to override setWebChromeClient method of SystemWebview.java file for Webrtc connection

my code snippet is below


SystemWebView   cwv =  (SystemWebView) findViewById(R.id.SystemWebView);

cwv.setWebChromeClient(new WebChromeClient() {

				@Override
				public void onPermissionRequest(final PermissionRequest request) { // this for webrtc connection

		javaToJavascript.webrtcCallLog("web.java", "permission asked is"+ Arrays.deepToString(request.getResources()),0); //This logs the type of permission asked
					Log.i("The list of permission asked is ", Arrays.deepToString(request.getResources())); // this askes for android.webkit.resource.AUDIO_CAPTURE permission

					getActivity().runOnUiThread(new Runnable() {
						@TargetApi(Build.VERSION_CODES.LOLLIPOP)
						@Override
						public void run() {
							Log.i("Value Of the permission asked is ", request
									.getOrigin().toString());

							request.grant(request.getResources());

						}
					});

				}


And SystemWebview.java Method is as follows


    @Override
    public void setWebChromeClient(WebChromeClient client) {
        chromeClient = (SystemWebChromeClient)client;
        super.setWebChromeClient(client);
    }

Now i got error regarding

My class (WebCall) cant cast to SystemWebChromeClient

I stuck in this problem since 20 to 30 days...
Please any help would be appreciable

plugin.xml with platform version filters

About apache/cordova-android#580, I have a higher level concern about handling deprecation as a plugin author.

It's ok to allow breaking changes in Cordova for the sake of progress, but the following small change in plugin.xml structure would give plugin authors flexibility to support multiple cordova versions.

Has it been ever considered to allow multiple <platform> tags with version filters?

Short demo of what I mean in a plugin description file:

<plugin ...>
  <platform type="android" version="<8.0.0">
    ...
    <source-file src="src/android/ILib.aidl" target-dir="src/com/android/vending/billing" />
    ...
  </platform>
  <platform type="android" version=">=8.0.0">
    ...
    <lib-file src="src/android/ILib.aidl" />
    ...
  </platform>
  <platform type="android" version="*">
    ... common stuff ...
  </platform>
</plugin>

It's probably not specific to cordova-android though, where should such an idea be discussed?

Link `node_modules` during platform creation if it exists

After removing bundled node_modules from platforms in #6, I noticed that the platforms unconditionally copy their (now potentially missing) bundled node_modules in their create scripts. Since they all use shelljs for that, it currently does not break the creation if node_modules but only causes an error message to be displayed.

Example from cordova-android:
https://github.com/apache/cordova-android/blob/8dfddef6f9f5d00fba591a2fbe8837ccebea49a7/bin/lib/create.js#L171

A recent conversation with @erisu made me realize that we actually still need to either copy or preferably link <PROJECT>/node_modules/cordova-<PLATFORM>/node_modules to <PROJECT>/platforms/<PLATFORM>/node_modules if the former exists. Otherwise Node's module resolution would not pick up the correct dependency versions for the platform in case of version conflicts.

Task List
  • cordova-android
  • cordova-browser
  • cordova-ios
  • cordova-osx
  • cordova-windows
  • cordova-test-platform

Note

In the long run, we should probably try to have only native projects in platforms and keep the platforms' build scripts in the project's node_modules and run them from there. That should make things easier and cleaner IMHO.

build failled after change phonegap-version to CLI 8.0

Hi, i changed CLI 8.0 to use the plugin background-geolocation

Details of PhoneGap Build :
App ID
3354120
PhoneGap (iOS / Android / Windows)
cli-8.0.0 (4.5.4 / 7.0.0 / 5.0.0)
Source
.zip package

I changed my config.xml like below ๐Ÿ‘

<plugin name="cordova-background-geolocation-lt" spec="2.12.0" source="npm">  
<preference name='phonegap-version' value='cli-8.0.0' /> 

my plugins in config.xml

<plugin name="cordova-plugin-barcodescanner" spec="0.7.0" source="npm" />
<plugin name="cordova-plugin-battery-status" spec="2.0.1" source="npm" />
<plugin name="cordova-plugin-camera" spec="2.4.1" source="npm">
<plugin name="cordova-plugin-dialogs" spec="1.2.1" source="npm" />
<plugin name="cordova-plugin-file" spec="4.2.0" source="npm" />
<plugin name="cordova-plugin-file-transfer" spec="1.5.1" source="npm" />
<plugin name="cordova-plugin-geolocation" spec="2.4.3" source="npm">
<plugin name="cordova-plugin-globalization" spec="1.0.3" source="npm" />
<plugin name="cordova-plugin-inappbrowser" spec="2.0.2" source="npm" />
<plugin name="cordova-plugin-network-information" spec="1.2.1" source="npm" />
<plugin name="cordova-plugin-splashscreen" spec="3.2.2" source="npm" />
<plugin name="cordova-plugin-whitelist" spec="1.3.3" source="npm" /> 
<plugin name="cordova-background-geolocation-lt" spec="2.12.0" source="npm">
</plugin>  <plugin name="cordova-plugin-secure-key-store" spec="1.5.5" source="npm" />

My log from Phone Gap Build
Error: ENOENT: no such file or directory, open '/tmp/gimlet/21220720/3358504/www_android/project/AndroidManifest.xml'

Build Date: 2018-10-31 16:21:44 +0000  
--------------------------------------------------------------------------------  
PLUGIN OUTPUT  
--------------------------------------------------------------------------------  
"plugman-151 install --platform android --project /project --plugin cordova-plugin-barcodescanner@~0.7.0 --nohooks=.": Fetching plugin "cordova-plugin-barcodescanner@~0.7.0" via npm  
Installing "cordova-plugin-barcodescanner" at "0.7.4" for android  
Fetching plugin "cordova-plugin-compat@^1.0.0" via npm  
Installing "cordova-plugin-compat" at "1.2.0" for android  
Plugin doesn't support this project's cordova-android version. cordova-android: 7.0.0, failed version requirement:   
  <6.3.0  
Skipping 'cordova-plugin-compat' for android  
Failed to install 'cordova-plugin-barcodescanner': Error: ENOENT: no such file or directory, open '/tmp/gimlet/21220720/3358504/www_android/project/AndroidManifest.xml'  
  at Error (native)  
  at Object.fs.openSync (fs.js:640:18)  
  at Object.fs.readFileSync (fs.js:508:33)  
  at Object.parseElementtreeSync (/project/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)  
  at new AndroidManifest (/project/cordova/lib/AndroidManifest.js:29:20)  
  at AndroidProject.getPackageName (/project/cordova/lib/AndroidProject.js:99:12)  
  at Api.addPlugin (/project/cordova/Api.js:223:57)  
  at handleInstall (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:594:10)  
  at /usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/pgb-cordova-lib/src/plugman/install.js:364:24  
  at _fulfilled (/usr/local/lib/npm/lib/node_modules/pgb-plugman-151/node_modules/q/q.js:787:54)  
ENOENT: no such file or directory, open '/project/AndroidManifest.xml'  

Related to this post https://stackoverflow.com/questions/47926796/cordova-does-not-create-androidmanifest-xml?noredirect=1&lq=1, I tried downgrade to cordova to CLI 7.1.0. It's OK but the plugin ordova-background-geolocation-lt needs cordova-android 7.0. Other solution is to use Hooks to delete file before installing plugins. But, I can't use this method with PhoneGap Build.

Thank by advance.

Cordova Not Replacing Old Resource File

Hi,

When I tried to change file res/icons/logo.png with the new image under the same name, cordova doesn't seem to replace on android platform resource file too. I have tried to re-add android platform to cordova project, deleting platforms and plugins folders but none of them work. Please help...

New image:

screenshot_20

Old image still in cordova android resource folder:

screenshot_21

Note: The app icon on android home screen changed but the resource file still uses the old icon.

screenshot_20181023-111012_microsoft launcher

config.xml content:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.superlotterycheck" version="1.0.0" xmlns="http://www.w3.org/ns/widgets"     xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Lottery Check</name>
    <description>
        A US lottery checker app
    </description>
    <author email="[email protected]" href="http://superlotterycheck.com">
        Test
    </author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon src="res/icons/logo.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon src="res/icons/logo.png" />
    </platform>
    <preference name="DisallowOverscroll" value="true" />
    <preference name="SplashScreen" value="none" />
    <preference name="StatusBarOverlaysWebView" value="true" />
    <preference name="StatusBarBackgroundColor" value="#FFFFFF" />
    <preference name="android-minSdkVersion" value="19" />
    <preference name="android-targetSdkVersion" value="25" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.3" />
    <plugin name="cordova-plugin-x-toast" spec="^2.7.0" />
    <plugin name="cordova-plugin-admob-free" spec="^0.21.0">
        <variable name="ADMOB_APP_ID" value="admobid" />
    </plugin>
    <plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.1.3" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-dialogs" spec="^2.0.1" />
    <plugin name="onesignal-cordova-plugin" spec="^2.4.4" />
    <engine name="android" spec="^7.1.1" />
</widget>

Remove usage of cordova-common/superspawn

After apache/cordova-common#50 is merged, superspawn is just a small wrapper around cross-spawn, that makes sure the cmd is actually executable by chmod-ing the file. As this should never be necessary for e.g. npm and other commands we run, this is probably only appropriate in places like hooks or similar. superspawn can thus be replaced with direct invocations of cross-spawn, maybe removed alltogether.

cordova update to 7.1.1 get error of gap_init pop up And not working properly

I have updated android 3.5.1 to 7.1.1(yes it's too old) after that
i upadated following plugins

<plugin name="cordova-plugin-contacts" spec="^3.0.1" />
 <plugin name="cordova-plugin-device" spec="^2.0.2" />
 <plugin name="cordova-plugin-file" spec="^6.0.1" />
 <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" />
 <plugin name="cordova-plugin-media" spec="^5.0.2" />
 <plugin name="cordova-plugin-network-information" spec="^2.0.1" />
 <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" />
 <plugin name="cordova-plugin-camera" spec="^4.0.3" />

then my app not working and showing popup of following messages

page at file:// says at
gap_init:3
then
gap:[0,"CoreAndroid","shows","blah...."]
gap:[0,"Device","shows","blah...."]
gap:[0,"File","shows","blah...."]
gap:[0,"NetworkStatus","requestAllPath","blah...."]

one by one i tap ok my index.html file doesnt load also ....
How to solve this problem ?
Any help would be appreciate

thank you..

Changelogs content, formatting and links

During apache/cordova-docs#911 by @brodybits I noticed that our previous rules and guidelines for changelogs don't work any more:

apache/cordova-docs#911 (comment):

Some of the changelog items link to PRs, some to items.

When JIRA was a thing, they all linked to the issue they fixed. Now we don't always have issues, and it is not really defined how to handle this. In my opinion it makes sense to link all to the PR, as the PR usually includes a link to the issue it closes. Agree? Or issue and PR both in a specific way?

A proper "Squash and merge" commit message for example includes the PR number in the commit message: cordova-android 7.1.3 blog post (#911) (for this PR). Maybe we should use this template, link the #911 to the PR and add an issue in front if available?

@brodybits replied:

apache/cordova-docs#911 (comment)

In my opinion it makes sense to link all to the PR, as the PR usually includes a link to the issue it closes.

I'm fine to do it that way for now, would like to see feedback from others.

A proper "Squash and merge" commit message for example includes the PR number in the commit message: cordova-android 7.1.3 blog post (#911) (for this PR). Maybe we should use this template, link the #911 to the PR and add an issue in front if available?

  1. departure from convention of using CB-??? or GH-??? that I saw elsewhere, looks like this came from Apache convention

  2. just using #??? is not so good since we have a toolset with quite a few different repos. I would favor something like apache/cordova-android#550 to refer to PR #550 on cordova-android, like how GItHub references issues & PRs.

  3. moving the reference from the beginning to the end is yet another departure

We can continue the discussion here now.

Clean up package.json across all repositories

Laborious task:

Go through all package.json files for all repositories and clean them up. Remove things like

  "bugs": {
    "url": "https://issues.apache.org/jira/browse/CB"
  },

or other unneeded entries.

Might require some discussion on what to remove and keep first.

Use os.homedir() instead of process.env.HOME & process.env.USERPROFILE

From discussion in #48 and some additional research ([1]) I discovered that require('os').homedir() is more portable than using process.env.HOME and sometimes process.env.USERPROFILE as I found in the following places:

[1] https://stackoverflow.com/questions/9080085/node-js-find-home-directory-in-platform-agnostic-way

Better testing of platform releases regarding plugin compatibility

The 7.1.3 release of cordova-android had a breaking bug with multiple plugins that included app in their name, including our own cordova-plugin-inappbrowser.

The cordova-android tests did not catch that.

We should figure out a way to better test our platforms with plugins.

Centralize plugin test configuration?

When looking through the core plugins' .travis.yml for #28 I noticed that they are all very similar, but not identical and have tiny differences. The addons.jwt.secure difference seems to be by design, for the rest, I am not too sure.

Would it maybe make sense to create an additional repository where we have a template .travis.yml (and other common files) and a script/tool to distribute that/those file(s) to all core plugin repositories?

Grey Screen while opening the app

HI Team

I have created an app using Ionic3 and cordova. I see 2-3 seconds of Grey screen even before my splash screen. Need assistance in this regards on how to solve this issue.

Regards
GVB

Smarter way to set Cordova platform version number

I find it really unfortunate that we have to use tooling to set Cordova platform versions in multiple places such as package.json, generated cordova.js, VERSION file, Android Gradle file, etc.

I think it should be relatively straightforward to update the Cordova tooling so that we can mark the version in package.json and the scripts would generate the platform files with the correct version where it is needed whenever the user does cordova platform add.

And I suspect that in Gradle we should be able to define a constant or variable with the version in one place and reference it in the other places.

Drop dependency on Q, use native promises

We have to do this top down in our dependency graph. That way, we always can release each package without risking to break any of its consumers that rely on Q instances being returned. The order in the following task list is a topological ordering of the below dependency graph. So if we do everything in this order, each package will be processed before any of its dependencies.

There are no plugins that depend on Q.

Task list

Cordova Dependency Graph

Only packages with outstanding work in this issue
Cordova dependency graph

`cordova plugin remove [plugin]` doesn't always work.

Cordova: 8.1.2 ([email protected])

Recently, specifically, I've attempted using a few plugins that, after build, will not remove. The script will claim to remove them, then end with something like:

Uninstalling 1 dependent plugins.
Uninstalling cordova-plugin-compat from android
Android Studio project detected
Uninstalling phonegap-plugin-speech-recognition from android
Uninstalling 1 dependent plugins.
Uninstalling cordova-plugin-compat from browser
Uninstalling phonegap-plugin-speech-recognition from browser
js-module uninstall called : plugins/phonegap-plugin-speech-recognition/www/browser/SpeechRecognition.js
Uninstalling 1 dependent plugins.
Uninstalling cordova-plugin-compat from ios
ENOENT: no such file or directory, open '/Users/myuser/code/cordova_projects/myproject/src-cordova/platforms/ios/www/cordova_plugins.js'

This happens with various plugins. The only solution ends up being to cordova platform remove and re-add the platform. Please advise.

[Plugins] Android Tests are failing across multiple plugin repos

Plugin tests for Android are failing without a real reason.

Example: apache/cordova-plugin-media-capture#106

Relevant lines:

cordova-paramedic: checking requirements for platform android
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed 
Please install Android target / API level: "android-27".
Hint: Open the SDK manager by running: /usr/local/android-sdk-25.2.3/tools/android
You will require:
1. "SDK Platform" for API level android-27
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
Gradle: installed /usr/local/gradle-4.0.1/bin/gradle
Some of requirements check failed

C

When executing cordova build android --release, I get the following error.

Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.5/httpcore-4.2.5.jar
Download https://jcenter.bintray.com/com/intellij/annotations/12.0/annotations-12.0.jar
Download https://jcenter.bintray.com/commons-codec/commons-codec/1.6/commons-codec-1.6.jar
Download https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar
Download https://jcenter.bintray.com/org/jetbrains/annotations/13.0/annotations-13.0.jar
Download https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom
Download https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom
Download https://jcenter.bintray.com/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-parent/19/maven-parent-19.pom
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom
Download https://jcenter.bintray.com/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.pom
Download https://jcenter.bintray.com/org/apache/apache/3/apache-3.pom
Download https://jcenter.bintray.com/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.pom
Download https://jcenter.bintray.com/net/sf/json-lib/json-lib/2.3/json-lib-2.3.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.2.1/httpclient-4.2.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-client/4.2.1/httpcomponents-client-4.2.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/project/6/project-6.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-artifact/2.2.1/maven-artifact-2.2.1.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-components/1.1.14/plexus-components-1.1.14.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-artifact-manager/2.2.1/maven-artifact-manager-2.2.1.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.pom
Download https://jcenter.bintray.com/org/apache/ant/ant/1.8.0/ant-1.8.0.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-containers/1.0.3/plexus-containers-1.0.3.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus/2.0.2/plexus-2.0.2.pom
Download https://jcenter.bintray.com/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.pom
Download https://jcenter.bintray.com/org/apache/maven/maven/2.2.1/maven-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-project/2.2.1/maven-project-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-settings/2.2.1/maven-settings-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/ant/ant-parent/1.8.0/ant-parent-1.8.0.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-file/1.0-beta-6/wagon-file-1.0-beta-6.pom
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus/1.0.4/plexus-1.0.4.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-error-diagnostics/2.2.1/maven-error-diagnostics-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-parent/11/maven-parent-11.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-6/wagon-http-lightweight-1.0-beta-6.pom
Download https://jcenter.bintray.com/org/apache/apache/5/apache-5.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-providers/1.0-beta-6/wagon-providers-1.0-beta-6.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon/1.0-beta-6/wagon-1.0-beta-6.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-6/wagon-provider-api-1.0-beta-6.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcore/4.2.1/httpcore-4.2.1.pom
Download https://jcenter.bintray.com/org/apache/httpcomponents/httpcomponents-core/4.2.1/httpcomponents-core-4.2.1.pom
Download https://jcenter.bintray.com/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.pom
Download https://jcenter.bintray.com/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.pom
Download https://jcenter.bintray.com/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/9/commons-parent-9.pom
Download https://jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
Download https://jcenter.bintray.com/commons-lang/commons-lang/2.4/commons-lang-2.4.pom
Download https://jcenter.bintray.com/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.pom
Download https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.8.0/ant-launcher-1.8.0.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-repository-metadata/2.2.1/maven-repository-metadata-2.2.1.pom
Download https://jcenter.bintray.com/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-profile/2.2.1/maven-profile-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.pom
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-http-shared/1.0-beta-6/wagon-http-shared-1.0-beta-6.pom
Download https://jcenter.bintray.com/junit/junit/3.8.1/junit-3.8.1.pom
Download https://jcenter.bintray.com/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom
Download https://jcenter.bintray.com/nekohtml/nekohtml/1.9.6.2/nekohtml-1.9.6.2.pom
Download https://jcenter.bintray.com/net/sf/json-lib/json-lib/2.3/json-lib-2.3-jdk15.jar
Download https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.jar
Download https://jcenter.bintray.com/net/sourceforge/nekohtml/nekohtml/1.9.16/nekohtml-1.9.16.jar
Download https://jcenter.bintray.com/org/codehaus/groovy/modules/http-builder/http-builder/0.7.2/http-builder-0.7.2.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
Download https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
Download https://jcenter.bintray.com/xml-resolver/xml-resolver/1.2/xml-resolver-1.2.jar
Download https://jcenter.bintray.com/org/apache/ant/ant/1.8.0/ant-1.8.0.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-project/2.2.1/maven-project-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-settings/2.2.1/maven-settings-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-profile/2.2.1/maven-profile-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-error-diagnostics/2.2.1/maven-error-diagnostics-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-artifact-manager/2.2.1/maven-artifact-manager-2.2.1.jar
Download https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.jar
Download https://jcenter.bintray.com/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-artifact/2.2.1/maven-artifact-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-file/1.0-beta-6/wagon-file-1.0-beta-6.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-plugin-registry/2.2.1/maven-plugin-registry-2.2.1.jar
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-http-lightweight/1.0-beta-6/wagon-http-lightweight-1.0-beta-6.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.jar
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-http-shared/1.0-beta-6/wagon-http-shared-1.0-beta-6.jar
Download https://jcenter.bintray.com/org/apache/maven/wagon/wagon-provider-api/1.0-beta-6/wagon-provider-api-1.0-beta-6.jar
Download https://jcenter.bintray.com/org/apache/maven/maven-repository-metadata/2.2.1/maven-repository-metadata-2.2.1.jar
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
Download https://jcenter.bintray.com/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
Download https://jcenter.bintray.com/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar
Download https://jcenter.bintray.com/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
Download https://jcenter.bintray.com/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar
Download https://jcenter.bintray.com/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
Download https://jcenter.bintray.com/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
Download https://jcenter.bintray.com/org/apache/ant/ant-launcher/1.8.0/ant-launcher-1.8.0.jar
Download https://jcenter.bintray.com/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
Download https://jcenter.bintray.com/nekohtml/nekohtml/1.9.6.2/nekohtml-1.9.6.2.jar
Download https://jcenter.bintray.com/junit/junit/3.8.1/junit-3.8.1.jar
Download https://jcenter.bintray.com/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.jar
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
   > Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 49s
/opt/atlassian/pipelines/agent/build/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
   > Could not find intellij-core.jar (com.android.tools.external.com-intellij:intellij-core:26.0.1).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 49s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] release_stage_android: `npm run build_staging && cordova build android --release`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] release_stage_android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-10-23T08_31_37_340Z-debug.log

https://jcenter.bintray.com/com/android/tools/external/com-intellij/intellij-core/26.0.1/intellij-core-26.0.1.jar does, in fact, not exist.

{
  "errors" : [ {
    "status" : 404,
    "message" : "Could not find resource"
  } ]
}

That JAR does exist on MVNRepository. https://mvnrepository.com/artifact/com.android.tools.external.com-intellij/intellij-core/26.0.1

compile group: 'com.android.tools.external.com-intellij', name: 'intellij-core', version: '26.0.1'

Could you either change the repository path or let me know how I can change it in my Cordova configuration?

[Plugins] tests failing on Saucelabs for `PLATFORM=browser-safari`

Several plugins (cordova-plugin-splashscreen, cordova-plugin-file, cordova-plugin-camera, cordova-plugin-statusbar, cordova-plugin-media, cordova-plugin-media-capture) have been failing their tests because one job with PLATFORM=browser-safari is broken and does not succeed on Saucelab, but fails with an error message:

appium: Error: Cannot get the event cache: it doesn't exist in the app. Got this instead: null
appium: Error: Cannot get the event cache: it doesn't exist in the app. Got this instead: null
appium: Error: Cannot get the event cache: it doesn't exist in the app. Got this instead: null
...

I investigated a bit for one of those plugins:
apache/cordova-plugin-media-capture#105

But no success until now :/

(ping @alsorokin)

Cordova 9 release plan

This issue tracks the releases necessary to finally release Cordova 9. Experimental platforms and plugins as well as cordova-coho and any test tooling have been omitted.

Task List

Ordered release necessary

These release tasks are given in reverse topological order of below dependency graph. That means following it will ensure that every dependency is released before any of its dependents. Items grouped under a top level item can be released concurrently.

  • Stage 1
    • cordova-common
  • Stage 2
    • cordova-fetch
    • cordova-app-hello-world
    • cordova-node-xcode
    • cordova-js
    • cordova-serve
  • Stage 3
    • cordova-create
    • cordova-osx
    • cordova-ios
    • cordova-android
    • cordova-windows
    • cordova-browser
    • cordova-electron
  • Stage 4
    • cordova-lib
  • Stage 5
    • cordova-cli
    • cordova-plugman
  • Stage 6
    • cordova-docs

Plugins

No particular order necessary since they don't depend on anything, nor are they depended on.

  • cordova-plugin-battery-status
  • cordova-plugin-camera
  • cordova-plugin-device
  • cordova-plugin-dialogs
  • cordova-plugin-file
  • cordova-plugin-geolocation
  • cordova-plugin-inappbrowser
  • cordova-plugin-media
  • cordova-plugin-media-capture
  • cordova-plugin-network-information
  • cordova-plugin-screen-orientation
  • cordova-plugin-splashscreen
  • cordova-plugin-statusbar
  • cordova-plugin-vibration
  • cordova-plugin-whitelist
  • cordova-plugin-wkwebview-engine

Dependency Graph

Dependency Graph

Extracted from devDependencies and dependencies defined in package.json.
Additionally, some dependencies have been added manually:

  • Every platform depends on cordova-js since they all bundle it
  • cordova-lib depends on all stable core platforms, since it has to define which version of them to use

Define how Cordova handles `package-lock.json`

npm introduced package-lock.json some time ago. Apache Cordova never decided how this file should be handled in our packages (commit to git? not commit to git? .gitignore?).

We should define that and make the necessary changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.