eladnava/pixelmate

Couldn't create file: Is a directory

piotrros opened this issue ยท 14 comments

I've found some new strange bug. I'm trying to copy an apk file to my device and getting a following error:

The operation failed:
failed to copy '/Users/piotr/Documents/projekty/aplikacje/SampleApp/app/release/app-release.apk' to '/sdcard/Download/app-release.apk/': couldn't create file: Is a directory
32749 KB/s (11567166 bytes in 0.344s)

I simply drag apk file from finder.

A workaround is to put an apk inside a directory and copy the directory, not file itself.

Hey @piotrros,
I believe I fixed this in the latest commits, could you manually clone and build? Instructions in Readme. ๐Ÿ‘

Ah well, I thought you already released a fixed version. I've tried building pixelmate myself, but I have zero knowledge about Electron. Anyway, I've tried, but I've come to the point where I can run the app, have no errors, but it just shows a window with white background.

Can pleeease release a new version? I'd really like to use pixelmate, because android file transfer is completely broken for pixel phones.

Strange, I've downloaded new version as still have the same error.

Very strange bug with .apk files, I've just reproduced and committed a fix. Checked and it works now. Unfortunately I am unable to publish a new release at this time as I do not have access to a Wi-Fi network to upload the 50MB package. You can clone the repo and run npm install, then npm run build to generate the Pixelmate.app.

I'm noob at this :( I've ran npm run build - it worked. Several files appeared in build directory, but Pixelmate.app isn't there. Guess I'll wait. Thanks for quick help anyway :)

Check dist folder :)

Piotr:pixelmate piotr$ npm run build

> pixelmate@1.0.5 build /Users/piotr/Documents/pierdoly/PixelMate/pixelmate
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

./src/index.js
  Line 855:  Expected '===' and instead saw '=='  eqeqeq
  Line 859:  Expected '===' and instead saw '=='  eqeqeq

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  82.92 KB  build/static/js/main.7b9fe7a3.js
  588 B     build/static/css/main.92cfedfa.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  http://bit.ly/2vY88Kr

Piotr:pixelmate piotr$ ls
LICENSE			build			package.json
README.md		node_modules		public
bin			package-lock.json	src
Piotr:pixelmate piotr$ cd build
Piotr:build piotr$ ls 
app.icns		index.html		service-worker.js
asset-manifest.json	screenshot.png		static

My bad!

Try npm run package then check dist/ folder.

Erm..

Piotr:pixelmate piotr$ npm run package

