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

Images not displayed with no param #106

Open
gregBerthelot opened this issue Nov 9, 2021 · 7 comments
Open

Images not displayed with no param #106

gregBerthelot opened this issue Nov 9, 2021 · 7 comments

Comments

@gregBerthelot
Copy link

gregBerthelot commented Nov 9, 2021

Describe the bug
I updated from 2.06 to latest and deploy. Now our images are not displayed behind CloudFront with no params, eg. xoxo.cloudfront.net/image.jpg?w=200 is well displayed but not xoxo.cloudfront.net/image.jpg for which I get {}

Screenshots
https://recordit.co/XaD4Qtdetv

Serverless: Deprecation warning: "service" is not accessible (configured behind variables which cannot be resolved at this stage).
            Starting with next major release, this will be communicated with a thrown error.
            Set "variablesResolutionMode: 20210326" in your service config, to adapt to this behavior now
            More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: Deprecation warning: Detected unrecognized CLI options: "--settings".
            Starting with the next major, Serverless Framework will report them with a thrown error
            More Info: https://www.serverless.com/framework/docs/deprecations/#UNSUPPORTED_CLI_OPTIONS
Serverless: Deprecation warning: Resolution of lambda version hashes was improved with better algorithm, which will be used in next major release.
            Switch to it now by setting "provider.lambdaHashingVersion" to "20201221".
            While it is highly encouraged to upgrade to new algorithm, you can still use the old approach by setting "provider.lambdaHashingVersion" to "20200924".
            More Info: https://www.serverless.com/framework/docs/deprecations/#LAMBDA_HASHING_VERSION_V2
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Excluding development dependencies...
Serverless: Warning! You're using the AWS_PROXY in combination with response configuration in your function "index". Serverless will remove this configuration automatically before deployment.
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service index.zip file to S3 (335.8 kB)...
Serverless: Uploading service sharp.zip file to S3 (11.49 MB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.....................
Serverless: Stack update finished...
Service Information
service: serverlessTemplateImg
stage: dev
region: eu-west-3
stack: serverlessTemplateImg-dev
resources: 13
api keys:
  None
endpoints:
  GET - https://XXXXX.execute-api.eu-west-3.amazonaws.com/dev/{any+}
functions:
  index: serverlessTemplateImg-dev-index
layers:
  sharp: arn:aws:lambda:eu-west-3:XXXXX:layer:dev-sharp:16
Serverless: Removing old service artifacts from S3...
@gregBerthelot
Copy link
Author

@Mosnar any help would be appreciated on this. We are stuck with 2.06 and node10 and have the need to update

@Mosnar
Copy link
Collaborator

Mosnar commented May 18, 2022

@gregBerthelot Any reason you can't update to Node 14?

@gregBerthelot
Copy link
Author

gregBerthelot commented May 18, 2022

The above reported issue is from serverless-sharp 2.1.0 running on Node 14. I just made a new deploy with your latest version.

Please check
https://di26vpqopmq9u.cloudfront.net/daylight-forest-glossy-lake-443446.jpg?w=200
vs
https://di26vpqopmq9u.cloudfront.net/daylight-forest-glossy-lake-443446.jpg

FYI we use region: 'eu-west-3' with ACM_CERTIFICATE_ARN: 'arn:aws:acm:us-east-1:XOXOX

@gregBerthelot
Copy link
Author

Seems that almost one params is needed even if it is not a valid one.

Please check
https://di26vpqopmq9u.cloudfront.net/daylight-forest-glossy-lake-443446.jpg?foo
which is well displaying the image while
https://di26vpqopmq9u.cloudfront.net/daylight-forest-glossy-lake-443446.jpg
does not

@Mosnar
Copy link
Collaborator

Mosnar commented May 18, 2022

Yeah, I noticed that while working on version 3 and fixed it. I didn't realize it existed prior to that. I'll see if I can cut a v2 release. I'm trying to focus on getting the next version out the door right now, hence why I haven't spent much time on issues lately.

@gregBerthelot
Copy link
Author

Hi @Mosnar Any chance you release a fix soon for this issue?

@gregBerthelot
Copy link
Author

@Mosnar AWS are ending support for Node.js 12 in AWS Lambda. This follows Node.js 12 End-Of-Life (EOL) reached on April 30, 2022. Any chance you fix the above issue so we can upgrade to Node.js 14?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants