Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10138

plugin's metadata value not updating on Android

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.1.0
    • None
    • cordova-android
    • Operating System: OS X 10.11.1, Platform: Android, Installed platforms: android 5.0.0, iOS 3.9.2, cordova-plugin-inappbrowser 1.1.0, Cordova version: 5.4.1, Oauth version: ngCordova v0.1.20-alpha

    Description

      I am using ngcordova and ionic to develop my app.
      I have updated cordova to version 5.4.1 and now the authentication via oath (in a inappbrowser window) in my app is not working anymore because the oauth function is telling me that the inappbrowser plugin is not installed.

      On stack overflow I found also this about it (cordova plugin's metadata value not updating), http://stackoverflow.com/questions/33822123/cordova-plugins-metadata-value-not-updating

      "And by debuging in deep i came to know that var cordovaMetadata = cordova.require("cordova/plugin_list").metadata; this code give empty array and that is reason plugin isn't working."

      Attachments

        Issue Links

          Activity

            johnvh John VanHorn added a comment -

            I'm having to work around this issue as well. I think the issue may be with cordova-android 5.0.0 though. The metadata object - cordova.require("cordova/plugin_list").metadata - is populated when using cordova-android 4.1.1. It's empty with cordova-android 5.0.0.

            johnvh John VanHorn added a comment - I'm having to work around this issue as well. I think the issue may be with cordova-android 5.0.0 though. The metadata object - cordova.require("cordova/plugin_list").metadata - is populated when using cordova-android 4.1.1. It's empty with cordova-android 5.0.0.
            sgrebnov Sergey Grebnov added a comment -

            Same in cordova-android@5.1.0

            cordova.platformVersion
            "5.1.0"
            cordova.platformId
            "android"
            cordova.require("cordova/plugin_list").metadata
            Object {}
            
            sgrebnov Sergey Grebnov added a comment - Same in cordova-android@5.1.0 cordova.platformVersion "5.1.0" cordova.platformId "android" cordova.require( "cordova/plugin_list" ).metadata Object {}
            sgrebnov Sergey Grebnov added a comment -

            cordova-android@4.1.1

            cordova_plugins.js

            ...
            module.exports.metadata = 
            // TOP OF METADATA
            {
                "cordova-plugin-inappbrowser": "1.2.1-dev",
                "cordova-plugin-inappbrowser-tests": "1.2.1-dev",
                "cordova-plugin-test-framework": "1.1.1",
                "cordova-plugin-whitelist": "1.2.1"
            }
            

            cordova-android@5.1.0

            cordova_plugins.js

            ...
            module.exports.metadata = 
            // TOP OF METADATA
            {
            }
            
            sgrebnov Sergey Grebnov added a comment - cordova-android@4.1.1 cordova_plugins.js ... module.exports.metadata = // TOP OF METADATA { "cordova-plugin-inappbrowser" : "1.2.1-dev" , "cordova-plugin-inappbrowser-tests" : "1.2.1-dev" , "cordova-plugin-test-framework" : "1.1.1" , "cordova-plugin-whitelist" : "1.2.1" } cordova-android@5.1.0 cordova_plugins.js ... module.exports.metadata = // TOP OF METADATA { }
            sgrebnov Sergey Grebnov added a comment -

            The following logic works incorrect, changing component from `Plugin InAppBrowser` to `Android` as this is platform general issue.

            https://github.com/apache/cordova-android/blob/0ac822c57737ddf0a252b5da6406eef3ba426285/bin/templates/cordova/Api.js#L480

            sgrebnov Sergey Grebnov added a comment - The following logic works incorrect, changing component from `Plugin InAppBrowser` to `Android` as this is platform general issue. https://github.com/apache/cordova-android/blob/0ac822c57737ddf0a252b5da6406eef3ba426285/bin/templates/cordova/Api.js#L480

            This seems more like a CLI problem than anything to do with Android.

            bowserj Joey Robert Bowser added a comment - This seems more like a CLI problem than anything to do with Android.
            vladimir.kotikov Vladimir Kotikov added a comment - - edited

            The plugin installation logic now lives inside the platform, hence this is a platform bug

            vladimir.kotikov Vladimir Kotikov added a comment - - edited The plugin installation logic now lives inside the platform, hence this is a platform bug
            githubbot ASF GitHub Bot added a comment -

            GitHub user vladimir-kotikov opened a pull request:

            https://github.com/apache/cordova-android/pull/254

            CB-10138 Adds missing plugin metadata to plugin_list module

            This is a fix for CB-10138(https://issues.apache.org/jira/browse/CB-10138)

            You can merge this pull request into a Git repository by running:

            $ git pull https://github.com/MSOpenTech/cordova-android CB-10138

            Alternatively you can review and apply these changes as the patch at:

            https://github.com/apache/cordova-android/pull/254.patch

            To close this pull request, make a commit to your master/trunk branch
            with (at least) the following in the commit message:

            This closes #254


            commit ac25c0f03380bb0640831a32ffa47c20df2b0126
            Author: Vladimir Kotikov <v-vlkoti@microsoft.com>
            Date: 2016-01-27T12:39:11Z

            CB-10138 Adds missing plugin metadata to plugin_list module


            githubbot ASF GitHub Bot added a comment - GitHub user vladimir-kotikov opened a pull request: https://github.com/apache/cordova-android/pull/254 CB-10138 Adds missing plugin metadata to plugin_list module This is a fix for CB-10138 ( https://issues.apache.org/jira/browse/CB-10138 ) You can merge this pull request into a Git repository by running: $ git pull https://github.com/MSOpenTech/cordova-android CB-10138 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-android/pull/254.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #254 commit ac25c0f03380bb0640831a32ffa47c20df2b0126 Author: Vladimir Kotikov <v-vlkoti@microsoft.com> Date: 2016-01-27T12:39:11Z CB-10138 Adds missing plugin metadata to plugin_list module
            githubbot ASF GitHub Bot added a comment -

            Github user vladimir-kotikov commented on the pull request:

            https://github.com/apache/cordova-android/pull/254#issuecomment-175599710

            @sgrebnov, PTAL

            githubbot ASF GitHub Bot added a comment - Github user vladimir-kotikov commented on the pull request: https://github.com/apache/cordova-android/pull/254#issuecomment-175599710 @sgrebnov, PTAL
            githubbot ASF GitHub Bot added a comment -

            Github user sgrebnov commented on the pull request:

            https://github.com/apache/cordova-android/pull/254#issuecomment-176075769

            :+1:

            githubbot ASF GitHub Bot added a comment - Github user sgrebnov commented on the pull request: https://github.com/apache/cordova-android/pull/254#issuecomment-176075769 :+1:

            Commit e08d0671ab7a7fc9dbaffd937f6bb5e7a3640c28 in cordova-android's branch refs/heads/master from vladimir.kotikov
            [ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=e08d067 ]

            CB-10138 Adds missing plugin metadata to plugin_list module. This closes #254

            jira-bot ASF subversion and git services added a comment - Commit e08d0671ab7a7fc9dbaffd937f6bb5e7a3640c28 in cordova-android's branch refs/heads/master from vladimir.kotikov [ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=e08d067 ] CB-10138 Adds missing plugin metadata to plugin_list module. This closes #254
            githubbot ASF GitHub Bot added a comment -

            Github user asfgit closed the pull request at:

            https://github.com/apache/cordova-android/pull/254

            githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-android/pull/254
            imaffett Ian Maffett added a comment -

            It appears this issue affects other platforms (windows/iOS). Should a separate issue be created for each one? For iOS, you can apply the same fix to bin/templates/scripts/cordova/lib/plugman/Plugman.js

            for Windows

            template/cordova/Api.js - again, the same fix as Android

            imaffett Ian Maffett added a comment - It appears this issue affects other platforms (windows/iOS). Should a separate issue be created for each one? For iOS, you can apply the same fix to bin/templates/scripts/cordova/lib/plugman/Plugman.js for Windows template/cordova/Api.js - again, the same fix as Android
            imaffett Ian Maffett added a comment -

            Also - happy to make these changes once my ICLA is verified

            imaffett Ian Maffett added a comment - Also - happy to make these changes once my ICLA is verified

            imaffett, yes, that'd be great!

            vladimir.kotikov Vladimir Kotikov added a comment - imaffett , yes, that'd be great!
            githubbot ASF GitHub Bot added a comment -

            GitHub user imaffett opened a pull request:

            https://github.com/apache/cordova-ios/pull/194

            CB-10138 Adds missing plugin metadata to plugin_list module

            This is the same fix as https://issues.apache.org/jira/browse/CB-10138 , but for Cordova iOS

            You can merge this pull request into a Git repository by running:

            $ git pull https://github.com/imaffett/cordova-ios master

            Alternatively you can review and apply these changes as the patch at:

            https://github.com/apache/cordova-ios/pull/194.patch

            To close this pull request, make a commit to your master/trunk branch
            with (at least) the following in the commit message:

            This closes #194


            commit 6f17fdf4c97264ea9747864ad36e6f5f8b10ebfa
            Author: Ian Maffett <ian.maffett@intel.com>
            Date: 2016-02-17T13:02:40Z

            CB-10138 Adds missing plugin metadata to plugin_list module


            githubbot ASF GitHub Bot added a comment - GitHub user imaffett opened a pull request: https://github.com/apache/cordova-ios/pull/194 CB-10138 Adds missing plugin metadata to plugin_list module This is the same fix as https://issues.apache.org/jira/browse/CB-10138 , but for Cordova iOS You can merge this pull request into a Git repository by running: $ git pull https://github.com/imaffett/cordova-ios master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-ios/pull/194.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #194 commit 6f17fdf4c97264ea9747864ad36e6f5f8b10ebfa Author: Ian Maffett <ian.maffett@intel.com> Date: 2016-02-17T13:02:40Z CB-10138 Adds missing plugin metadata to plugin_list module
            githubbot ASF GitHub Bot added a comment -

            Github user vladimir-kotikov commented on the pull request:

            https://github.com/apache/cordova-ios/pull/194#issuecomment-185221787

            LGTM

            githubbot ASF GitHub Bot added a comment - Github user vladimir-kotikov commented on the pull request: https://github.com/apache/cordova-ios/pull/194#issuecomment-185221787 LGTM

            Commit b8ea31fe8edf9503a0a13d82a31182821c44c0ca in cordova-ios's branch refs/heads/master from imaffett
            [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=b8ea31f ]

            CB-10138 Adds missing plugin metadata to plugin_list module

            This closes #194

            jira-bot ASF subversion and git services added a comment - Commit b8ea31fe8edf9503a0a13d82a31182821c44c0ca in cordova-ios's branch refs/heads/master from imaffett [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=b8ea31f ] CB-10138 Adds missing plugin metadata to plugin_list module This closes #194
            githubbot ASF GitHub Bot added a comment -

            Github user asfgit closed the pull request at:

            https://github.com/apache/cordova-ios/pull/194

            githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-ios/pull/194
            githubbot ASF GitHub Bot added a comment -

            GitHub user RyanWFiorini opened a pull request:

            https://github.com/apache/cordova-windows/pull/150

            CB-10138 Adds missing plugin metadata to plugin_list module for Windows

            This is in conjunction with vladimir-kotikov pull request/commit ac25c0f03380bb0640831a32ffa47c20df2b0126 to apply his changes to the cordova-windows version.

            You can merge this pull request into a Git repository by running:

            $ git pull https://github.com/RyanWFiorini/cordova-windows master

            Alternatively you can review and apply these changes as the patch at:

            https://github.com/apache/cordova-windows/pull/150.patch

            To close this pull request, make a commit to your master/trunk branch
            with (at least) the following in the commit message:

            This closes #150


            commit 45e5bd131d1f38e781b328499fd900896d403e82
            Author: Ryan Fiorini (Intel) <ryan.fiorini@intel.com>
            Date: 2016-02-17T15:11:55Z

            CB-10138 Adds missing plugin metadata to plugin_list module for Windows


            githubbot ASF GitHub Bot added a comment - GitHub user RyanWFiorini opened a pull request: https://github.com/apache/cordova-windows/pull/150 CB-10138 Adds missing plugin metadata to plugin_list module for Windows This is in conjunction with vladimir-kotikov pull request/commit ac25c0f03380bb0640831a32ffa47c20df2b0126 to apply his changes to the cordova-windows version. You can merge this pull request into a Git repository by running: $ git pull https://github.com/RyanWFiorini/cordova-windows master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-windows/pull/150.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #150 commit 45e5bd131d1f38e781b328499fd900896d403e82 Author: Ryan Fiorini (Intel) <ryan.fiorini@intel.com> Date: 2016-02-17T15:11:55Z CB-10138 Adds missing plugin metadata to plugin_list module for Windows

            Commit 45e5bd131d1f38e781b328499fd900896d403e82 in cordova-windows's branch refs/heads/master from ryanfio
            [ https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;h=45e5bd1 ]

            CB-10138 Adds missing plugin metadata to plugin_list module for Windows

            jira-bot ASF subversion and git services added a comment - Commit 45e5bd131d1f38e781b328499fd900896d403e82 in cordova-windows's branch refs/heads/master from ryanfio [ https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;h=45e5bd1 ] CB-10138 Adds missing plugin metadata to plugin_list module for Windows
            githubbot ASF GitHub Bot added a comment -

            Github user asfgit closed the pull request at:

            https://github.com/apache/cordova-windows/pull/150

            githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-windows/pull/150

            Commit cd1d4f9d412937b8ecdf0701f23a6fc92d3e4277 in cordova-windows's branch refs/heads/4.3.x from ryanfio
            [ https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;h=cd1d4f9 ]

            CB-10138 Adds missing plugin metadata to plugin_list module for Windows

            jira-bot ASF subversion and git services added a comment - Commit cd1d4f9d412937b8ecdf0701f23a6fc92d3e4277 in cordova-windows's branch refs/heads/4.3.x from ryanfio [ https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git;h=cd1d4f9 ] CB-10138 Adds missing plugin metadata to plugin_list module for Windows

            People

              vladimir.kotikov Vladimir Kotikov
              Maikel Maikel
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: