-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
InconsistentQuantities error when deploying with @sls-next/serverless-component@1.18.0-alpha.5^ #722
Comments
As the error suggests, I think serverless-next.js/packages/serverless-components/domain/utils.js Lines 400 to 414 in 69574c7
Unfortunately it looks like we don't have logging on what is actually sent to CloudFront to update the distribution: What you can do is build this component from source (following the CONTRIBUTING.md guides) and try to add some logging statements around that In particular, this line seems suspect due to the negative indexing, and it was added in 1.18.0-alpha.2, which is consistent with 1.17 still working. I'll take a look at that + adding logs but in the meantime if you can try to post the request sent to CloudFront log, that will also be helpful. |
Also I think your if (subdomain.domain.startsWith("www.")) |
Published a fix in the latest alpha, please try and see if it works for you. Thanks! |
Hello, thanks for getting on this so quickly! I will test it ASAP and let you know. For what it's worth, my input domain is apex, i.e. |
I see, thanks! Anyway I did add some logging so if it doesn't work, then it should at least show some logs now for the CloudFront API calls in debug mode. Let me know what the logs say if it doesn't work and we can figure out if there is still another bug. |
Actually there might be a slight issue, I think it still may not be completely fixed due to #658, which is If the latest alpha does work (but it probably might not?), could you please post some logs of what is sent to CloudFront (should be in debug now)? Also, please try 1.18.0-alpha.1 or 1.18.0-alpha.0 and see if this issue occurs there (I guess it will be working for you like 1.17). The above change is only in 1.18.0-alpha.2 or later. |
Yes, you are right, 1.18.0-alpha.1 works well. :) |
Thanks, let me just do some testing and see if it's safe to revert that change, I think it should be. |
@eddeee888 please try the latest published alpha, which has this change: #731 and let us know if you are facing any issues. This should revert the change that may have been causing issues. (back to 1.17 behavior). Unfortunately the domain component that handles the If you are having issues, I suggest to not use the I also recently added |
Hi @dphang , the new version works! Thanks for solving it so quickly! Just for my understanding, could you help me understand why I find that using |
Sure, no worries. The domain sub component just doesn't have unit tests - not that it's hard to test. I think perhaps it was imported from somewhere else |
Describe the bug
I'm currently using
@sls-next/serverless-component@1.17.0
withapex
domain settings ( full serverless yml below )I'm trying to use the custom header feature as mentioned in #587 (comment). so I tried to use
@sls-next/serverless-component@1.18.0-alpha.5
( and also@sls-next/serverless-component@1.18.0-alpha.22
)However, when I try to deploy it, I get
InconsistentQuantities
error in CI. Probably happens if I run it locally too.Actual behavior
I get the following error as it's trying to deploy:
InconsistentQuantities: The specified quantity of Aliases (1) does not match the actual quantity supplied (2)
Expected behavior
It should deploy without error
Steps to reproduce
Here's a version of my serverless yml without all the credentials:
Screenshots/Code/Logs
Here's the log when it fails ( v1.18.0-alpha.5 and v1.18.0-alpha.22 ):
I downgraded back to version 1.17.0 and it works. Here's the log for comparison:
Versions
Additional context
I'm using
apex
as thedomainType
with the manual workaround to redirectwww
-> apex domainChecklist
@sls-next/serverless-component
release version, which may have already fixed your issue. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.The text was updated successfully, but these errors were encountered: