-
Notifications
You must be signed in to change notification settings - Fork 4k
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
(aws-cdk): Receiving generic "Invalid URL" error when running cdk diff
#33495
Comments
Hey @chrisdlim thanks for the report. Can you provide some details about the command that is running? When I run PS: The main package is called |
Getting the same |
+1 |
We need some help to find out the triggering factor here. What is your node version? What is your npm version? What does your
How are you determining that it is pulling a package? What is pulling a package? This is confusing me, because is the common thread from everyone experiencing this problem that it occurs on CI systems? CodeBuild, CircleCI? Does the error appear to be coming from |
Previously we were on |
We are also seeing this issue, only on CI systems. Specifically I am seeing it using node 18. We were able to resolve it by pinning our aws-cdk version to It works just fine locally. |
To expand on this a little, we generally call the toolkit through To work around the issue for now, we've adjusted the workflows to use While troubleshooting, we tried passing the
To complicate matters further, we're apparently only seeing the "Invalid URL" error from some workflows/runners in our enterprise and not from others, so some projects are running with |
Thanks all! As far as I can tell it's again only on Node 16. Through some path, during validation of the Cloud Assembly manifest, the
Which succeeds on Node 18+, but throws an Haven't yet been able to determine why this validation is sometimes performed and sometimes not. It looks like we consumed an update to |
Stack trace for future research:
|
@rix0rrr We are definitely seeing the issue on node 18.15 Run actions/setup-node@v4
Resolved ./.nvmrc as 18.15
Attempting to download 18.15...
Acquiring 18.15.0 - x64 from https://github.com/actions/node-versions/releases/download/18.15.0-4362038354/node-18.15.0-linux-x64.tar.gz
Extracting ...
/usr/bin/tar xz --strip 1 --warning=no-unknown-keyword --overwrite -C /home/runner/_work/_temp/cf7ca078-5a00-48e2-83d8-cc61e67a3026 -f /home/runner/_work/_temp/44c62c98-0f67-481b-b4c0-169a3a2d80c3
Adding to the cache ...
Environment details [22:01:08] env: {
CDK_DEFAULT_REGION: 'us-east-1',
CDK_DEFAULT_ACCOUNT: '****',
CDK_OUTDIR: 'cdk.out',
CDK_CLI_ASM_VERSION: '40.0.0',
CDK_CLI_VERSION: '2.1000.1'
}
Warning: aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate is deprecated.
use {@link Certificate } instead
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate is deprecated.
use {@link Certificate } instead
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_certificatemanager.DnsValidatedCertificate is deprecated.
use {@link Certificate } instead
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_cloudfront_origins.S3Origin is deprecated.
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_cloudfront_origins.S3Origin is deprecated.
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_cloudfront_origins.S3Origin#bind is deprecated.
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
This API will be removed in the next major release.
Warning: aws-cdk-lib.aws_cloudfront_origins.S3Origin#bind is deprecated.
Use `S3BucketOrigin` or `S3StaticWebsiteOrigin` instead.
This API will be removed in the next major release.
[22:01:10] Notices refreshed
Invalid URL
Error: Process completed with exit code 1. |
I am confirming that it breaks on node v18.5. Our CCI container is using node v18.5. We originally did not have cdk installed, so npm would automatically pull the latest cdk, install it, and run "cdk diff". However, when cdk v2.1000.0 came out, it did the same process except it broke on this "Invalid URL" error. Adding cdk v2.1000.0 as part of our dependencies suppressed the warning about needing to install cdk but we still ran into the error. The only way to get passed this error is to install an earlier version, which is the one before the splitting of cdk versions documented here: https://aws.amazon.com/blogs/opensource/aws-cdk-is-splitting-construct-library-and-cli/ |
We solved the problem, so we used Image aws/codebuild/standard:7.0 and that solves the problem. We configure our pipeline using CDK Python and here is where we define the image version |
That's interesting. I tested on 18.18 and naively assumed the behavior would be the same across all 18's, but maybe it's something that got fixed later in 18's life cycle. |
Ah yeah it was fixed in 18.17 |
….17 (#61) It looks like `jsonschema 1.5.0` contains changes that are not compatible with Node versions below 18.17. Hold back the version to 1.4.1. Relates to aws/aws-cdk#33495 --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: github-actions <github-actions@github.com>
Probable fix is merged, running a release now |
2.1000.2 is out and does not have this issue |
Thanks for the help everyone! I'm going to close this one out. |
Comments on closed issues and PRs are hard for our team to see. |
Describe the bug
We have our app deployed via CircleCI and we received the following error when attempting to run a cdk diff:
Explicitly installing cdk@2.151.0 fixed the issue. Are there dependency mismatches when using 2.1000.0?
Regression Issue
Last Known Working CDK Version
2.179.0
Expected Behavior
To not receive an error about "Invalid URL". Using the
--verbose
flag also does not provide any additional debug logs.Current Behavior
Received a generic "Invalid URL" error
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.1000.0
Framework Version
No response
Node.js Version
18.15.0
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: