Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

problems with v0.30.4 on OSX 10.8.4 #54

Closed
loveencounterflow opened this issue Aug 18, 2015 · 7 comments
Closed

problems with v0.30.4 on OSX 10.8.4 #54

loveencounterflow opened this issue Aug 18, 2015 · 7 comments

Comments

@loveencounterflow
Copy link

(this is a re-take on #44)

Steps to reproduce the issue at hand:

  • make sure you're running iojs v2.3.1
  • clone my sample app, which contains files according to http://electron.atom.io/docs/v0.30.0/tutorial/quick-start/: git clone https://github.com/loveencounterflow/electron-sample-1.git
  • cd electron-sample-1
  • npm install
  • npm start, or, equivalently, node_modules/.bin/electron .

If you're running this on e.g. Linux, you should be seeing the app window (with minimal HTML and devtools opened). However, on my OSX 10.8.4, this consistently crashes (dumps available).

The weird thing is i can make the app run as expected by downloading and unpacking https://github.com/atom/electron/releases/download/v0.30.4/electron-v0.30.4-darwin-x64.zip, and then executing ~/Downloads/electron-v0.30.4-darwin-x64.zip\ Folder/Electron.app/Contents/MacOS/Electron ., which appears to strongly suggest that the fault lies specifically with electron-prebuilt on OSX.

I would be grateful if anyone could reproduce the issue; it is not impossible that there's an issue with my OS somehow (although the assumption is that the manually downloaded and the prebuilt version of Electron should behave identically).

@LongLiveCHIEF
Copy link

I was getting these errors also, but when I do the repro steps using your repo, It ran fine. (note, i ran it with node v 0.12.4)

@max-mapper
Copy link
Contributor

The only known bug I can think of that may be affecting this is max-mapper/extract-zip#6, which prevents some empty directories from getting extracted. I would be surprised if that was causing this though.

Also make sure you clear your cache in ~/.electron, it's possible its using a bad cached version from there too (thats another open issue #51)

@loveencounterflow
Copy link
Author

@maxogden interestingly, the issue you're pointing to mentions those *.lproj language files; it is exactly those that i have found to make the difference between an *.app downloaded by electron-prebuilt and ones that i manually downloaded.

I've updated the sample app (removed crash-reporter which caused an exception by itself; added some log statements to see which parts get executed) and cleaned the ~/.electron folder, but to no avail.

UPDATE I've just extracted the downloaded archive

~/.electron/electron-v0.30.6-darwin-x64.zip

by double-clicking on it, and moved it to

.../electron-sample-1/node_modules/electron-prebuilt/dist/Electron.app

overwriting the file that was there. That works! IOW there's not necessarily a difference between the archive that e-prebuilt downloads and the official release, it's the unpacking of that archive that likely gets it wrong.

IMHO both git and any archiver that ignores empty files and empty folders have a bug. After all, those tools should replicate application state as faithfully as possible. Saying that empty files and folders serve no purpose is wrong; if your app has a line if( fs.exists( ... ) ) that is as valid a statement about data in your program as any other and can make a difference, so all the empty stuff should be replicated as well.

@max-mapper
Copy link
Contributor

@loveencounterflow thanks for the investigation. Looks like if max-mapper/extract-zip#6 gets fixed then this issue will get fixed as well

@loveencounterflow
Copy link
Author

great news! (next someone should ask 1) why those empty *.lproj folders are there anyway and 2) why some part of the app crashes if they're not; i'd guess 1) they're not needed and 2) someone forgot to program forgivingly)

@smebberson
Copy link

@max-mapper
Copy link
Contributor

fixed by 1.1.0 of extract-zip

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

No branches or pull requests

4 participants