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

12.17.0 new appdata folder can't be configured #27239

Open
1 of 6 tasks
CSchulz opened this issue Jul 7, 2023 · 10 comments
Open
1 of 6 tasks

12.17.0 new appdata folder can't be configured #27239

CSchulz opened this issue Jul 7, 2023 · 10 comments
Labels
type: enhancement Requested enhancement of existing feature type: feature New feature that does not currently exist

Comments

@CSchulz
Copy link

CSchulz commented Jul 7, 2023

Description

When I start Cypress@12.17.0, I expected existing folders are reused but another unknown folder is used instead.

URL of Issue(s)

None

Steps to replicate

  1. Start Cypress@12.17.0 with an user having a different user path and deny write access on the default profile folder .config.

Browser

No response

Device

  • PC
  • Mac
  • iPhone
  • iPad
  • Android Phone
  • Android Tablet

Additional Information

The home folder of our jenkins user is /var/lib/jenkins, but for any reason Cypress@12.17.0 tries to use /home/jenkins/.

The configuration page doesn't state any property to configure this folder.

07.07.2023 10:30:42  2023-07-07T08:30:41.077Z cypress:server:cypress from argv [ '/var/lib/jenkins/.cache/cypress/12.17.0/Cypress/Cypress', '--no-sandbox', '--smoke-test', '--ping=329' ] got options { _: [ '/var/lib/jenkins/.cache/cypress/12.17.0/Cypress/Cypress' ], sandbox: false, smokeTest: true, ping: 329, invokedFromCli: false, cwd: '/var/lib/jenkins/Cypress-Runner@4', config: {}, pong: 329 }
07.07.2023 10:30:42  2023-07-07T08:30:41.212Z cypress:server:appdata path: /home/jenkins/.config/Cypress/cy/production
07.07.2023 10:30:42  [4003337:0707/103041.239804:WARNING:sandbox_linux.cc(380)] InitializeSandbox() called with multiple threads in process gpu-process.
07.07.2023 10:30:42  
07.07.2023 10:30:42  DevTools listening on ws://127.0.0.1:35447/devtools/browser/c4bd6bc4-931c-432d-97b0-23ea93bdf40e
07.07.2023 10:30:42  [4003182:0707/103041.240888:ERROR:devtools_http_handler.cc(293)] Error writing DevTools active port to file
07.07.2023 10:30:42  [4003337:0707/103041.243644:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
07.07.2023 10:30:42  [4003182:0707/103041.246439:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable.
07.07.2023 10:30:42  2023-07-07T08:30:41.349Z cypress:server:appdata path: /home/jenkins/.config/Cypress/cy/production
07.07.2023 10:30:42  [OperationalError: ENOTDIR: not a directory, mkdir '/home/jenkins/.config/Cypress/cy/production'] {
07.07.2023 10:30:42    cause: [Error: ENOTDIR: not a directory, mkdir '/home/jenkins/.config/Cypress/cy/production'] {
@MikeMcC399
Copy link
Contributor

@CSchulz

You can change the cache location. See https://docs.cypress.io/guides/references/advanced-installation#Binary-cache.

Which operating system are you using?

If this is a Linux operating system, the default is ~/.cache/Cypress and it can be changed using CYPRESS_CACHE_FOLDER.

This issue list is actually for documentation issues only.

You might like to connect also to the Cypress technical community on Discord

Discord chat

@elylucas elylucas transferred this issue from cypress-io/cypress-documentation Jul 7, 2023
@elylucas
Copy link
Contributor

elylucas commented Jul 7, 2023

Moving to the Cypress repo as this doesn't appear to be an issue with the docs

@CSchulz
Copy link
Author

CSchulz commented Jul 10, 2023

This doesn't work for the appdata folder. We are already using export CYPRESS_CACHE_FOLDER="/var/lib/jenkins/.cache/cypress"

@MikeMcC399
Copy link
Contributor

@CSchulz

Can you please let us know which operating system you are using?

@CSchulz
Copy link
Author

CSchulz commented Jul 10, 2023

Platform: linux-x64 (Red Hat Linux - 8.8)
Cypress Version: 12.17.0

@MikeMcC399
Copy link
Contributor

@CSchulz

Thanks for your OS (Red Hat Linux - 8.8)! I confirmed that I can reproduce on Ubuntu 22.04.

The App Data is stored in
~/.config/Cypress/cy/production

which is not influenced by the environment variable CYPRESS_CACHE_FOLDER="/var/lib/jenkins/.cache/cypress".

Only the cache data is stored in
/var/lib/jenkins/.cache/cypress

Sorry for my previous misleading comments!

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Jul 10, 2023

@CSchulz

The home folder of our jenkins user is /var/lib/jenkins, but for any reason Cypress@12.17.0 tries to use /home/jenkins/.

Cypress will use ~ to find the home folder.

What does

echo ~

show? Is it /var/lib/jenkins or /home/jenkins?

@MikeMcC399
Copy link
Contributor

On Ubuntu with
export HOME='/var/lib/jenkins'

npx cypress info shows

Application Data: /var/lib/jenkins/.config/cypress/cy/development
Browser Profiles: /var/lib/jenkins/.config/cypress/cy/development/browsers
Binary Caches: /var/lib/jenkins/.cache/Cypress

Cypress Version: 12.17.0 (stable)
System Platform: linux (Ubuntu - 22.04)

@CSchulz
Copy link
Author

CSchulz commented Jul 11, 2023

Yes I can confim the paths are based on the HOME variable.

I would like to suggest that there should be also an environment variable to override this behavior because it could be possible that the app data folder gets too big or similar issues.

@lmiller1990
Copy link
Contributor

lmiller1990 commented Jul 12, 2023

This sounds like a reasonable feature request. I'll label it as such. I am not sure if this is something that is configurable on every OS, though.

Would you be interested in making a PR by any chance?

@lmiller1990 lmiller1990 added type: enhancement Requested enhancement of existing feature type: feature New feature that does not currently exist labels Jul 12, 2023
@lmiller1990 lmiller1990 removed their assignment Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Requested enhancement of existing feature type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

5 participants