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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

'conflicting chdir during another chdir block' calling vite_asset_path #428

Open
1 of 2 tasks
JasonBarnabe opened this issue Jan 15, 2024 · 0 comments
Open
1 of 2 tasks
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified

Comments

@JasonBarnabe
Copy link
Contributor

  • I have tried upgrading by running bundle update vite_ruby.
  • I have read the troubleshooting section before opening an issue.

Description 馃摉

I have a page with a number of iframes loading PDF previews. When loading, some of them fail with:

RuntimeError: conflicting chdir during another chdir block (RuntimeError)
  from vite_ruby (3.3.4) lib/vite_ruby/config.rb:84:in `chdir'
  from vite_ruby (3.3.4) lib/vite_ruby/config.rb:84:in `within_root'
  from vite_ruby (3.3.4) lib/vite_ruby/builder.rb:57:in `watched_files_digest'
  from vite_ruby (3.3.4) lib/vite_ruby/builder.rb:32:in `last_build_metadata'
  from vite_ruby (3.3.4) lib/vite_ruby/manifest.rb:217:in `missing_entry_error'
  from vite_ruby (3.3.4) lib/vite_ruby/manifest.rb:79:in `lookup!'
  from vite_ruby (3.3.4) lib/vite_ruby/manifest.rb:22:in `path_for'
  from vite_rails (3.0.17) lib/vite_rails/tag_helpers.rb:26:in `vite_asset_path'

When loading them individually, they work. This seems like a thread safety issue, as chdir is not thread-safe.

Vite Ruby Info
bin/vite present?: true
vite_ruby: 3.3.4
vite_rails: 3.0.17
rails: 7.0.8
node: v20.11.0
npm: 10.2.4
yarn: 1.22.5
pnpm: 7.14.2
ruby: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-linux]
@JasonBarnabe JasonBarnabe added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Something doesn't seem to be working, but hasn't been verified
Projects
None yet
Development

No branches or pull requests

1 participant