Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

No such file: AndroidManifest #2479

Closed
troovers opened this issue Jul 7, 2018 · 5 comments
Closed

No such file: AndroidManifest #2479

troovers opened this issue Jul 7, 2018 · 5 comments

Comments

@troovers
Copy link

troovers commented Jul 7, 2018

Expected Behaviour

When adding the Android platform, there shouldn't be errors.

Actual Behaviour

Error when adding a dependency of this plugin: cordova-support-google-services:

Installing "cordova-support-google-services" for android

Failed to install 'cordova-support-google-services': Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.readFileSync (fs.js:510:33)
    at Object.parseElementtreeSync (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
    at new AndroidManifest (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidManifest.js:29:20)
    at AndroidProject.getPackageName (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidProject.js:99:12)
    at Api.addPlugin (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/Api.js:223:57)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)

(node:71928) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'

Reproduce Scenario (including but not limited to)

Upgrading the Android platform to version 7.1.0.

Steps to Reproduce

Remove Android platform from project.
Add the Android platform again: ionic cordova platform add [email protected]
Install the plugins, including phonegap-plugin-push.

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

[email protected], [email protected].

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

--

Cordova CLI version and cordova platform version

cordova --version: 8.0.0
cordova platform version android: 7.1.0

Plugin version

2.2.3

Sample Push Data Payload

--

Sample Code that illustrates the problem

--

Logs taken while reproducing problem

Installing "cordova-support-google-services" for android

Failed to install 'cordova-support-google-services': Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'
    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.readFileSync (fs.js:510:33)
    at Object.parseElementtreeSync (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
    at new AndroidManifest (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidManifest.js:29:20)
    at AndroidProject.getPackageName (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/lib/AndroidProject.js:99:12)
    at Api.addPlugin (/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/cordova/Api.js:223:57)
    at handleInstall (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:594:10)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/install.js:357:28
    at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/q/q.js:787:54)

(node:71928) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '/Users/thomasroovers/Developer/Geekk/GCA/ClubApp/platforms/android/AndroidManifest.xml'
@jcesarmobile
Copy link
Collaborator

Sorry, but this is a problem with cordova-android (that is already solved but not released), caused by a plugin using source-file tag for images or jar libraries or some other files different from .java.

The error message is misleading as it points to the next plugin installed and not to the actual one with the problem.

@troovers
Copy link
Author

troovers commented Jul 8, 2018

It's indeed pointing to the next plugin, but the plugin before cordova-support-google-services is phonegap-plugin-push. Other libraries had the same problem, check this for example: storesafe/cordova-sqlite-storage#729. And they have fixed it inside their own project.

So shouldn't the issue be fixed inside the plugin.xml file of this project?

@jcesarmobile
Copy link
Collaborator

No, phonegap-plugin-push is fine, it's probably the one installed before phonegap-plugin-push.

@troovers
Copy link
Author

troovers commented Jul 8, 2018

You're right, I checked all of the plugins and eventually got to cordova-sqlite-storage that was creating the issues.

@lock
Copy link

lock bot commented Aug 7, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants