Weird File copying bug appeared with Asset Injector

Created on 15 October 2020, about 4 years ago
Updated 25 April 2024, 7 months ago

Problem/Motivation

I've been using AI now for several months and it's been helpful. (Thx!)

When I just ran composer, things started breaking and I started seeing this error. If anyone has any suggestions, please send them along.


Drupal\Core\File\Exception\DirectoryNotReadyException: The specified file 'temporary://fileXRbhvZ' could not be copied because the destination directory is not properly configured. This may be caused by a problem with file or directory permissions. in Drupal\Core\File\FileSystem->prepareDestination() (line 488 of core/lib/Drupal/Core/File/FileSystem.php).
Drupal\Core\File\FileSystem->move() (Line: 525)
Drupal\Core\File\FileSystem->saveData() (Line: 59)
Drupal\asset_injector\AssetFileStorage->createFile() (Line: 98)
Drupal\asset_injector\Entity\AssetInjectorBase->internalFileUri() (Line: 109)
Drupal\asset_injector\Entity\AssetInjectorBase->filePathRelativeToDrupalRoot() (Line: 105)
Drupal\asset_injector\Entity\AssetInjectorJs->libraryInfo() (Line: 86)
asset_injector_library_info_build()
call_user_func_array() (Line: 392)
Drupal\Core\Extension\ModuleHandler->invoke() (Line: 359)
Drupal\Core\Asset\LibraryDiscoveryParser->parseLibraryInfo() (Line: 115)
Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension() (Line: 87)
Drupal\Core\Asset\LibraryDiscoveryCollector->getLibraryDefinitions() (Line: 66)
Drupal\Core\Asset\LibraryDiscoveryCollector->resolveCacheMiss() (Line: 149)
Drupal\Core\Cache\CacheCollector->get() (Line: 44)
Drupal\Core\Asset\LibraryDiscovery->getLibrariesByExtension() (Line: 58)
Drupal\Core\Asset\LibraryDiscovery->getLibraryByName() (Line: 54)
Drupal\Core\Asset\LibraryDependencyResolver->doGetDependencies() (Line: 31)
Drupal\Core\Asset\LibraryDependencyResolver->getLibrariesWithDependencies() (Line: 104)
Drupal\Core\Asset\AssetResolver->getLibrariesToLoad() (Line: 116)
Drupal\Core\Asset\AssetResolver->getCssAssets() (Line: 315)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAssetLibraries() (Line: 161)
Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments() (Line: 94)
Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor->processAttachments() (Line: 45)
Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 191)
Symfony\Component\HttpKernel\HttpKernel->filterResponse() (Line: 130)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 57)
Drupal\Core\StackMiddleware\Session->handle() (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 708)
Drupal\Core\DrupalKernel->handle() (Line: 19)
πŸ› Bug report
Status

Fixed

Version

2.7

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bogdog400

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡―πŸ‡΅Japan ilfelice

    Howdy,

    I have a similar problem where 'drush updb' throws the following error message:

     [error]  /public://asset_injector/ should have write access.
     (Currently using Asset Injector Directory not writable

    I have verified that the 'asset_injector' directory is in fact writable.

    I have moved the public files directory using "$settings['file_public_path']" in settings.php.

    I have also configured the assets directory using "$settings['file_assets_path']" in settings.php[1], but this module does not seem to respect this setting.

    I wonder if these directory related configurations in settings.php have anything to do with this error message being displayed.

    Sharing just in case somebody else is in the same situation.

    [1] https://www.drupal.org/node/3328126 β†’

Production build 0.71.5 2024