yarn deploy give error with Command failed with exit code 1 when running collection-examples-as - nearprotocol

I am trying to run the collection-examples-as near example but when I run yarn deploy it gives me the following error
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: ENOENT: no such file or directory, open './contract.wasm'
[Error: ENOENT: no such file or directory, open './contract.wasm'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: './contract.wasm'
}
error Command failed with exit code 1.
I think the error is it can't find the path to ./contract.wasm so I run yarn build the I tried to deploy it again using yarn deploy but I got another error which is:
$ near dev-deploy --wasmFile="./contract.wasm"
Starting deployment. Account id: dev-1637744501224-6323200, node:
https://rpc.testnet.near.org, helper: https://helper.testnet.near.org, file:
./contract.wasm
An error occurred
Error: Can not sign transactions for account dev-1637744501224-6323200 on network
default, no matching key pair found in
InMemorySigner(MergeKeyStore(UnencryptedFileSystemKeyStore(/home/rasha/.near-
credentials), UnencryptedFileSystemKeyStore(/home/rasha/collection-examples-
as/neardev))).
{
type: 'KeyNotFound',
context: undefined
}
any help or suggestions?

There's an issue with old versions of near-cli and dev-deploy.
As a workaround, you can try running the latest cli directly from your terminal:
near dev-deploy --wasmFile="./contract.wasm" -f
Just check that you installed the latest version of near-cli, currently 2.2.0. You can check your version with near --version.
Be sure to run yarn build first, so you'll have the compiled contract.wasm file.
Note: When you run yarn deploy, it uses the old near-cli version defined in package.json. (probably some old version like 1.6.0)
You might also want to check this GitHub issue (dev-deploy error): https://github.com/near/create-near-app/issues/1408

Related

Using golang-ci lint error fetch corp package

Im using golangci-lint and getting the following error in CI, any idea what could be the reason? and how can I avoid this.
Our GitHub repo is already have all the vendor packages so it shouldn't install it in first place.
golangci-lint run --config golangci.yml
level=error msg="Running error: context loading failed: failed to load packages: failed to load with go/packages: err: exit
status 1: stderr: go: github.avt.corp/ding/logger-ut#v1.1.0:
unrecognized import path "github.avt.corp/ding/logger-ut" (https
fetch: Get https://github.avt.corp/ding/logger-ut?go-get=1: x509:
certificate signed by unknown authority)\n"
btw I was able to clone the project and run it
Use the following:
run:
modules-download-mode: vendor
or add this to the command you are runnig
--modules-download-mode vendor

Jekyll Error - "serve" only works once

Started working on an update to my website. It was working fine the other day but now I get an error.
I generally type on CMD (i'm on Windows 10) "bundle exec Jekyll serve --watch" and the server goes. I can edit and save and its all reflected in browser upon refresh.
Now I can do this, but if I make one change to any file it works. Do another change and I get an error. I have to terminate and type again.
Below is the error:
D:\Tristen Grant\Documents\GitHub\portfolio>bundle exec jekyll serve --watch
DL is deprecated, please use Fiddle
Configuration file: D:/Tristen Grant/Documents/GitHub/portfolio/_config.yml
Source: D:/Tristen Grant/Documents/GitHub/portfolio
Destination: D:/Tristen Grant/Documents/GitHub/portfolio/_site
Incremental build: disabled. Enable with --incremental
Generating...
done in 0.595 seconds.
Auto-regeneration: enabled for 'D:/Tristen Grant/Documents/GitHub/portfolio'
Configuration file: D:/Tristen Grant/Documents/GitHub/portfolio/_config.yml
Server address: http://127.0.0.1:3000//
Server running... press ctrl-c to stop.
Regenerating: 1 file(s) changed at 2016-09-06 16:16:28 ...done in 0.521498 seconds.
Regenerating: 1 file(s) changed at 2016-09-06 16:16:30 ...error:
Error: No such file or directory - git rev-parse HEAD
Error: Run jekyll build --trace for more information.
[2016-09-06 16:19:35] ERROR Errno::ENOTSOCK: An operation was attempted on something that is not a socket.
C:/Ruby21-x64/lib/ruby/2.1.0/webrick/server.rb:170:in `select'
Terminate batch job (Y/N)? y
Terminate batch job (Y/N)? y
I'm using Ruby 2.1.5 64 bit version. RubyDevKit, Sass, Bourbon.
Any ideas how to fix this? I don't know much about Jekyll or ruby. Just starting out.
I also get this error in CMD. You should have github's desktop app installed; try running the same commands from the GitShell you get with that app.
For me that works, it saves me the trouble of installing git globally on Windows and setting it up.

Error: EACCES, unlink...

I'm trying to get my meteor app up and running, but I don't understand the error that its throwing at all, which is:
/Users/ten3/.meteor/packages/meteor- tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:278
throw(ex);
^
Error: EACCES, unlink '/Users/ten3/Desktop/git/ten/website/prospect-recovery/prospect-recovery/.meteor/local/db/mongod.lock'
at Object.Future.wait (/Users/ten3/.meteor/packages/meteor-tool/.1.1.10.1b51q9m++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:398:15)
at /tools/fs/files.js:1331:28
at Object.wrapper [as unlink] (/tools/fs/files.js:1334:20)
at findMongoAndKillItDead (/tools/runners/run-mongo.js:318:11)
at launchOneMongoAndWaitForReadyForInitiate (/tools/runners/run-mongo.js:400:7)
at launchMongo (/tools/runners/run-mongo.js:656:7)
at [object Object]._.extend._startOrRestart (/tools/runners/run-mongo.js:756:19)
at [object Object]._.extend.start (/tools/runners/run-mongo.js:714:10)
at /tools/runners/run-all.js:168:26
- - - - -
I'm running a shell script before I try to run a local copy of my meteor app. It supposed to stop my application from interacting with other APIs. When I run the script (I'm on a mac) through my terminal, it returns '0' which as I read means that there are zero errors. I know that the error message is guiding me to certain lines of code, but I don't understand why I would change them if my co-worker could get his copy up and running. He is running his application on a windows computer. Thank you. I'm pretty new to this.
It was a permission error just as #thatgibbyguy first suggested. I was able to run it buy using sudo meteor to override the permission restrictions. I wasn't about to remove my mongod.lock file since that my coworker had the file and was able to get it up and running.

Ionic build android failed with 403 Http respose from Gradle, JAVA_HOME not valid

I am using Windows 7X64 machine and trying to build Andriod application using cordova/ionic CLI v1.5.5. I am getting this error that I couldn't solve.
"You may not have the required environment or OS to build this project"
with commands ionic build android and cordova build android. The command ionic platform add android was successful. I am working with Android sdk (API 22) using the Android SDK Manager. I also made sure that PATH variable is correctly set.
Full transcript of process is:
C:\Users\ddevkota\Desktop\freshIonic>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\ddevkota\Desktop\fr
eshIonic\hooks\after_prepare\010_add_platform_class.js C:\Users\ddevkota\Desktop
\freshIonic
add to body class: platform-android
Running command: cmd "/s /c "C:\Users\ddevkota\Desktop\freshIonic\platforms\andr
oid\cordova\build.bat""
ANDROID_HOME=C:\Users\ddevkota\AppData\Local\Android\sdk
JAVA_HOME=C:\Progra~1\Java\jdk1.7.0_15
Running: C:\Users\ddevkota\Desktop\freshIonic\platforms\android\gradlew cdvBuild
Debug -b C:\Users\ddevkota\Desktop\freshIonic\platforms\android\build.gradle -Do
rg.gradle.daemon=true
Downloading http://services.gradle.org/distributions/gradle-2.2.1-all.zip
Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Serv
er returned HTTP response code: 403 for URL: http://services.gradle.org/distribu
tions/gradle-2.2.1-all.zip
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:78)
at org.gradle.wrapper.Install.createDist(Install.java:47)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL:
http://services.gradle.org/distributions/gradle-2.2.1-all.zip
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1625)
at org.gradle.wrapper.Download.downloadInternal(Download.java:59)
at org.gradle.wrapper.Download.download(Download.java:45)
at org.gradle.wrapper.Install$1.call(Install.java:60)
at org.gradle.wrapper.Install$1.call(Install.java:47)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAcc
essManager.java:65)
... 3 more
C:\Users\ddevkota\Desktop\freshIonic\platforms\android\cordova\node_modules\q\q.
js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\Users\ddevkota\Desktop\freshI
onic\platforms\android\gradlew cdvBuildDebug -b C:\Users\ddevkota\Desktop\freshI
onic\platforms\android\build.gradle -Dorg.gradle.daemon=true"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
at ChildProcess.whenDone (C:\Users\ddevkota\AppData\Roaming\npm\node_modules
\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Thanks for help in advance.
NOTE: This turns out to be a permission issue in client (403). I connected my machine to different network and it started working. All build process. If you wanna do it manually here is how far I got.
Solution for not Valid JAVA_HOME
After spending days and uninstalling all versions of java, reinstalling only one version and setting up Environment VariableJAVA_HOME as C:\Program Files\Java\jdk1.7.0_15 I solved the problem.
However there was another issue of ionic build android error when downloading gradle.
This was solved as I added gradle to my project offline.
Solution for not Gradle 403 Http response
Do the following:
After downloading gradle from issued link (here is https://services.gradle.org/distributions/gradle-2.2.1-all.zip) paste it in somewhere likes myApp\platforms\android\gradle\gradle-2.2.1-all.zip and in build.js from myApp\platforms\android\cordova\lib\build.js find this:
var distributionUrl = 'distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip';
And replace it with your own file's location:
var distributionUrl = 'distributionUrl=../gradle-2.2.1-all.zip';
Still working on build and will keep on posting the solution. A thread about other issues is created in ionic forum and it is here.
Solution for not Gradle 403 Http response
find distributionUrl variable in:
myapp\platforms\android\cordova\lib\builders\GradleBuilder.js
change http value to https in this line:
var distributionUrl = process.env['CORDOVA_ANDROID_GRADLE_DISTRIBUTION_URL'] || 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip';

Deploy meteor/meteorite 0.8.3 to heroku

I just updated my app to meteor 0.8.3. Locally it runs without problems. But when I try to push it to heroku, I'll get the following error:
Building meteor bundle
simple-schema: updating npm dependencies -- string...
iron-router: updating npm dependencies -- connect...
lodash: updating npm dependencies -- lodash...
Errors prevented bundling:
While building the application:
error: no such package: 'accounts-ui-bootstrap-3'
error: no such package: 'accounts-entry'
While building package `iron-dynamic-template`:
error: no such package: 'blaze'
tar: /app/tmp/cache/bundle.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Exiting with failure status due to previous errors
! Push rejected, failed to compile Meteor app app
For deployment, I used the buildpack of oortcloud. This worked proper in the past. https://github.com/oortcloud/heroku-buildpack-meteorite
I'm most confused by the earlier log entries before the error happens. Here it says that Meteor 0.8.1.1 is being installed. A couple of lines after that it confirms that Meteor 0.8.3 has been installed. I'm pretty sure that this is the same issue like this. https://github.com/EventedMind/iron-dynamic-template/issues/2
Installing Meteor 0.8.1.1
* 'meteor' build tool (vers
* 'meteor' build tool (version 43b8566b9f)
* Package updates: accounts-base accounts-meteor-developer accounts-oauth
accounts-password accounts-ui accounts-ui-unstyled amplify appcache
application-configuration autoupdate browser-policy browser-policy-common
browser-policy-content check coffeescript coffeescript-test-helper ctl
ctl-helper deps ejson email facebook facts follower-livedata force-ssl github
google html-tools htmljs http jquery-waypoints js-analyze less livedata
localstorage logging meetup meteor meteor-developer minifiers minimongo
mongo-livedata oauth oauth-encryption oauth1 oauth2 observe-sequence
reactive-dict routepolicy session showdown spacebars spacebars-compiler
spacebars-tests spiderable srp star-translate stylus templating test-helpers
test-in-browser tinytest twitter ui underscore-tests webapp weibo
Meteor 0.8.3 has been installed in your home directory (~/.meteor).
Now you need to do one of the following:
(1) Add ~/.meteor to your path, or
(2) Run this command as root:
cp ~/.meteor/tools/latest/launch-meteor /usr/bin/meteor
Then to get started, take a look at 'meteor --help' or see the docs at
docs.meteor.com.
I also tried to create a new meteorite app to get rid of dangling dependencies. But without success!
What can I do? Is there a chance to debug the push/deploy on the heroku server?
The outdated file .meteor/release caused the problem:
git heroku push master fetches the files to deploy from the origin git repository. It doesn't care about local, unstaged files. Somehow the file .meteor/release has not been pushed to the origin repository. So during the installation routine at heroku the meteor version was 0.8.1.1 and not 0.8.3.
Solution to avoid this problem:
Check/Add the files .meteor/release and .meteor/packages to your origin git repo
Test only what's in your origin repo before you deploy it. Use git pull

Resources