Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

[email protected] / Cordova CLI 10 fails to restore plugins from package.json #106

Closed
3 tasks done
alalamav opened this issue Sep 10, 2020 · 3 comments
Closed
3 tasks done

Comments

@alalamav
Copy link
Contributor

Bug Report

Problem

What is expected to happen?

cordova-osx should restore plugins from package.json when running cordova platform add osx. The plugins' native and JS code should run before the deviceready event is fired.

What does actually happen?

Plugins declared in package.json are successfully added to the native macOS (Xcode) project, but their code is not run. As a result, the WebView is not able to access exported definitions (i.e. window.device for cordova-plugin-device).

Information

  • When restoring plugins from package.json:
    • the last installed plugin overrides existing configurations in platforms/osx/www/cordova_plugins.js
    • platforms/osx/cordova-macos-test/config.xml and platforms/osx/osx.json are missing plugin declarations.
  • Manually removing and adding plugins successfully configures them to run.
  • Note that this issue does not occurr in [email protected] (or cordova-ios@6.*).

Command or Code

Please see alalamav/cordova-macos-test for a detailed description of the problem and reproduction steps.

Environment, Platform, Device

macOS

Version information

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@brodycj brodycj changed the title [email protected] fails to restore plugins from package.json [email protected] / Cordova CLI 10 fails to restore plugins from package.json Mar 1, 2021
@brodycj
Copy link

brodycj commented Mar 1, 2021

I have seen this issue with my cordova-sqlite-storage "spec" test app when using Cordova CLI 10, seems to go away when I switch to Cordova CLI 9 regardless of cordova-osx version 5 vs 6. I have updated the title and confirmed this as a bug with help wanted.

P.S. I have also observed that after cordova platform add osx, cordova prepare osx is needed before I can build and run from Xcode. I hope we can get this fixed as well.

UPDATE January 2022: still seems to be an issue with Cordova CLI 11

@fortuna
Copy link

fortuna commented Feb 5, 2022

How do we even debug this? I don't have experience developing the cordova platforms and have no idea where to look to find the issue.

@NiklasMerz
Copy link
Member

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants