Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

prepare fails on unknown splashscreen #299

Closed
goya opened this issue Nov 7, 2018 · 5 comments · Fixed by #301
Closed

prepare fails on unknown splashscreen #299

goya opened this issue Nov 7, 2018 · 5 comments · Fixed by #301

Comments

@goya
Copy link
Member

goya commented Nov 7, 2018

If targetImg is null it blows up and fails the prepare action. it should just return.

if (!targetImg.targetProject) {

@brodybits
Copy link

I just raised PR #301 which should resolve this issue.

Long term solution (in a major release) may be to drop the lines after "Fall back on find by size for old non-MRT syntax" in getTargetForImage.

@brodybits
Copy link

P.S. This issue was introduced in 973fe6d.

@janpio
Copy link
Member

janpio commented May 6, 2019

@goya Do you still know how to recreate this? It would be best if we could add a test case on our side to avoid this popping up again.

@goya
Copy link
Member Author

goya commented May 7, 2019

you can repro it now using:

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0">
    <name>HelloCordova</name>
    <splash src="splash.jpg" width="7000" height="1200" />
</widget>

n.b. the splash file must exist

@janpio
Copy link
Member

janpio commented May 8, 2019

Confirmed fixed:

E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ cordova platform add windows                                                                                                                    
Using cordova-fetch for cordova-windows@^7.0.0                                                                                                    
Adding windows project...                                                                                                                         
Creating Cordova Windows Project:                                                                                                                 
        Path: platforms\windows                                                                                                                   
        Namespace: io.cordova.hellocordova                                                                                                        
        Name: HelloCordova                                                                                                                        
cp: no such file or directory: E:\Projects\throwaway\cordovaWindows299\node_modules\cordova-windows\node_modules\winjs\js\base.js                 
                                                                                                                                                  
cp: no such file or directory: E:\Projects\throwaway\cordovaWindows299\node_modules\cordova-windows\node_modules\winjs\js\base.js                 
                                                                                                                                                  
Windows project created with cordova-windows@7.0.0                                                                                                
Plugin 'cordova-plugin-whitelist' found in config.xml... Migrating it to package.json                                                             
Discovered saved plugin "cordova-plugin-whitelist". Adding it to the project                                                                      
Installing "cordova-plugin-whitelist" for windows                                                                                                 
Adding cordova-plugin-whitelist to package.json                                                                                                   
                                                                                                                                                  
E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ cordova prepare windows                                                                                                                         
The following image was skipped because it has an unsupported size (7000x1200): splash.png                                                        
Cannot read property 'targetProject' of null                                                                                                      
                                                                                                                                                  
E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ cordova platform rm windows                                                                                                                     
Removing windows from cordova.platforms array in package.json                                                                                     
                                                                                                                                                  
E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ cordova platform add github:apache/cordova-windows                                                                                              
Using cordova-fetch for github:apache/cordova-windows                                                                                             
Warning: using prerelease platform windows@7.1.0-dev.                                                                                             
Use 'cordova platform add windows@latest' to add the latest published version instead.                                                            
Adding windows project...                                                                                                                         
Creating Cordova Windows Project:                                                                                                                 
        Path: platforms\windows                                                                                                                   
        Namespace: io.cordova.hellocordova                                                                                                        
        Name: HelloCordova                                                                                                                        
Windows project created with cordova-windows@7.1.0-dev                                                                                            
The following image was skipped because it has an unsupported size (7000x1200): splash.png                                                        
Installing "cordova-plugin-whitelist" for windows                                                                                                 
The following image was skipped because it has an unsupported size (7000x1200): splash.png                                                        
                                                                                                                                                  
E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ cordova prepare windows                                                                                                                         
The following image was skipped because it has an unsupported size (7000x1200): splash.png                                                        
                                                                                                                                                  
E:\Projects\throwaway\cordovaWindows299  (helloworld@1.0.0)                                                                                       
λ                                                                                                                                                 

But tbh no idea how to turn this into a test.

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

Successfully merging a pull request may close this issue.

3 participants