Open skytreader opened 4 years ago
@skytreader thanks for report. Still it looks as an issue in some plugin you rely on, which instead of throwing JavaScript error instance, throws a Node.js buffer instance
Buffer can be anything, technically a binary data, which doesn't translate meaningfully to utf8 string, that's why it's displayed like that.
Ideally if you can narrow the issue, coin which plugin is responsible for that, and open an issue at its repository
I'm getting a similar error, the reported exception is: <Buffer >
Results of logging are very similar to those reported above.
My plugins are:
Tried first with current serverless version, 1.60.4
Operating System: darwin
Node Version: 12.14.0
Framework Version: 1.54.0
Plugin Version: 3.2.6
SDK Version: 2.2.1
Components Core Version: 1.1.2
Components CLI Version: 1.4.0
Also using Python 3.6
I commented out serverless-wsgi from my serverless.yaml and the deploy ran successfully a number of times, no failures since then.
Note that the crashes described above will leave a wsgi_handler and serverless_wsgi file in your project root.
I found if I kept these files in my project, not only would the deploy succeed, but the deployment would work as expected.
@mfsjr this should be reported to project which propagates buffer as an exception. In my understanding it's one of the plugins that you rely on, and not the Framework (Framework just surfaces the error that came out from a plugin, as it is)
@medikoo your understanding is correct, and it was reported here: https://github.com/logandk/serverless-wsgi/issues/122
I have the same issue. `Exception -----------------------------------------------
<Buffer 57 41 52 4e 49 4e 47 3a 20 54 68 65 20 64 69 72 65 63 74 6f 72 79 20 27 2f 2e 63 61 63 68 65 2f 70 69 70 27 20 6f 72 20 69 74 73 20 70 61 72 65 6e 74 ... 1188 more bytes>`
Translate it to text is :
WARNING: The directory '/.cache/pip' or its parent
Bug Report
Description
serverless.yml
file?provider: name: aws runtime: python3.6 stage: ${opt:stage, 'dev'} region: eu-west-1 timeout: 30 iamRoleStatements:
plugins:
custom: tableName: 'ns-${self:provider.stage}' topicName: 'ns-${self:provider.stage}' domainEnvSuffix: dev: -dev prod: '' customDomain: domainName: ${self:service}${self:custom.domainEnvSuffix.${self:provider.stage}}.example.com certificateName: '*.example.com' stage: ${self:provider.stage} createRoute53Record: true endpointType: edge wsgi: app: main.app packRequirements: true pythonRequirements: dockerizePip: non-linux topicArn: Fn::Join:
functions: app: handler: wsgi_handler.handler events:
resources: Resources: DynamoTable: Type: 'AWS::DynamoDB::Table' Properties: ...REDACTED... NSChannel: Type: "AWS::SNS::Topic" Properties: TopicName: ${self:custom.topicName}
If you translate the hexdump in the buffer object, you will see that it is the beginnings of a Python stack trace: