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

(bug) ddk deploy fails on windows 11 pro #178

Closed
kukushking opened this issue Oct 25, 2022 · 4 comments · Fixed by #180
Closed

(bug) ddk deploy fails on windows 11 pro #178

kukushking opened this issue Oct 25, 2022 · 4 comments · Fixed by #180
Assignees
Labels
bug Something isn't working

Comments

@kukushking
Copy link
Contributor

kukushking commented Oct 25, 2022

Describe the bug

ddk deploy on windows fails w/o any error message or stack trace. Ordinary cdk deploy works fine.

How to Reproduce

Deploying DDK stacks to AWS account XXXXXXXXXXX and region us-east-1...
ERROR - Failed to run `cdk deploy --all --require-approval never --output .ddk.out`. See output above.

Expected behavior

No response

Your project

No response

Screenshots

image

Environment

Provide your `pip list` output, particularly the version of the AWS DDK library you used. Providing this information may significantly improve resolution times.

OS

Windows 11 Pro

Python version

3.10.8

AWS DDK version

0.5.1

Additional context

No response

@kukushking kukushking added the bug Something isn't working label Oct 25, 2022
@malachi-constant malachi-constant self-assigned this Oct 26, 2022
@malachi-constant
Copy link
Contributor

Replicated, but still need some time to get back to this one. The only exception I was able to expose so far is Exception: [WinError 2] The system cannot find the file specified.

@malachi-constant
Copy link
Contributor

Python does not appear to be able to find cdk when invoking via subprocess. Popen()

>>> sys.path
['', 'D:\\Users\\hansonlu\\AppData\\Local\\Programs\\Python\\Python310\\python310.zip', 'D:\\Users\\hansonlu\\AppData\\Local\\Programs\\Python\\Python310\\DLLs', 'D:\\Users\\hansonlu\\AppData\\Local\\Programs\\Python\\Python310\\lib', 'D:\\Users\\hansonlu\\AppData\\Local\\Programs\\Python\\Python310', 'D:\\Users\\hansonlu\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages']
>>> subprocess.Popen("which cdk")
<Popen: returncode: None args: 'which cdk'>
>>> /d/Users/hansonlu/AppData/Roaming/npm/cdk

KeyboardInterrupt
>>> subprocess.Popen("cdk --version")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Users\hansonlu\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 971, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "D:\Users\hansonlu\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1440, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

@malachi-constant
Copy link
Contributor

malachi-constant commented Oct 27, 2022

subprocess.Popen(...., shell=True) resolves.

This is a security issue though as well...

Issue: [B602:subprocess_popen_with_shell_equals_true] subprocess call with shell=True identified, security issue.

@malachi-constant
Copy link
Contributor

New issue uncovered after adding the above

 Exception: 'charmap' codec can't encode character '\u2728' in position 21: 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants