Software Archive
Read-only legacy content
17061 Discussions

[WORKAROUND] Can't remove 3rd party plugins after upgrading to XDK 3922

BerndB
Beginner
647 Views

Hi,

after upgrading from XDK Version 3759 to 3922 it is not possible anymore to remove a 3rd party plugin like "cordova-plugin-admob-free" which has 2 dependencies. Also a full reinstallation of XDK 3922 did not have any effect.

This happens on Windows and MAC

To reproduce this issue add the plugin to a new project on XDK 3922 and try to remove afterwards. It always results in a "Unknown error - Uh oh! Path must be a string. Received undefined".

Setting for Cordova is 6.2.0 CLI

I reinstalled 3759 and there is no problem to remove the plugin.

Also happens with other plugins like "cordova-plugin-admob-simple"

 

Any suggestion, how to solve this problem?

0 Kudos
1 Solution
PaulF_IntelCorp
Employee
647 Views

The version of node-webkit changed significantly with the 3900 release. The version of node that was being used in the prior versions of the XDK was quite old. The update to node-webkit was needed to address a variety of security issues. I suspect the reason for the differences is an issue related to both Cordova and Node, and it probably did not show up with the ancient version of Node that is being used in those older versions of the XDK. The issue described in the Cordova Jira is, in fact, the same issue, so it is not unique to the XDK (the XDK uses Cordova CLI under the hood), but is a problem within Cordova CLI.

View solution in original post

0 Kudos
7 Replies
PaulF_IntelCorp
Employee
647 Views

Is there a config.xml file in the root of your project folder? For reasons I do not understand, the presence of that file will sometimes cause this behavior. The confusing part is that it does not cause this behavior for all projects, just some. Exit the XDK and delete or rename that config.xml file, then restart the XDK and see if that makes a difference.

Here are some related threads:

0 Kudos
BerndB
Beginner
647 Views

Hi Paul,

there is no config.xml in the root folder. But the intelxdk.config.*.xml files.I removed those, but it did not help at all. Where you able to remove the mentioned plugins after installing them on XDK 3922?  This issue happens only on XDK 3922. On 3759 all work fine adding and removing.

 

 

0 Kudos
PaulF_IntelCorp
Employee
647 Views

Did you check to see if there was a config.xml in the www folder?

0 Kudos
PaulF_IntelCorp
Employee
647 Views

I am able to reproduce the issue with that plugin. I am trying to come up with a workaround.

0 Kudos
PaulF_IntelCorp
Employee
647 Views

This appears to be due to a long outstanding bug in Cordova > https://issues.apache.org/jira/browse/CB-9270 < and is limited to a subset of plugins (the one you are using appears to be part of that subset).

I was able to remove the problem plugin using 3922 by doing the following:

  • In the "Plugin Management" tool (on the Projects tab), identify the ID of the problem plugin and any dependent plugins.
  • From the Develop tab, open the "plugins" folder, where you will see one folder named for each plugin ID that is part of your project.
  • Right-click the problem plugin folder and choose "delete" from the menu. Do the same for its dependent plugins.
  • Delete the "fetch.json" file, as well, using the same technique.
  • From the Projects tab, open the "Plugin Management" tool and use the '(-)' icon/button to remove the problem plugin.
  • Exit the XDK and restart it, you may get a message about updating or installing plugins, let it finish.

Here are some annotated screenshots that I hope make the process clear:

Screen Shot 2017-05-05 at 10.07.06 .png

Screen Shot 2017-05-05 at 10.11.22 .png

Screen Shot 2017-05-05 at 10.12.38 .png

 

0 Kudos
BerndB
Beginner
647 Views

Hi Paul,

thx for your support and investigation. Also this is a workaround for XDK 3922, i think the problem is somewhere else in the XDK, as version 3759 works like a charm adding and removing those plugins. 

Is there some "Cordova" "under the hood" of the XDKs that changed between the two XDK versions ?

0 Kudos
PaulF_IntelCorp
Employee
648 Views

The version of node-webkit changed significantly with the 3900 release. The version of node that was being used in the prior versions of the XDK was quite old. The update to node-webkit was needed to address a variety of security issues. I suspect the reason for the differences is an issue related to both Cordova and Node, and it probably did not show up with the ancient version of Node that is being used in those older versions of the XDK. The issue described in the Cordova Jira is, in fact, the same issue, so it is not unique to the XDK (the XDK uses Cordova CLI under the hood), but is a problem within Cordova CLI.

0 Kudos
Reply