-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
java aws-cdk: Cdk App class initialization/constructor started to fail on Windows 10 and 11 #26632
Comments
This sounds like related to Windows update. I am making it a p2 here before we have more insights. Please help us prioritize with upvotes. |
I am also facing this issue within a python cdk project. This is my error:
|
Same problem here. Started happening to me when I updated to aws-cdk-lib 2.90.0 so I played around with the package versions a bit. With the following dependencies, cdk commands run successfully
and with the next version, the above symlink error occurs (aws-cdk-lib 2.90.0 requires minimally jsii 1.86.0)
I also tried the following, which failed. So the issue is clearly with jsii 1.86.0, which makes sense from the call stack.
In addition to downgrading your aws-cdk-lib/jsii versions, running cdk commands in adminstrator mode also seems to work as a workaround. |
Same issue with dotnet CDK. |
It's mentioned in aws/jsii#4208 with some workaround. |
what is the solutions of above issue , same issue I am facing |
|
CDK 2.88.0 running on Windows 11. Can't instantiate App as described above. |
Hi i am using windows10 and above solutions i did not get , i dont have administrator access |
Fix pending here: aws/jsii#4212 |
Same issue with Python CDK; however using the workaround above worked. |
Looks like the fix mentioned by @rix0rrr has now been released. https://github.com/aws/jsii/releases/tag/v1.87.0 |
Fix imported here, next release will have it: #26734 |
|
Describe the bug
Two days ago all CDK projects we have started to fail on constructor of App class. One of these projects was working before and was not even touched, no node updates, no cli updates. It is happening only on Windows 10,11 ... multiple people started to face the issue at the same time. We tried to migrate project on Ubuntu and it was working as expected. We tried to create a new CDK template project from scratch on Windows and the same issue. We suspect it was some Windows update causing this. Here is the callstack that is same everywhere:
software.amazon.jsii.JsiiError: EPERM: operation not permitted, symlink 'C:\Users\annonymous\AppData\Local\AWS\jsii\package-cache\constructs\10.2.69\999a045971105d00548e478f26ed34c78a3f59c8d2761e5b10ff99bb9
6d18043' -> 'C:\Users\annonymous\AppData\Local\Temp\jsii-kernel-c704Aa\node_modules\constructs'
Error: EPERM: operation not permitted, symlink 'C:\Users\annonymous\AppData\Local\AWS\jsii\package-cache\constructs\10.2.69\999a045971105d00548e478f26ed34c78a3f59c8d2761e5b10ff99bb96d18043' -> 'C:\Users\annonymous\AppData\Local\Temp\jsii-
kernel-c704Aa\node_modules\constructs'
at symlinkSync (node:fs:1816:3)
at link (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:10445:38)
at extractViaCache (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:11493:29)
at Object.extract (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:11450:81)
at C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:9916:127
at Kernel._Kernel_debugTime (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:10365:24)
at Kernel._Kernel_load (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:9916:105)
at C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:9653:181
at Kernel._Kernel_debugTime (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:10365:24)
at Kernel.load (C:\Users\annonymous\AppData\Local\Temp\jsii-java-runtime7523181351169875103\lib\program.js:9653:96)
at software.amazon.jsii.JsiiRuntime.processErrorResponse(JsiiRuntime.java:150)
at software.amazon.jsii.JsiiRuntime.requestResponse(JsiiRuntime.java:116)
at software.amazon.jsii.JsiiClient.loadModule(JsiiClient.java:56)
at software.amazon.jsii.JsiiEngine.loadModule(JsiiEngine.java:188)
at software.amazon.jsii.JsiiEngine.loadModule(JsiiEngine.java:185)
at software.amazon.jsii.JsiiEngine.createNewObject(JsiiEngine.java:608)
at software.amazon.awscdk.App.(App.java:86)
at cz.acrobits.cdk.conferencing_chime.CdkApp.main(CdkApp.java:40)
Expected Behavior
It is possible to create an instance of App.class
Current Behavior
It is not possible to create an instance of App.class
Reproduction Steps
Take Windows 10 or 11. Install all updates. Init a brand new project in java using cli and run it
Possible Solution
It looks like some permission issue so I would try to run the node.js command from java under admin user as a first steo to verify
Additional Information/Context
No response
CDK CLI Version
2.88.0, 2.89.0
Framework Version
2.89.0
Node.js Version
18.17.0 , 20.5.0
OS
Windows 10,11
Language
Java
Language Version
java 11
Other information
No response
The text was updated successfully, but these errors were encountered: