Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Minor Issue: Deleting App crashs Desktop App #314

Closed
boop5 opened this issue Feb 26, 2015 · 7 comments
Closed

Minor Issue: Deleting App crashs Desktop App #314

boop5 opened this issue Feb 26, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@boop5
Copy link

boop5 commented Feb 26, 2015

Hey there. I've found a little bug - not a critical one but still a bug.. ;)

Simply to reproduce:

  • Start PG Desktop App
  • Delete the with PG created App (the folder / content of the folder)
  • Desktop App crashs
@hermwong
Copy link
Collaborator

hermwong commented Mar 3, 2015

Hi @SchadLucas,

I just wanted to get some clarification of where you are deleting your app from.

Are you deleting the your app (folder / contents of your folder) from your operating system (Windows / OSX) or the PhoneGap Desktop App?

@hermwong hermwong added the bug label Mar 3, 2015
@hermwong hermwong self-assigned this Mar 3, 2015
@hermwong hermwong added this to the Post 1.0 Release enhancements milestone Mar 3, 2015
@boop5
Copy link
Author

boop5 commented Mar 3, 2015

Hehe.. I delete my app - not the PhoneGap Desktop App ;)

2015-03-03 22:58 GMT+01:00 Herm Wong notifications@github.com:

Hi @SchadLucas https://github.com/SchadLucas,

I just wanted to get some clarification of where you are deleting your app
from.

Are you deleting the your app (folder / contents of your folder) from your
operating system (Windows / OSX) or the PhoneGap Desktop App?


Reply to this email directly or view it on GitHub
#314 (comment)
.

@hermwong
Copy link
Collaborator

hermwong commented Mar 3, 2015

Did you delete your app using the delete feature in the PhoneGap Desktop App?

Or did you delete your app using the file explorer on your operating system (Finder on OSX or Windows Explorer on Windows)?

@boop5
Copy link
Author

boop5 commented Mar 3, 2015

Windows Explorer

@hermwong hermwong modified the milestones: 0.1.3 Beta, Post 1.0 Release enhancements Mar 4, 2015
@hermwong
Copy link
Collaborator

hermwong commented Mar 6, 2015

I wasn't able to reproduce this issue. I used Windows 8.1 and followed these steps:

  1. Launched PhoneGap Desktop
  2. I had 3 projects that had been loaded into PhoneGap Desktop from my previous session.
    1. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test01
    2. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test02
    3. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test03
  3. Launched Windows Explorer
  4. Tried to delete the C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test02 folder from Windows Explorer but got a warning dialog that prevented me deleting the folder (Windows would not allow me to delete the folder even if I press the continue button).

win-delete-warning

@hermwong
Copy link
Collaborator

hermwong commented Mar 7, 2015

After further investigation, I was able to get the PhoneGap Desktop to crash following these steps (on Windows 8.1):

  1. Launch PhoneGap Desktop
  2. I had 3 projects that had been loaded into PhoneGap Desktop from my previous session.
    1. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test01
    2. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test02
    3. C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test03
  3. Quit PhoneGap Desktop
  4. Launch Windows Explorer
  5. Delete the C:\Users\herm\Documents\HermWong\phonegap-gui\_testing\test02 folder
  6. Launch PhoneGap Desktop
  7. None of the remaining projects seem to be set as an active project that the PhoneGap Desktop is serving
  8. Click on the play button beside one of the remaining projects to set it as the active project for the PhoneGap Desktop to serve
  9. The PhoneGap Desktop will crash and display the following error:
typeerror: Cannot read property 'projectId' of undefined    
at Server.<anonymous> (file:///Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/js/server-status.js:30:60)    
at Server.EventEmitter.emit (events.js:104:17)    
at /Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/node_modules/connect-phonegap/lib/serve.js:94:20    
at Request._callback (/Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/node_modules/connect-phonegap/lib/util/ip.js:52:9)    
at Request.self.callback (/Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/node_modules/connect-phonegap/node_modules/request/request.js:122:22)    
at Request.EventEmitter.emit (events.js:107:17)    
at Request.<anonymous> (/Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/node_modules/connect-phonegap/node_modules/request/request.js:888:14)    
at Request.EventEmitter.emit (events.js:126:20)    
at IncomingMessage.<anonymous> (/Users/hermanw/Documents/HermWong/phonegap-gui/build/PhoneGap/osx/PhoneGap.app/Contents/Resources/app.nw/node_modules/connect-phonegap/node_modules/request/request.js:839:12)    
at IncomingMessage.EventEmitter.emit (events.js:126:20)

I was also able to reproduce the crash on OSX.

@hermwong
Copy link
Collaborator

hermwong commented Mar 9, 2015

Once the project folder is deleted and the PhoneGap Desktop App is relaunched the project is removed from PG-Desktop's localStorage through the removeMissingProjects method.

The issue that causes the crash is that there is no activeWidget being set after the deleted projected has been removed.

In the regular workflow, when all the projects in localStorage are found the sequence of methods are triggered which result in an activeWidget being set:

getProjectConfig -> parseConfigForRendering -> setActiveWidget

hermwong added a commit that referenced this issue Mar 9, 2015
…ct after missing projects have been removed from localStorage
@hermwong hermwong closed this as completed Mar 9, 2015
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Apr 8, 2015
…ve project after missing projects have been removed from localStorage
hermwong added a commit that referenced this issue Oct 26, 2016
…ct after missing projects have been removed from localStorage
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Oct 27, 2016
…ve project after missing projects have been removed from localStorage
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Oct 27, 2016
…ve project after missing projects have been removed from localStorage

Former-commit-id: db6e66d
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Oct 27, 2016
…ve project after missing projects have been removed from localStorage
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Oct 27, 2016
…ve project after missing projects have been removed from localStorage

Former-commit-id: db6e66d
hermwong added a commit to hermwong/phonegap-app-desktop that referenced this issue Oct 27, 2016
…ve project after missing projects have been removed from localStorage

Former-commit-id: c3d21aa
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants