deleting convox apps which are linked to resources - infrastructure

I'm getting a weird error from convox when I go to delete a resource:
$ convox apps delete my-app
Deleting my-app... ERROR: app is linked to syslog-1234 resource
Weirdly, when I investigate that resource, I see nothing.
$ convox resources info syslog-1234 --app my-app
ERROR: ValidationError: Resource ResourceSyslog1234 does not exist for stack convox-rack-my-app
status code: 400, request id: 9f364cc8-ec82-45fd-aca1-015c4a2395e3
It's like the resource which is blocking my delete action doesn't exist. Any thoughts?

You have to unlink the resource before delete the app, like:
convox rack resources unlink syslog-1234 --app=my-app --rack=your-rack-name --wait

Related

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

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

Yarn add - Private package - 404 Not Found

I want to install a private package hosted on an internal Gitlab with Yarn.
So, I configured my .npmrc with this informations :
#mypackage:registry=https://gitlab.intra/api/v4/packages/npm/
//gitlab.intra/api/v4/projects/819/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/packages/npm/:_authToken=xxxxx
always-auth=true
When I attempt to install the package with yarn add #mypackage/lib-node-client, Yarn give me an error :
Trace:
Error: https://gitlab.intra/api/v4/projects/725/packages/npm/#mypackage/lib-node-common/-/#mypackage/lib-node-common-21.7.1.tgz: Request failed "404 Not Found"
at ResponseError.ExtendableBuiltin (/usr/lib/node_modules/yarn/lib/cli.js:696:66)
at new ResponseError (/usr/lib/node_modules/yarn/lib/cli.js:802:124)
at Request.<anonymous> (/usr/lib/node_modules/yarn/lib/cli.js:67062:16)
at Request.emit (node:events:369:20)
at Request.module.exports.Request.onRequestResponse (/usr/lib/node_modules/yarn/lib/cli.js:141640:10)
at ClientRequest.emit (node:events:369:20)
at HTTPParser.parserOnIncomingClient (node:_http_client:646:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:129:17)
at HTTPParser.execute (<anonymous>)
at TLSSocket.socketOnData (node:_http_client:512:22)
So, Yarn can't find the URL : https://gitlab.intra/api/v4/projects/725/packages/npm/#mypackage/lib-node-common/-/#mypackage/lib-node-common-21.7.1.tgz
If I try to get this on my browser, I can download the package...
If anyone can help me please, thank's for all :)
In your .npmrc file, you tell how to connect to GitLab for the project 819. The error is about the project 725. GitLab simply refuse the connexion.
Try with
#mypackage:registry=https://gitlab.intra/api/v4/packages/npm/
//gitlab.intra/api/v4/projects/725/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/projects/819/packages/npm/:_authToken=xxxxx
//gitlab.intra/api/v4/packages/npm/:_authToken=xxxxx
always-auth=true
We had a gitlab private package registry, and was constantly getting this error.
npm i #placeholder/package-name works fine, but yarn add #placeholder/package-name was giving 404 errors.
I tried all possible solutions listed on this thread. At last, there was a section in gitlab on troubleshooting yarn installation [1].
It said,
try adding this to your .npmrc file (and replace <your_token> with your personal access token or deploy token):
//gitlab.example.com/api/v4/projects/:_authToken=<your_token>
Our previous .npmrc looked like this
save-exact=true
unsafe-perm=true
#placeholder:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${PLACEHOLDER_TOKEN}
With the above new line addition, it looked like this,
save-exact=true
unsafe-perm=true
#placeholder:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${PLACEHOLDER_TOKEN}
//gitlab.com/api/v4/projects/:_authToken=${PLACEHOLDER_TOKEN}
With that addition, yarn add #placeholder/package-name worked fine.
[1] https://docs.gitlab.com/ee/user/packages/npm_registry/#error-running-yarn-with-the-package-registry-for-npm-registry
This should be the accepted answer. //gitlab.com/api/v4/projects/:_authToken=${PLACEHOLDER_TOKEN} Was the piece I was missing, which supercedes needing to list each project id as in Joel's answer.

PhoneGap Build: Error: NOT_FOUND_ERR (missing files)

When I try to use my app from PhoneGap Build, it seems to be missing images. When I check in the Chrome web inspector, it's also missing script files. Here are the errors:
cordova.js:314 Uncaught Error: NOT_FOUND_ERR
at fileService.js:77
at fail (FileEntry.js:88)
at Object.callbackFromNative (cordova.js:295)
at <anonymous>:1:9
cordova.js:312 Error in Error callbackId: File410316782 : Error: NOT_FOUND_ERR
cordova.js:314 Uncaught Error: NOT_FOUND_ERR
at fileService.js:77
at fail (FileEntry.js:88)
at Object.callbackFromNative (cordova.js:295)
at <anonymous>:1:9
.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
I know I didn't fail to include this file, because it was working before.
Most issues like this, as well as "Upload Error [2]", can be solved in PhoneGap Build by deleting the app and re-uploading. Don't worry about losing anything, since all of your settings are in your config files. It seems that PhoneGap has a tendency to inadvertently retain or misplace files.
I tend to just delete my app and re-upload every time I need to run a build, so I don't have to waste time installing and opening the app, only to find out it's missing files.

Xcode Moving code to a new project

When renaming a project the project became corrupted and i could not recover it. when opening the workspace no files are visible only the .xcworkspace file in red and the pods project file in red. the swift files remained so i copied them to a new project and now i cant get past the following error
2016-05-03 14:17:55.368 App Name[2194:827220] +[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348
2016-05-03 14:17:55.369 App Name[2194:827220] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSDate dateFromRFC3339String:]: unrecognized selector sent to class 0x397f0348'
*** First throw call stack:
(0x2289798b 0x22032e17 0x2289d241 0x2289af51 0x227c62f8 0x1c2de3 0x1c31a7 0x1c2957 0x1c45cb 0x1c5525 0x22df92b9 0x230a9659 0x2300a723 0x22ffccf9 0x230ab911 0x18d3b6b 0x18d8655 0x22859bdd 0x228580d7 0x227a72e9 0x227a70d5 0x23d97ac9 0x26e6c0b9 0x160910 0x2244f873)
libc++abi.dylib: terminating with uncaught exception of type NSException
The same code worked fine in the previous project and the error. the project file does not appear to be present in the original file.
I need help on either debugging the above errors or to fix the original project.
any help will be greatly appreciated
Rebuild up your pods and the workspace by running pod install for this new project (perhaps clean out your Pods folder beforehand)
To be more clear
Backup you entire project and files somewhere
Exit xcode
If you are not using the xcworkspace for anything except pods, delete it
Delete the Pods folder
run pod install -- if there are errors, stop and tell us what they are
If there are no errors, you now have an .xcworkspace file and a Pods folder with pods
Open the .xcworkspace file in Xcode. Pods should not be red.

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