> pixelmate@1.0.5 package /Users/piotr/Documents/pierdoly/PixelMate/pixelmate
> rm -rf dist/* build/* && npm run build && electron-packager . Pixelmate --electron-version=1.7.11 --platform=darwin --arch=x64 --icon=public/app.icns --version=1.0.0 --app-bundle-id=com.pixelmate --app-version=1.0.0 --build-version=1.0.0 --osx-sign --overwrite && zip -r -y -X dist/Pixelmate.zip Pixelmate-darwin-x64/Pixelmate.app


> pixelmate@1.0.5 build /Users/piotr/Documents/pierdoly/PixelMate/pixelmate
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

./src/index.js
  Line 855:  Expected '===' and instead saw '=='  eqeqeq
  Line 859:  Expected '===' and instead saw '=='  eqeqeq

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  82.92 KB  build/static/js/main.7b9fe7a3.js
  588 B     build/static/css/main.92cfedfa.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  http://bit.ly/2vY88Kr

--version does not take an argument. Perhaps you meant --app-version or --electron-version?

Electron Packager 13.1.1
Node v11.10.1
Host Operating system: darwin (x64)
	zip warning: name not matched: Pixelmate-darwin-x64/Pixelmate.app

zip error: Nothing to do! (try: zip -r -y -X dist/Pixelmate.zip . -i Pixelmate-darwin-x64/Pixelmate.app)
npm ERR! code ELIFECYCLE
npm ERR! errno 12
npm ERR! pixelmate@1.0.5 package: `rm -rf dist/* build/* && npm run build && electron-packager . Pixelmate --electron-version=1.7.11 --platform=darwin --arch=x64 --icon=public/app.icns --version=1.0.0 --app-bundle-id=com.pixelmate --app-version=1.0.0 --build-version=1.0.0 --osx-sign --overwrite && zip -r -y -X dist/Pixelmate.zip Pixelmate-darwin-x64/Pixelmate.app`
npm ERR! Exit status 12
npm ERR! 
npm ERR! Failed at the pixelmate@1.0.5 package script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/piotr/.npm/_logs/2019-03-15T12_59_45_143Z-debug.log
Piotr:pixelmate piotr$ cat /Users/piotr/.npm/_logs/2019-03-15T12_59_45_143Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'package' ]
2 info using npm@6.7.0
3 info using node@v11.10.1
4 verbose run-script [ 'prepackage', 'package', 'postpackage' ]
5 info lifecycle pixelmate@1.0.5~prepackage: pixelmate@1.0.5
6 info lifecycle pixelmate@1.0.5~package: pixelmate@1.0.5
7 verbose lifecycle pixelmate@1.0.5~package: unsafe-perm in lifecycle true
8 verbose lifecycle pixelmate@1.0.5~package: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/piotr/Documents/pierdoly/PixelMate/pixelmate/node_modules/.bin:/opt/local/bin:/opt/local/sbin:/Users/piotr/Documents/pierdoly:/Applications/Cocos/frameworks:/Users/piotr/Documents/pierdoly/apache-ant-1.9.4/bin:/opt/local/bin:/opt/local/sbin:/Users/piotr/sdk/tools:/Users/piotr/sdk/platform-tools:/Users/piotr/sdk:/Users/piotr/sdk/ndk-bundle:/Users/piotr/Documents/pierdoly/cocos2d-x-3.17_git/templates:/Users/piotr/Documents/pierdoly/cocos2d-x-3.17_git/tools/cocos2d-console/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/usr/local/git/bin
9 verbose lifecycle pixelmate@1.0.5~package: CWD: /Users/piotr/Documents/pierdoly/PixelMate/pixelmate
10 silly lifecycle pixelmate@1.0.5~package: Args: [ '-c',
10 silly lifecycle   'rm -rf dist/* build/* && npm run build && electron-packager . Pixelmate --electron-version=1.7.11 --platform=darwin --arch=x64 --icon=public/app.icns --version=1.0.0 --app-bundle-id=com.pixelmate --app-version=1.0.0 --build-version=1.0.0 --osx-sign --overwrite && zip -r -y -X dist/Pixelmate.zip Pixelmate-darwin-x64/Pixelmate.app' ]
11 silly lifecycle pixelmate@1.0.5~package: Returned: code: 12  signal: null
12 info lifecycle pixelmate@1.0.5~package: Failed to exec package script
13 verbose stack Error: pixelmate@1.0.5 package: `rm -rf dist/* build/* && npm run build && electron-packager . Pixelmate --electron-version=1.7.11 --platform=darwin --arch=x64 --icon=public/app.icns --version=1.0.0 --app-bundle-id=com.pixelmate --app-version=1.0.0 --build-version=1.0.0 --osx-sign --overwrite && zip -r -y -X dist/Pixelmate.zip Pixelmate-darwin-x64/Pixelmate.app`
13 verbose stack Exit status 12
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:197:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:197:13)
13 verbose stack     at maybeClose (internal/child_process.js:984:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid pixelmate@1.0.5
15 verbose cwd /Users/piotr/Documents/pierdoly/PixelMate/pixelmate
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "package"
18 verbose node v11.10.1
19 verbose npm  v6.7.0
20 error code ELIFECYCLE
21 error errno 12
22 error pixelmate@1.0.5 package: `rm -rf dist/* build/* && npm run build && electron-packager . Pixelmate --electron-version=1.7.11 --platform=darwin --arch=x64 --icon=public/app.icns --version=1.0.0 --app-bundle-id=com.pixelmate --app-version=1.0.0 --build-version=1.0.0 --osx-sign --overwrite && zip -r -y -X dist/Pixelmate.zip Pixelmate-darwin-x64/Pixelmate.app`
22 error Exit status 12
23 error Failed at the pixelmate@1.0.5 package script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 12, true ]

Seems to do with a different version of electron-packager you have installed (I seem to have version 10.1.2 installed).

No worries, I just published a new version:
https://github.com/eladnava/pixelmate/releases/tag/1.0.5

Yeah, in 1.0.5 copying apk files finally works.

I'd like try to contribute, but I still cannot run build this project. What version of npm and nodejs do you use?

Running node version 6.9.4, npm version 5.6.0, and electron-packager version 10.1.2. ๐Ÿ‘