When reporting an issue or bug for any of the Apache Cordova packages, it is helpful to create and include a link to a reproduction repository or sample. This helps maintainers when reproducing, evaluating, debugging and finally fixing the associated issue.
The goal of the reproduction repository is to replicate the bug in a minimal project that contains only the necessary platforms, libraries, and plugins to reproduce the bug.
For a Cordova maintainer it can be a lot of work to reproduce your specific issue as there are many aspects to your working environment and source code. By creating a reproduction repository, you can prodive all useful information to the maintainer and make this process much easier and faster.
Very often users creating a minimal project discover that their problem is not actually a bug, but something unrelated that only manifests in their main project for other reasons. They also learn much more about why a problem is occuring and can add this information to their GitHub issue.
The steps below show how to create a reproduction repository on GitHub. (Any public accessible Git remote service is acceptable: GitHub, BitBucket, GitLab, etc).
Public to make the repository publicly accessible
Execute the following commands in the terminal to achieve the steps above:
$ cordova create reproduction-sample $ cd reproduction-sample $ git init $ git add . $ git commit -m "Initialize new Cordova project" $ git remote add origin email@example.com:<USERNAME>/<REPO_NAME>.git $ git push -u origin master
Add and commit each platform(s) (
cordova platform add ...) and/or plugin(s) (
cordova plugin add ...) needed to reproduce the problem.
$ cordova platform add android $ git add . $ git commit -m "cordova platform add android" $ cordova plugin add cordova-plugin-inappbrowser $ git add . $ git commit -m "cordova plugin add cordova-plugin-inappbrowser" $ git push origin master
Update the project source code to reproduce and trigger the problem.
Commit and push the reproduction code.
$ git commit -m "Reproduce problem" $ git push origin master
In the Apache Cordova GitHub issue, supply the link to the public repository.
Later, the repository can be used to test if the problem has been resolved in a future update in regards to the library that was faulty.