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

cookieplone startup hangs with no output/template selection: git clone of cookieplone-templates fails but with different error output #33

Open
fredvd opened this issue Aug 14, 2024 · 1 comment
Assignees

Comments

@fredvd
Copy link
Member

fredvd commented Aug 14, 2024

My cookieplone refused to start up this morning. You should see a welcome screen with the template selection. I noticed https-remote-get in the terminal title, so I checked what was checked out, https://github.com/plone/cookieplone-templates.git .

Testing the git clone of that repo in another terminal and directory worked find.

After 1-2 minutes cookieplone aborted with a traceback:

│ │ capture_output = False                                                                       │ │
│ │          check = True                                                                        │ │
│ │          input = None                                                                        │ │
│ │         kwargs = {                                                                           │ │
│ │                  │   'stdout': -1,                                                           │ │
│ │                  │   'cwd': PosixPath('/Users/fred/.cookiecutters'),                         │ │
│ │                  │   'stderr': -2                                                            │ │
│ │                  }                                                                           │ │
│ │      popenargs = (['git', 'clone', 'https://github.com/plone/cookieplone-templates.git'],)   │ │
│ │        process = <Popen: returncode: 128 args: ['git', 'clone',                              │ │
│ │                  'https://github.com/plone/coo...>                                           │ │
│ │        retcode = 128                                                                         │ │
│ │         stderr = None                                                                        │ │
│ │         stdout = b"Cloning into 'cookieplone-templates'...\nfatal: unable to access          │ │
│ │                  'https://github."+123                                                       │ │
│ │        timeout = None

Debugging this somewhat further I found out that an directory had been created at ~/.cookiecutters/cookieplone-templates/ . When I removed this directory, cookieplone was able to clone the repo and start up properly with a list of available templates.

What I cannot pinpoint is that the error message in the traceback mentions it cannot access github, pointing to network issues. But the real problem is a halfway finished git clone that leaves a checkout in an inconsistent state. In that case, when I try to reproduce this, I see another error:

git clone https://github.com/plone/cookieplone-templates.git
fatal: destination path 'cookieplone-templates' already exists and is not an empty directory.

I'm not sure what to make of this, I just found out there are issues with my internet connection reported by the provider this morning. But an incomplete git clone of the cookiecutter-templates seem to generate an edge case where cookieplone gets stuck and the traceback reported by git back to cookieplone's CallProcess is not necessarily correct.

Also in hindsight I forgot to closer check the ~/.cookiecutters/cookieplone-templates/ . with an empty directory git clone just works. With a fully cloned directory you see the "fatal: destination path" error. But my halfway cloned copy triggered a network traceback? :-O

@fredvd fredvd changed the title cookieplone startup hangs with no output/template selection: git clone of cookietemplate fails but with wrong error output cookieplone startup hangs with no output/template selection: git clone of cookieplone-templates fails but with different error output Aug 14, 2024
@davisagli
Copy link
Member

I suspect this is something that needs to be fixed in cookiecutter rather than cookieplone.

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

3 participants