Skip to content

Getting "Error: EOF: end of file, read" on Windows #11314

@ot-jim-elphick

Description

@ot-jim-elphick

description of the bug:

returns JSII error on empty stack. May be related to #5187.

stack trace references SyncStdio.readLine (myfolder\jsii_embedded\jsii\jsii-runtime.js:13278:33)
Comment in code at 'throw e':

// HACK: node may set O_NONBLOCK on it's STDIN depending on what kind of input it is made
// of (see https://github.com/nodejs/help/issues/2663).
. . .
// "tracked" at https://github.com/aws/aws-cdk/issues/5187

Reproduction Steps

(using powershell) This follows example from https://docs.aws.amazon.com/cdk/latest/guide/ecs_example.html
mkdir myfolder
cd myfolder
cdk init --language python
.env\Scripts\activate.ps1
python -m pip install -r requirements.txt
cdk synth

What did you expect to happen?

return an empty stack with no error

What actually happened?

(.env) p$[myfolder]> cdk synth                                                                                                                      D:\d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13295
                    throw e;
                    ^

Error: EOF: end of file, read
    at Object.readSync (fs.js:592:3)
    at SyncStdio.readLine (D:\d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13278:33)
    at InputOutput.read (D:\d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13203:34)
    at KernelHost.run (D:\d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13021:32)
    at Immediate.<anonymous> (D:\d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13029:37)
    at processImmediate (internal/timers.js:461:21) {
  errno: -4095,
  syscall: 'read',
  code: 'EOF'
}
Resources:
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Modules: aws-cdk=1.69.0,@aws-cdk/cloud-assembly-schema=1.69.0,@aws-cdk/core=1.69.0,@aws-cdk/cx-api=1.69.0,@aws-cdk/region-info=1.69.0,jsii-runtime=Python/3.7.4
    Metadata:
      aws:cdk:path: myfolder/CDKMetadata/Default
    Condition: CDKMetadataAvailable

Environment

  • CLI Version : aws-cli/2.0.61 Python/3.7.7 Windows/10 exe/AMD64
  • Framework Version: 1.69.0 (build 2b474b9)
  • Node.js Version: v14.15.0
  • OS : Windows 10
  • Language (Version): python 3.7.4

Other

Error is persistent and easily reproduced on my machine.
I re-installed/upgraded aws cli to 2.0.61
I re-installed node.js
I re-installed cdk
Note: As noted in the section above, this 'hello world' level error still creates a stack. However, when more code is added, more jsii errors occur and the stack fails. Also, code that errors on my machine runs normally on other machines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.closed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.effort/mediumMedium work item – several days of effortjsiiThis issue originates in jsii, or this feature must be implemented in jsii.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions