Error APPX3207 image for the square 150x150 logo is too large

When I try to build appx.package I get this error, but apparently there’s nothing wrong with the image I’m using.

my source image:
\resources\iconTemplate.png 1240x1240 178 KB

log file:
package.windows10.appxmanifest(19,173): error APPX3207: App manifest references the square 150x150 logo image ‘images\Square150x150Logo.scale-400.png’ which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(21,150): error APPX3207: App manifest references the wide 310x150 logo image ‘images\Wide310x150Logo.scale-200.png’ which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(21,150): error APPX3207: App manifest references the wide 310x150 logo image ‘images\Wide310x150Logo.scale-400.png’ which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(21,56): error APPX3207: App manifest references the square 310x310 logo image ‘images\Square310x310Logo.scale-200.png’ which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [\platforms\windows\CordovaApp.Windows10.jsproj]
package.windows10.appxmanifest(21,56): error APPX3207: App manifest references the square 310x310 logo image ‘images\Square310x310Logo.scale-400.png’ which is larger than the maximum image file size. It must be no larger than 204,800 bytes. [\platforms\windows\CordovaApp.Windows10.jsproj]
Command finished with error code 1: c:\vs2017\MSBuild\15.0\Bin\msbuild \platforms\windows\CordovaApp.Windows10.jsproj,/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal,/nologo,/p:Configuration=debug,/p:Platform=x64,/p:AppxBundle=Never
No valid MSBuild was detected for the selected target: Error: c:\vs2017\MSBuild\15.0\Bin\msbuild: Command failed with exit code 1
CordovaError: No valid MSBuild was detected for the selected target: Error: c:\vs2017\MSBuild\15.0\Bin\msbuild: Command failed with exit code 1
at \platforms\windows\cordova\lib\build.js:83:29
at _rejected (\node_modules\q\q.js:864:24)
at \node_modules\q\q.js:890:30
at Promise.when (\node_modules\q\q.js:1142:31)
at Promise.promise.promiseDispatch (\node_modules\q\q.js:808:41)
at \node_modules\q\q.js:624:44
at runSingle (\node_modules\q\q.js:137:13)
at flush (\node_modules\q\q.js:125:13)
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Build Output not found. See log for details.
Build 85f8d747-7756-4b15-a441-dead25cf5520 failed

Any help would be much appreciated.

I set the iconTemplate.png image size from 1024x1024 px (voltbuilder documentation) to 1240x1240px based on the following error:

Log file:

2022-12-10T23:41:11.232Z cordova-res:platform Building icon resources for windows platform
WARN: Error with source file \resources\iconTemplate.png: The dimensions of source images for Windows icons do not meet minimum size requirements: 1240x1240 (image is 1024x1024).
2022-12-10T23:41:11.242Z cordova-res:image Error with source file \resources\iconTemplate.png: Error
at new BaseError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:8:22)
at new ValidationError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:32:9)
at validateRasterResource (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\resources.js:40:15)
at Object.validateResource (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\resources.js:160:11)
at async readSourceImage (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\image.js:38:22)
at async Object.resolveSourceImage (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\image.js:21:20)
at async generateSimpleResources (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:82:20)
at async Object.run (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:30:28)
at async AsyncFunction.CordovaRes [as run] (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:35:36)
at async AsyncFunction.runCommandLine (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:93:28) {
details: {
source: ‘C:\agent\upload\7191b7fa-7cc0-4f8e-94a6-6c635fe65683\resources\iconTemplate.png’,
type: ‘icon’,
code: ‘BAD_IMAGE_SIZE’,
width: 1024,
height: 1024,
requiredWidth: 1240,
requiredHeight: 1240
},
code: ‘BAD_SOURCE’
}
2022-12-10T23:41:11.243Z cordova-res Caught fatal error: Error
at new BaseError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:8:22)
at new ResolveSourceImageError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:45:9)
at Object.resolveSourceImage (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\image.js:31:11)
at async generateSimpleResources (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:82:20)
at async Object.run (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:30:28)
at async AsyncFunction.CordovaRes [as run] (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:35:36)
at async AsyncFunction.runCommandLine (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:93:28) {
errors: [
Error
at new BaseError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:8:22)
at new ValidationError (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\error.js:32:9)
at validateRasterResource (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\resources.js:40:15)
at Object.validateResource (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\resources.js:160:11)
at async readSourceImage (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\image.js:38:22)
at async Object.resolveSourceImage (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\image.js:21:20)
at async generateSimpleResources (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:82:20)
at async Object.run (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\platform.js:30:28)
at async AsyncFunction.CordovaRes [as run] (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:35:36)
at async AsyncFunction.runCommandLine (C:\Users\ContainerAdministrator\AppData\Roaming\npm\node_modules\cordova-res\dist\index.js:93:28) {
details: [Object],
code: ‘BAD_SOURCE’
}
],
code: ‘BAD_SOURCES’
}
ERROR: Missing valid source image for Windows icons (sources: \resources\iconTemplate.png)

fatal error: Error
Build 7191b7fa-7cc0-4f8e-94a6-6c635fe65683 failed

Based on the log files you’ve posted, I suspect that automatic image generation for windows isn’t working properly. I’m going to look into this further, but I’m the interim I would suggest creating your own set of images for Windows builds. I’ll get back to you when I know more.

Thank you. Following the advice my build succeeded. I hope you will fix the bug because the automatic image generation system is very useful and saves a lot of time. Thanks again.