apache / apache/cordova-common

config-file conflicts between plugins and config.xml

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
42
Forks
45
Avg merge
5h 41m
Merged PRs (30d)
6

Description

# Bug Report

## Problem

I am using https://github.com/QuentinFarizon/cordova-plugin-ble-central/tree/dfu in which plugin.xml adds two tags inside AndroidManufest application tag : https://github.com/QuentinFarizon/cordova-plugin-ble-central/blob/dfu/plugin.xml#L76-L79

I am also using https://github.com/dpa99c/cordova-plugin-firebasex that documents (https://github.com/dpa99c/cordova-plugin-firebasex/#android-default-notification-icon) adding this to my config.xml :
```



```

### What is expected to happen?

No conflict should occur, it should result in :
```




(...)

```

### What does actually happen?

During platform/plugin add, everythings goes fine.

Juste before build, AndroidManifest is correct (all lines are present).

During build, this message : **"Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes"** (I do not have an edit-config in my config.xml).

Issue : activity and service tags from com.megster.cordova.ble.central are NOT added to AndroidManifest (they have been removed).

While debugging inside cordova-common, I can see here the details of conflict :
```
{
"conflictFound":true,
"conflictingMunge":{
"files":{
"AndroidManifest.xml":{
"parents":{
"/manifest/application":[
{
"xml":"",
"count":1
},
{
"xml":"",
"count":1
},
{
"xml":"",
"count":0,
"id":"config.xml"
}
]
}
}
}
},
"configxmlMunge":{
"files":{

}
},
"conflictWithConfigxml":false,
"noChanges":[

],
"unusedConfigMunge":{
"files":{
"AndroidManifest.xml":{
"parents":{
"/manifest/application":[
{
"xml":"",
"count":1,
"id":"config.xml"
}
]
}
}
}
}
}
```

## Information

Apart from the conflict issue, I think the build should definitely fail if some configurations lines from plugins are removed without more than a warning console line.

### Command or Code

cordova build

### Environment, Platform, Device
Reproduced on ubuntu and macOS

### Version information
cordova 9.0.0
cordova-android 9.0.0
(tested with cordova 10 also, no luck)

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Reproduce the configuration with the linked BLE and Firebase plugins using `cordova build`, then inspect the conflict details in cordova-common. Trace how `config.xml` and plugin.xml changes under `/manifest/application` are merged; done means the expected activity, service, and meta-data entries are retained or the build clearly reports an unresolved conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.