Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova platform add - failing with "failed to fetch platform" error #261

Closed
3 tasks done
danjones-infinityworks opened this issue Nov 26, 2020 · 1 comment
Closed
3 tasks done

Comments

@danjones-infinityworks
Copy link

danjones-infinityworks commented Nov 26, 2020

Bug Report

Problem

Since 25th Nov at about 13:40 GMT, whenever I try to add a platform (ios or android) using cordova platforms add I receive an error and am unable to install the platform.

This issue seems to have been raised for ionic since near the same time yesterday ionic-team/ionic-cli#4615

What is expected to happen?

iOS / Android platform added to project

What does actually happen?

Exception is shown

iOS
Using cordova-fetch for cordova-ios@^6.1.0
Failed to fetch platform cordova-ios@^6.1.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
CordovaError: TypeError: Cannot assign to read only property 'valueOf' of object

Android
Using cordova-fetch for cordova-android@^9.0.0
Failed to fetch platform cordova-android@^9.0.0
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
CordovaError: TypeError: Cannot assign to read only property 'valueOf' of object

Information

Issue started to occur yesterday during build automation in Azure Pipelines, I notices npm versions were different, as it still worked locally, but maybe this was cached, as I updated to the same version locally and it started failing, but when I reverted back, it has been failing ever since.

Command or Code

Issue can be reproduced from new project

cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add ios

Environment, Platform, Device

Tested with multiple macOS

macOS - Big Sur 11.0.1 (local machine)
macOS - Catalina 10.15 (Azure Pipelines Agent)

Version information

Cordova CLI: 10.0.0
npm: 6.14.8

macOS - Big Sur 11.0.1 (local machine)
macOS - Catalina 10.15 (Azure Pipelines Agent)

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@danjones-infinityworks
Copy link
Author

danjones-infinityworks commented Nov 26, 2020

Fixed in apache/cordova-cli#543 remove and reinstall cordova cli

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

No branches or pull requests

1 participant