-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Error Messages: {Source and destination must not be the same} cannot build using [email protected] #1454
Comments
Can you retry the command with the |
|
Thanks, seems to potentially be a regression of #1154 (maybe only in windows?). Strange that unit tests wouldn't catch this. cordova-android@11 is already in the voting stage at this time of writing so I'm going to add this to a 11.0.1 milestone. |
Thanks, yes it was run on Windows 11 Command. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
@breautek Okay, I see.. So, if a plugin uses a same file name for resource values (colors.xml, strings.xml, theme.xml), should the plugin need to update to a different name on their end (ex. https://github.com/arnesson/cordova-plugin-firebase/blob/master/plugin.xml#L55)? |
I get the error in 11.0.1-nightly.2022.7.4.f38e8eb3 (Windows):
It's the change of "\" to "/" in the paths that breaks this line in prepare.js |
@AndrWeisR Could you try this in your project? as a test to confirm if this works for you... In On line 306, you should see this: const destFile = java_files[0]; Change it to this: const destFile = path.normalize(java_files[0]); This should correct the path segment separator to the platform-specific path segment separator... |
The fix works - both destFile and newDestFile have '\'. |
Thank you for your quick test and confirmation. @AndrWeisR As @breautek pointed out in a previous comment:
The voting stage generally lasts 48 hours and requires a 2+1 approval vote to be successful. It has already been open for over 48 hours and has enough votes to be considered successful. Since the release itself was not completed and I have not officially closed the vote, I need to decide if I should terminate or continue with the release. If I continue with the release, I will push the fix for a quick patch release as Norman suggested. But again all releases, even a restart of a terminated release, require the same voting requirements of 48 hours minimum w/ 2+1 approval. |
Bug Report
Problem
App stop building, message: Source and destination must not be the same
What is expected to happen?
The build should success without any errors.
What does actually happen?
I try to build the app from scratch without update command, only use cordova platform add https://github.com/apache/cordova-android.git#11.0.0
Try to build on Windows 11 command line (CMD).
When try to run cordova platform add adnroid, the following meesage appear:
"Source and destination must not be the same"
Information
Command or Code
C:\Users\user\Desktop\testApp>cordova platform add https://github.com/apache/cordova-android.git#11.0.0 --verbose
No scripts found for hook "before_platform_add".
Using cordova-fetch for https://github.com/apache/cordova-android.git#11.0.0 fetch: Installing https://github.com/apache/cordova-android.git#11.0.0 to C:\Users\user\Desktop\testApp Running command: npm install https://github.com/apache/cordova-android.git#11.0.0 --save-dev Command finished with error code 0: npm install,https://github.com/apache/cordova-android.git#11.0.0,--save-dev Removing "cordova-" prefix from cordova-android Adding android project... Loaded API for android project C:\Users\user\Desktop\testApp\node_modules\cordova-android Creating Cordova project for the Android platform: Path: platforms\android Package: com.testApp Name: testApp.com Activity: MainActivity Android Target SDK: android-32 Android Compile SDK: 32 Copying android template project to platforms\android Subproject Path: CordovaLib Subproject Path: app Android project created with [email protected] Loaded API for android project C:\Users\user\Desktop\testApp\platforms\android\cordova\Api.js Generating platform-specific config.xml from defaults for android at C:\Users\user\Desktop\testApp\platforms\android\app\src\main\res\xml\config.xml Merging project's config.xml into platform-specific android config.xml [Gradle Properties] Preparing Configuration [Gradle Properties] File missing, creating file with Cordova defaults. [Gradle Properties] Appending default configuration properties [Gradle Properties] Appending configuration item: org.gradle.jvmargs=-Xmx2048m [Gradle Properties] Appending configuration item: android.useAndroidX=true [Gradle Properties] Appending configuration item: android.enableJetifier=true [Gradle Properties] Appending custom configuration properties [Gradle Properties] Updating and Saving File Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www mkdir platforms\android\app\src\main\assets\www\assets mkdir platforms\android\app\src\main\assets\www\assets\css copy www\assets\css\fontawesome-all.min.css platforms\android\app\src\main\assets\www\assets\css\fontawesome-all.min.css (new file) copy www\assets\css\main.css platforms\android\app\src\main\assets\www\assets\css\main.css (new file) mkdir platforms\android\app\src\main\assets\www\assets\google-fonts copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfABc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfBBc4.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfBBc4.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfBxc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCBc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCRc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfChc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOlCnqEu92Fr1MmWUlfCxc4EsA.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu4WxKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu4WxKOzY.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu4mxK.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu4mxK.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu5mxKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu5mxKOzY.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu72xKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu72xKOzY.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu7GxKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu7GxKOzY.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu7WxKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu7WxKOzY.woff2 (new file) copy www\assets\google-fonts\KFOmCnqEu92Fr1Mu7mxKOzY.woff2 platforms\android\app\src\main\assets\www\assets\google-fonts\KFOmCnqEu92Fr1Mu7mxKOzY.woff2 (new file) copy www\assets\google-fonts\roboto400700.css platforms\android\app\src\main\assets\www\assets\google-fonts\roboto400700.css (new file) mkdir platforms\android\app\src\main\assets\www\assets\js copy www\assets\js\main.js platforms\android\app\src\main\assets\www\assets\js\main.js (new file) mkdir platforms\android\app\src\main\assets\www\assets\sass mkdir platforms\android\app\src\main\assets\www\assets\sass\base copy www\assets\sass\base\_bg.scss platforms\android\app\src\main\assets\www\assets\sass\base\_bg.scss (new file) copy www\assets\sass\base\_page.scss platforms\android\app\src\main\assets\www\assets\sass\base\_page.scss (new file) copy www\assets\sass\base\_reset.scss platforms\android\app\src\main\assets\www\assets\sass\base\_reset.scss (new file) copy www\assets\sass\base\_typography.scss platforms\android\app\src\main\assets\www\assets\sass\base\_typography.scss (new file) mkdir platforms\android\app\src\main\assets\www\assets\sass\components copy www\assets\sass\components\_button.scss platforms\android\app\src\main\assets\www\assets\sass\components\_button.scss (new file) copy www\assets\sass\components\_form.scss platforms\android\app\src\main\assets\www\assets\sass\components\_form.scss (new file) copy www\assets\sass\components\_icon.scss platforms\android\app\src\main\assets\www\assets\sass\components\_icon.scss (new file) copy www\assets\sass\components\_icons.scss platforms\android\app\src\main\assets\www\assets\sass\components\_icons.scss (new file) copy www\assets\sass\components\_list.scss platforms\android\app\src\main\assets\www\assets\sass\components\_list.scss (new file) copy www\assets\sass\components\_section.scss platforms\android\app\src\main\assets\www\assets\sass\components\_section.scss (new file) mkdir platforms\android\app\src\main\assets\www\assets\sass\layout copy www\assets\sass\layout\_footer.scss platforms\android\app\src\main\assets\www\assets\sass\layout\_footer.scss (new file) copy www\assets\sass\layout\_header.scss platforms\android\app\src\main\assets\www\assets\sass\layout\_header.scss (new file) copy www\assets\sass\layout\_signup-form.scss platforms\android\app\src\main\assets\www\assets\sass\layout\_signup-form.scss (new file) mkdir platforms\android\app\src\main\assets\www\assets\sass\libs copy www\assets\sass\libs\_breakpoints.scss platforms\android\app\src\main\assets\www\assets\sass\libs\_breakpoints.scss (new file) copy www\assets\sass\libs\_functions.scss platforms\android\app\src\main\assets\www\assets\sass\libs\_functions.scss (new file) copy www\assets\sass\libs\_mixins.scss platforms\android\app\src\main\assets\www\assets\sass\libs\_mixins.scss (new file) copy www\assets\sass\libs\_vars.scss platforms\android\app\src\main\assets\www\assets\sass\libs\_vars.scss (new file) copy www\assets\sass\libs\_vendor.scss platforms\android\app\src\main\assets\www\assets\sass\libs\_vendor.scss (new file) copy www\assets\sass\main.scss platforms\android\app\src\main\assets\www\assets\sass\main.scss (new file) mkdir platforms\android\app\src\main\assets\www\assets\testApp-font mkdir platforms\android\app\src\main\assets\www\assets\testApp-font\fonts copy www\assets\testApp-font\fonts\icomoon.eot platforms\android\app\src\main\assets\www\assets\testApp-font\fonts\icomoon.eot (new file) copy www\assets\testApp-font\fonts\icomoon.svg platforms\android\app\src\main\assets\www\assets\testApp-font\fonts\icomoon.svg (new file) copy www\assets\testApp-font\fonts\icomoon.ttf platforms\android\app\src\main\assets\www\assets\testApp-font\fonts\icomoon.ttf (new file) copy www\assets\testApp-font\fonts\icomoon.woff platforms\android\app\src\main\assets\www\assets\testApp-font\fonts\icomoon.woff (new file) copy www\assets\testApp-font\testApp-style.css platforms\android\app\src\main\assets\www\assets\testApp-font\testApp-style.css (new file) mkdir platforms\android\app\src\main\assets\www\assets\webfonts copy www\assets\webfonts\fa-brands-400.eot platforms\android\app\src\main\assets\www\assets\webfonts\fa-brands-400.eot (new file) copy www\assets\webfonts\fa-brands-400.svg platforms\android\app\src\main\assets\www\assets\webfonts\fa-brands-400.svg (new file) copy www\assets\webfonts\fa-brands-400.ttf platforms\android\app\src\main\assets\www\assets\webfonts\fa-brands-400.ttf (new file) copy www\assets\webfonts\fa-brands-400.woff platforms\android\app\src\main\assets\www\assets\webfonts\fa-brands-400.woff (new file) copy www\assets\webfonts\fa-brands-400.woff2 platforms\android\app\src\main\assets\www\assets\webfonts\fa-brands-400.woff2 (new file) copy www\assets\webfonts\fa-regular-400.eot platforms\android\app\src\main\assets\www\assets\webfonts\fa-regular-400.eot (new file) copy www\assets\webfonts\fa-regular-400.svg platforms\android\app\src\main\assets\www\assets\webfonts\fa-regular-400.svg (new file) copy www\assets\webfonts\fa-regular-400.ttf platforms\android\app\src\main\assets\www\assets\webfonts\fa-regular-400.ttf (new file) copy www\assets\webfonts\fa-regular-400.woff platforms\android\app\src\main\assets\www\assets\webfonts\fa-regular-400.woff (new file) copy www\assets\webfonts\fa-regular-400.woff2 platforms\android\app\src\main\assets\www\assets\webfonts\fa-regular-400.woff2 (new file) copy www\assets\webfonts\fa-solid-900.eot platforms\android\app\src\main\assets\www\assets\webfonts\fa-solid-900.eot (new file) copy www\assets\webfonts\fa-solid-900.svg platforms\android\app\src\main\assets\www\assets\webfonts\fa-solid-900.svg (new file) copy www\assets\webfonts\fa-solid-900.ttf platforms\android\app\src\main\assets\www\assets\webfonts\fa-solid-900.ttf (new file) copy www\assets\webfonts\fa-solid-900.woff platforms\android\app\src\main\assets\www\assets\webfonts\fa-solid-900.woff (new file) copy www\assets\webfonts\fa-solid-900.woff2 platforms\android\app\src\main\assets\www\assets\webfonts\fa-solid-900.woff2 (new file) copy platforms\android\platform_www\cordova.js platforms\android\app\src\main\assets\www\cordova.js (updated file) copy www\css\index.css platforms\android\app\src\main\assets\www\css\index.css (updated file) mkdir platforms\android\app\src\main\assets\www\images copy www\images\bg01.jpg platforms\android\app\src\main\assets\www\images\bg01.jpg (new file) copy www\images\bg02.jpg platforms\android\app\src\main\assets\www\images\bg02.jpg (new file) copy www\images\bg03.jpg platforms\android\app\src\main\assets\www\images\bg03.jpg (new file) copy www\images\bg04.jpg platforms\android\app\src\main\assets\www\images\bg04.jpg (new file) mkdir platforms\android\app\src\main\assets\www\images\loader copy www\images\loader\dots.svg platforms\android\app\src\main\assets\www\images\loader\dots.svg (new file) copy www\images\loader\flight.svg platforms\android\app\src\main\assets\www\images\loader\flight.svg (new file) delete platforms\android\app\src\main\assets\www\img\cordova.png (no source) copy www\img\logo.png platforms\android\app\src\main\assets\www\img\logo.png (updated file) copy www\index.html platforms\android\app\src\main\assets\www\index.html (updated file) copy www\js\index.js platforms\android\app\src\main\assets\www\js\index.js (updated file) copy www\js\jquery.min.js platforms\android\app\src\main\assets\www\js\jquery.min.js (new file) Wrote out android application name "testApp.com" to C:\Users\user\Desktop\testApp\platforms\android\app\src\main\res\values\strings.xml Wrote out Android application SplashScreen Color to C:\Users\user\Desktop\testApp\platforms\android\app\src\main\res\values\colors.xml The "AndroidWindowSplashScreenBrandingImage" is undefined. Cordova's default will be used. Wrote out Android application SplashScreen Icon Color to C:\Users\user\Desktop\testApp\platforms\android\app\src\main\res\values\colors.xml Wrote out Android application themes to C:\Users\user\Desktop\testApp\platforms\android\app\src\main\res\values\themes.xml copy C:/Users/user/Desktop/testApp/platforms/android/app/src/main/java/com/testApp/MainActivity.java to C:\Users\user\Desktop\testApp\platforms\android\app\src\main\java\com\testApp\MainActivity.java Source and destination must not be the same. Error: Source and destination must not be the same. at Object.checkPathsSync (C:\Users\user\Desktop\testApp\node_modules\fs-extra\lib\util\stat.js:78:13) at Object.copySync (C:\Users\user\Desktop\testApp\node_modules\fs-extra\lib\copy\copy-sync.js:27:38) at updateProjectAccordingTo (C:\Users\user\Desktop\testApp\node_modules\cordova-android\lib\prepare.js:314:12) at C:\Users\user\Desktop\testApp\node_modules\cordova-android\lib\prepare.js:67:21 at async Promise.all (index 0)
C:\Users\user\Desktop\testApp>
Environment, Platform, Device
Version information
cordova-ndroid 11.0.0
Node 16.15.1
Cli 11.0.0
Java JDK 11
Windows 11
Checklist
The text was updated successfully, but these errors were encountered: