Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running make deploy #31

Closed
Addisonbean opened this issue Oct 25, 2018 · 12 comments
Closed

Error when running make deploy #31

Addisonbean opened this issue Oct 25, 2018 · 12 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@Addisonbean
Copy link

When running make deploy, I get the following error:

Status: Downloaded newer image for ekidd/rust-musl-builder:latest
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `https://github.com/DenisKolodin/yew`
    Updating git repository `https://github.com/saschagrunert/yew-router`
error: failed to open: /home/rust/src/target/release/.cargo-lock

Caused by:
  Permission denied (os error 13)
make: *** [deploy] Error 101

My docker version is "Version 18.06.1-ce-mac73 (26764)". I'd imagine there's not much other helpful info I can give about my machine since it looks like this is an error inside the docker container, but let me know if you need anything else.

@saschagrunert
Copy link
Owner

Hey, thanks for the request. Can you please try to remove the target folder completely and run make deploy again. The deploy script chowns this folder for the docker image deployment so I think there is a simple permission problem there.

@saschagrunert saschagrunert added the question Further information is requested label Oct 26, 2018
@saschagrunert saschagrunert self-assigned this Oct 26, 2018
@Addisonbean
Copy link
Author

Addisonbean commented Oct 26, 2018

That fixed that instance of the error, but now it's happening again later:

   Compiling yew-router v0.1.0 (https://github.com/saschagrunert/yew-router#c9786862)
    Finished release [optimized] target(s) in 2m 59s
    Garbage collecting "app.wasm"...
    Processing "app.wasm"...
    Finished processing of "app.wasm"!
The `app` was deployed to "/deploy/target/deploy"!
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `https://github.com/DenisKolodin/yew`
    Updating git repository `https://github.com/saschagrunert/yew-router`
error: failed to open: /home/rust/src/target/release/.cargo-lock

Caused by:
  Permission denied (os error 13)
make: *** [deploy] Error 101

Remove the target directory again didn't fix this one.

@saschagrunert
Copy link
Owner

I will have a deeper look into it these days, which OS are you running on?

@Addisonbean
Copy link
Author

I'm on macOS Sierra 10.12.6 and my Rust version is rustc 1.30.0 (da5f414c2 2018-10-24).

@saschagrunert saschagrunert added the help wanted Extra attention is needed label Oct 31, 2018
@saschagrunert
Copy link
Owner

Ah this seems truly a permission problem related to the docker image and chown commands when running make deploy. The thing is that I am currently not able to test it under a Mac and I am not sure how docker containers behave on macOS. :-/ Maybe some supporter with a Mac can help out here...

@true-eye
Copy link

I also have the same issue on my MacOS Sierra 10.13.6. Any help?

@saschagrunert
Copy link
Owner

I also have the same issue on my MacOS Sierra 10.13.6. Any help?

Hey, sorry to hear that you encounter the same issue. I'm still not able to test on MacOS unfortunately.

@true-eye
Copy link

Here is the full log for the issue

Command:

sudo make deploy

Log:

latest: Pulling from saschagrunert/build-rust
Digest: sha256:b07f175a17e135c99d6a49e88cce8dd93da845d5142ef7c9b3092d00d9955a26
Status: Image is up to date for saschagrunert/build-rust:latest
docker.io/saschagrunert/build-rust:latest
[INFO]: Checking for the Wasm target...
[INFO]: Compiling to Wasm...
   Compiling proc-macro2 v1.0.19
   Compiling unicode-xid v0.2.1
   Compiling syn v1.0.38
   Compiling cfg-if v0.1.10
   Compiling log v0.4.11
   Compiling serde v1.0.115
   Compiling wasm-bindgen-shared v0.2.67
   Compiling serde_derive v1.0.115
   Compiling ryu v1.0.5
   Compiling lazy_static v1.4.0
   Compiling bumpalo v3.4.0
   Compiling wasm-bindgen v0.2.67
   Compiling memchr v2.3.3
   Compiling bitflags v1.2.1
   Compiling lexical-core v0.7.4
   Compiling anyhow v1.0.32
   Compiling version_check v0.9.2
   Compiling libc v0.2.74
   Compiling serde_json v1.0.57
   Compiling autocfg v1.0.0
   Compiling pin-project-internal v0.4.23
   Compiling proc-macro-nested v0.1.6
   Compiling proc-macro-hack v0.5.18
   Compiling futures-core v0.3.5
   Compiling futures-sink v0.3.5
   Compiling pkg-config v0.3.18
   Compiling once_cell v1.4.0
   Compiling itoa v0.4.6
   Compiling byteorder v1.3.4
   Compiling matches v0.1.8
   Compiling slab v0.4.2
   Compiling arrayvec v0.5.1
   Compiling pin-utils v0.1.0
   Compiling static_assertions v1.1.0
   Compiling tinyvec v0.3.3
   Compiling semver-parser v0.7.0
   Compiling futures-io v0.3.5
   Compiling yew v0.17.2
   Compiling percent-encoding v2.1.0
   Compiling fnv v1.0.7
   Compiling boolinator v2.4.0
   Compiling bytes v0.5.6
   Compiling stdweb-internal-runtime v0.1.5
   Compiling anymap v0.12.1
   Compiling cfg-match v0.2.1
   Compiling sha1 v0.6.0
   Compiling base-x v0.2.6
   Compiling discard v1.0.4
   Compiling futures-channel v0.3.5
   Compiling nom v5.1.2
   Compiling hashbrown v0.8.2
   Compiling indexmap v1.5.1
   Compiling futures-task v0.3.5
   Compiling unicode-bidi v0.3.4
   Compiling semver v0.9.0
   Compiling unicode-normalization v0.1.13
   Compiling http v0.2.1
   Compiling rustc_version v0.2.3
   Compiling idna v0.2.0
   Compiling quote v1.0.7
   Compiling num_cpus v1.13.0
   Compiling url v2.1.1
   Compiling stdweb v0.4.20
   Compiling sass-sys v0.4.21
   Compiling yew-router-route-parser v0.14.0
   Compiling wasm-bindgen-backend v0.2.67
   Compiling wasm-bindgen-macro-support v0.2.67
   Compiling wasm-bindgen-macro v0.2.67
   Compiling futures-macro v0.3.5
   Compiling thiserror-impl v1.0.20
   Compiling yew-macro v0.17.0
   Compiling yew-router-macro v0.14.0
   Compiling sass-rs v0.2.2
   Compiling js-sys v0.3.44
   Compiling console_error_panic_hook v0.1.6
   Compiling thiserror v1.0.20
   Compiling pin-project v0.4.23
   Compiling futures-util v0.3.5
   Compiling bincode v1.3.1
   Compiling toml v0.5.6
   Compiling stdweb-derive v0.5.3
   Compiling webapp v1.0.0 (/deploy)
   Compiling stdweb-internal-macros v0.2.9
   Compiling webapp-frontend v1.0.0 (/deploy/frontend)
   Compiling futures-executor v0.3.5
   Compiling futures v0.3.5
   Compiling web-sys v0.3.44
   Compiling wasm-bindgen-futures v0.4.17
error: failed to run custom build command for `webapp-frontend v1.0.0 (/deploy/frontend)`

Caused by:
  process didn't exit successfully: `/deploy/target/release/build/webapp-frontend-a44e87cd66bf162d/build-script-build` (exit code: 1)
--- stderr
Cloning into '/deploy/target/wasm32-unknown-unknown/release/build/webapp-frontend-e24a3d9c9cbe3a79/out/uikit'...
Note: switching to '2b72e5f563f2525d9139a14d1435f6f13451e315'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

Updating files: 100% (690/690), done.
Error: Operation not permitted (os error 1)

warning: build failed, waiting for other jobs to finish...
error: build failed
Error: Compiling your crate to WebAssembly failed
Caused by: failed to execute `cargo build`: exited with exit code: 101
  full command: "cargo" "build" "--lib" "--release" "--target" "wasm32-unknown-unknown"
make: *** [Makefile:49: build-frontend] Error 1
make: *** [deploy] Error 2

@frankli-dev
Copy link
Contributor

Ah this seems truly a permission problem related to the docker image and chown commands when running make deploy. The thing is that I am currently not able to test it under a Mac and I am not sure how docker containers behave on macOS. :-/ Maybe some supporter with a Mac can help out here...

I think 'sudo chmod -R 777 .' would work in this case. I will make a PR

@frankli-dev
Copy link
Contributor

#1122

@saschagrunert
Copy link
Owner

#1122

Thank you, do you think that can we close this one now?

@true-eye
Copy link

Thank you! That works for me on my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants