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

Error during 3.X installation #760

Closed
wasdammak opened this issue Dec 27, 2023 · 28 comments
Closed

Error during 3.X installation #760

wasdammak opened this issue Dec 27, 2023 · 28 comments
Labels

Comments

@wasdammak
Copy link

[27-Dec-2023 12:34:03 UTC] Drupal\Core\Entity\Sql\SqlContentEntityStorageException: Column information not available for the 'location' field. in C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Entity\Sql\DefaultTableMapping.php on line 440 #0 C:\wamp64\www\farmos\web\modules\contrib\entity\src\EntityViewsData.php(389): Drupal\Core\Entity\Sql\DefaultTableMapping->getFieldColumnName(Object(Drupal\Core\Field\BaseFieldDefinition), 'target_id')
#1 C:\wamp64\www\farmos\web\modules\core\entity\modules\views\src\EntityViewsDataTaxonomyFilterTrait.php(17): Drupal\entity\EntityViewsData->addReverseRelationships(Array, Array)
#2 C:\wamp64\www\farmos\web\modules\contrib\entity\src\EntityViewsData.php(59): Drupal\farm_entity_views\FarmEntityViewsData->addReverseRelationships(Array, Array)
#3 C:\wamp64\www\farmos\web\core\modules\views\views.views.inc(180): Drupal\entity\EntityViewsData->getViewsData()
#4 C:\wamp64\www\farmos\web\core\modules\views\src\ViewsData.php(228): views_views_data()
#5 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Extension\ModuleHandler.php(388): Drupal\views\ViewsData->Drupal\views{closure}(Object(Closure), 'views')
#6 C:\wamp64\www\farmos\web\core\modules\views\src\ViewsData.php(227): Drupal\Core\Extension\ModuleHandler->invokeAllWith('views_data', Object(Closure))
#7 C:\wamp64\www\farmos\web\core\modules\views\src\ViewsData.php(151): Drupal\views\ViewsData->getData()
#8 C:\wamp64\www\farmos\web\core\modules\views\src\Entity\View.php(455): Drupal\views\ViewsData->get('asset_field_dat...')
#9 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Config\ConfigInstaller.php(388): Drupal\views\Entity\View->isInstallable()
#10 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Config\ConfigInstaller.php(260): Drupal\Core\Config\ConfigInstaller->createConfiguration('', Array)
#11 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Config\ConfigInstaller.php(164): Drupal\Core\Config\ConfigInstaller->installOptionalConfig(Object(Drupal\Core\Config\FileStorage), '')
#12 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\ProxyClass\Config\ConfigInstaller.php(75): Drupal\Core\Config\ConfigInstaller->installDefaultConfig('module', 'farm_entity_vie...')
#13 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\Extension\ModuleInstaller.php(334): Drupal\Core\ProxyClass\Config\ConfigInstaller->installDefaultConfig('module', 'farm_entity_vie...')
#14 C:\wamp64\www\farmos\web\core\lib\Drupal\Core\ProxyClass\Extension\ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array, true)
#15 C:\wamp64\www\farmos\web\farm.install(145): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array, true)
#16 C:\wamp64\www\farmos\web\core\includes\batch.inc(296): _farm_install_module_batch('farm_ui', 'farmOS UI', Array)
#17 C:\wamp64\www\farmos\web\core\includes\batch.inc(138): _batch_process()
#18 C:\wamp64\www\farmos\web\core\includes\batch.inc(94): _batch_do()
#19 C:\wamp64\www\farmos\web\core\includes\install.core.inc(673): _batch_page(Object(Symfony\Component\HttpFoundation\Request))
#20 C:\wamp64\www\farmos\web\core\includes\install.core.inc(578): install_run_task(Array, Array)
#21 C:\wamp64\www\farmos\web\core\includes\install.core.inc(121): install_run_tasks(Array, NULL)
#22 C:\wamp64\www\farmos\web\core\install.php(48): install_drupal(Object(Composer\Autoload\ClassLoader))
#23 {main}

@wasdammak wasdammak added the bug label Dec 27, 2023
@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

Hi @wasdammak, can you provide more information about how you installed farmOS? Did you use the official installation guide? Which of the recommended approaches did you use? Docker? Packaged tarball? Composer?

https://farmos.org/hosting/install/

It sounds like you are experiencing this issue: https://www.drupal.org/project/entity/issues/3190436

farmOS patches the Entity module to fix that bug, as well as a number of other patches to Drupal core and contrib modules for other purposes. Depending on how you installed farmOS you may be missing these patches.

I would recommend reviewing the documentation to confirm that you followed the recommended installation steps. If you can describe your setup in more detail we may be able to help figure out what went wrong.

FWIW, I have heard from some in the past who use Windows with Composer that the patch utility needs to be installed in order for patches to be applied. Although I think in those cases Composer failed to install, so I'm curious how you got as far as you did without it.

@wasdammak
Copy link
Author

@mstenta
thank you for your help
I have version 10, this path applies to version 8.x or should it also be applied to version 10??
image

@wasdammak
Copy link
Author

@mstenta
according to the log, it does not find the tagged_id of location
the installation is blocked from the start :'(

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

I have version 10, this path applies to version 8.x or should it also be applied to version 10??

Do you mean version 10 of Drupal?

Can you describe how you are installing farmOS? If you are following the official instructions then you will not need to apply any patches yourself. farmOS comes pre-packaged with all the necessary code and patches. All you need to do is run the Docker container or download the packaged release tarball (or for advanced users who want to manage all their own dependencies with Composer see https://farmos.org/hosting/composer/) - these include everything you need.

@wasdammak
Copy link
Author

wasdammak commented Dec 27, 2023

@mstenta
there are errors already in the documentation

PS C:\wamp64\www\farm> composer create-project farmos/project
Creating a "farmos/project" project at "./project"

In CreateProjectCommand.php line 424:

Could not find package farmos/project with stability stable.

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [ [ []]]

PS C:\wamp64\www\farm> composer create-project farmos/farmos
Creating a "farmos/farmos" project at "./farmos"
Installing farmos/farmos (2.2.2)

  • Downloading farmos/farmos (2.2.2)
  • Installing farmos/farmos (2.2.2): Extracting archive
    Created project in C:\wamp64\www\farm\farmos
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/admin_toolbar, it could not be found in any version, there may be a typo in the package name.
Problem 2
- Root composer.json requires drupal/config_update, it could not be found in any version, there may be a typo in the package name.
Problem 3
- Root composer.json requires drupal/consumers, it could not be found in any version, there may be a typo in the package name.
Problem 4
- Root composer.json requires drupal/csv_serialization, it could not be found in any version, there may be a typo in the package name.
Problem 5
- Root composer.json requires drupal/date_popup, it could not be found in any version, there may be a typo in the package name.
Problem 6
- Root composer.json requires drupal/entity, it could not be found in any version, there may be a typo in the package name.
Problem 7
- Root composer.json requires drupal/entity_browser, it could not be found in any version, there may be a typo in the package name.
Problem 8
- Root composer.json requires drupal/entity_reference_integrity, it could not be found in any version, there may be a typo in the package name.
Problem 9
- Root composer.json requires drupal/entity_reference_revisions, it could not be found in any version, there may be a typo in the package name.
Problem 10
- Root composer.json requires drupal/entity_reference_validators, it could not be found in any version, there may be a typo in the package name.
Problem 11
- Root composer.json requires drupal/exif_orientation, it could not be found in any version, there may be a typo in the package name.
Problem 12
- Root composer.json requires drupal/fraction, it could not be found in any version, there may be a typo in the package name.
Problem 13
- Root composer.json requires drupal/geofield, it could not be found in any version, there may be a typo in the package name.
Problem 14
- Root composer.json requires drupal/gin, it could not be found in any version, there may be a typo in the package name.
Problem 15
- Root composer.json requires drupal/inline_entity_form, it could not be found in any version, there may be a typo in the package name.
Problem 16
- Root composer.json requires drupal/inspire_tree, it could not be found in any version, there may be a typo in the package name.
Problem 17
- Root composer.json requires drupal/jsonapi_extras, it could not be found in any version, there may be a typo in the package name.
Problem 18
- Root composer.json requires drupal/jsonapi_schema, it could not be found in any version, there may be a typo in the package name.
Problem 19
- Root composer.json requires drupal/log, it could not be found in any version, there may be a typo in the package name.
Problem 20
- Root composer.json requires drupal/migrate_plus, it could not be found in any version, there may be a typo in the package name.
Problem 21
- Root composer.json requires drupal/migrate_source_csv, it could not be found in any version, there may be a typo in the package name.
Problem 22
- Root composer.json requires drupal/migrate_source_ui, it could not be found in any version, there may be a typo in the package name.
Problem 23
- Root composer.json requires drupal/migrate_tools, it could not be found in any version, there may be a typo in the package name.
Problem 24
- Root composer.json requires drupal/role_delegation, it could not be found in any version, there may be a typo in the package name.
Problem 25
- Root composer.json requires drupal/simple_oauth, it could not be found in any version, there may be a typo in the package name.
Problem 26
- Root composer.json requires drupal/state_machine, it could not be found in any version, there may be a typo in the package name.
Problem 27
- Root composer.json requires drupal/subrequests, it could not be found in any version, there may be a typo in the package name.
Problem 28
- Root composer.json requires drupal/token, it could not be found in any version, there may be a typo in the package name.
Problem 29
- Root composer.json requires drupal/views_geojson, it could not be found in any version, there may be a typo in the package name.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
PS C:\wamp64\www\farm>

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

there are errors already in the documentation

Yes that's a known issue with the docs. See farmOS/composer-project#10. We have an open pull request for it (#739), but it hasn't been approved so we may just update the docs as a temporary workaround.

Can I assume that you're trying to use Composer? I'd love to help but I need answers to some of the questions I asked in order to get anywhere. :-)

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

This command should work to install farmOS 3.0.0-beta3 via Composer:

composer create-project farmos/project:3.x-dev

@wasdammak
Copy link
Author

@mstenta
Yes i use the composer
I tried with docker initially but it didn't work! besides I hate this gas bomb ;)

I installed Drupal with composer.
I downloaded the version 3.0 repository from github and copied its suite into the drupal folder I just installed, then added the modules required by farmos with composer.
Then I launched the installation via a browser.
I have the farmos interface but the installation failed when installing the farmos UI, knowing that I unchecked all the default and optional modules.

PS C:\wamp64\www> composer create-project farmos/project:3.x-dev ./formwd
Creating a "farmos/project:3.x-dev" project at "./formwd"
Installing farmos/project (3.x-dev fd3e7f18add9647d671862bb7726e0a713f817b8)

  • Downloading farmos/project (3.x-dev fd3e7f1)
  • Installing farmos/project (3.x-dev fd3e7f1): Extracting archive
    Created project in C:\wamp64\www./formwd
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- farmos/farmos[3.0.0-beta1, ..., 3.0.0-beta3] require drupal/simple_oauth 6.0.0-beta5 -> satisfiable by drupal/simple_oauth[6.0.0-beta5].
- drupal/simple_oauth[6.0.0-beta2, ..., 6.0.x-dev] require steverhoades/oauth2-openid-connect-server ^2.4 -> satisfiable by steverhoades/oauth2-openid-connect-server[v2.4.0, v2.5.0, v2.6.0, v2.6.1].
- steverhoades/oauth2-openid-connect-server v2.4.0 requires lcobucci/jwt 4.1.5 -> satisfiable by lcobucci/jwt[4.1.5].
- steverhoades/oauth2-openid-connect-server[v2.6.0, ..., v2.6.1] require lcobucci/jwt 4.1.5|^4.2|^4.3|^5.0 -> satisfiable by lcobucci/jwt[4.1.5, ..., 4.4.x-dev, 5.0.0, ..., 5.3.x-dev].
- steverhoades/oauth2-openid-connect-server v2.5.0 requires lcobucci/jwt 4.1.5|^4.2 -> satisfiable by lcobucci/jwt[4.1.5, ..., 4.4.x-dev].
- lcobucci/jwt[4.1.5, ..., 4.4.x-dev, 5.0.0, ..., 5.3.x-dev] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- Root composer.json requires farmos/farmos ^3@beta -> satisfiable by farmos/farmos[3.0.0-beta1, 3.0.0-beta2, 3.0.0-beta3].

To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php8.2.14\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-sodium to temporarily ignore these required extensions.
PS C:\wamp64\www>

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

I downloaded the version 3.0 repository from github and copied its suite into the drupal folder I just installed, then added the modules required by farmos with composer.

Ah yes - this would explain why you got the errors you did. This is not the correct way to install farmOS.

farmOS is a "Drupal distribution" which means it comes with Drupal. You don't install it into an existing Drupal codebase like you would a Drupal module (technically it might be possible but it is not recommended, nor do we support that approach, because of the necessary patches, pinned package version, etc). Think of farmOS as a "pre-packaged Drupal-based application".

lcobucci/jwt[4.1.5, ..., 4.4.x-dev, 5.0.0, ..., 5.3.x-dev] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.

It looks like you need to install the PHP sodium extension.

This has some instructions for Windows: https://www.php.net/manual/en/sodium.installation.php

@wasdammak
Copy link
Author

@mstenta
Many thanks!

sodium is installed and enabled, I'm using php 8.2.14
I also struggled for simple_oauth and oauth2-openid-connect-server because not yet available with php 8 in stable versions, or durpal 10 requires php 8, I don't know how development got to this stage of incompatibility with the dependent modules and not yet migrated to the php8 version.

Another remark, why did you not opt for modules/custom to overload the modules and that way updating drupal core would be easier and stable...

Well currently I am stuck in all the solutions proposed, none worked neither docker, nor composer+dursh, nor manually

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

I also struggled for simple_oauth and oauth2-openid-connect-server because not yet available with php 8 in stable versions, or durpal 10 requires php 8, I don't know how development got to this stage of incompatibility with the dependent modules and not yet migrated to the php8 version.

I'm not sure what problem you had - I have not experienced this. We have an automated test and build process that is working fine: https://github.com/farmOS/farmOS/actions

I would bet that it is something specific to your Windows installation. We test against the official Drupal Docker images, which are built on top of the official PHP Docker images.

This is a good reason to use Docker - it ensures that all of your dependencies are in place, so you don't need to manage them locally. Docker makes our jobs as maintainers a whole lot easier by providing a predictable and reproducible environment.

Another remark, why did you not opt for modules/custom to overload the modules and that way updating drupal core would be easier and stable...

Great question! I would be happy to speak in more detail about this decision, but perhaps it would be better suited as a forum topic rather than a GitHub bug report. Feel free to ask this on the forum and I will describe our thought process, the tradeoffs of both approaches, and why we eventually found ourselves where we are with farmOS as a Drupal distribution. :-)

https://farmOS.discourse.group

Well currently I am stuck in all the solutions proposed, none worked neither docker, nor composer+dursh, nor manually

What issue did you run into with Docker?

@wasdammak
Copy link
Author

@mstenta
The application must work on various environments and be possible to install like the majority of applications.
it's more flexible with composer and more efficient.

For the installation documentation, it could be simpler, with 5 or 6 lines of commands without going into details on how to install drupal with composer then tell it that you should not install drupal then farmOS...

I have been trying to install FramOS for 2 days without success, I like to notify this so as not to discourage many other users who wish to stay on windows/apache/mysql for several other reasons.

I thank you again for the work done even if I was not able to test it.

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

For the installation documentation, it could be simpler, with 5 or 6 lines of commands without going into details on how to install drupal with composer then tell it that you should not install drupal then farmOS...

Thank you for the suggestions @wasdammak. We've heard from a handful of people that the Composer documentation (which is relatively new) is not as simple and straightforward as it could be. I agree! I wish more people would offer to help. If you would like to, the documentation is open source. That page is in GitHub here: https://github.com/farmOS/farmOS/blob/3.x/docs/hosting/composer.md

it's more flexible with composer and more efficient.

We use Composer to build the Docker images and packaged tarballs. So I agree! I also know that it works. Here are the logs of the automated GitHub Action that ran last night, where Composer is used to build the farmOS codebase inside the Docker image:

https://github.com/farmOS/farmOS/actions/runs/7336448735/job/19975778597#step:7:727

If you are having specific issues with installing farmOS via Composer in your environment, please provide more details so we can help to figure out what your specific problem is.

I like to notify this so as not to discourage many other users who wish to stay on windows/apache/mysql

Thanks! There are some forum topics from other Windows users who have figured out how to run farmOS. You might find some of them useful. Try searching here: https://farmOS.discourse.group

Since farmOS is based on Drupal, it should work fine on Windows/Apache/MySQL, as long as you have the dependencies you need. Based on the limited information you provided, it sounds like a dependency issue, but it's hard to say for sure.

I thank you again for the work done even if I was not able to test it.

If you would like to test farmOS before figuring out how to host it yourself, there is a button to "Demo farmOS" in the top-right of farmOS.org. This might be worth doing first to see if farmOS will be useful to you or not, before you invest time in learning how to host it.

The application must work on various environments and be possible to install like the majority of applications.

As a maintainer of this open source project, I wish I could understand better where expectations like this come from. farmOS is not maintained by a company or any single organization. We are individuals who volunteer our time on the project, or are sponsored by other groups/organizations to work on specific features. Progress does not happen magically. If you find it to be useful and would like to contribute, we would love to have you as part of the community! All help is welcome! And there is always more to do than we have time/resources for.

That said, we have a solution to the problem of "working on various environments": Docker images! I know people who are running farmOS in Docker on Windows, Mac, and Linux. Docker images solve all the problems of dependency management in a simple and elegant way that removes all of these problems from maintainers. I understand that Docker isn't always an option, though, which is why we also provide a packaged tarball (which we build with Composer for you), or manual Composer-based installation methods for users who want more control. With more control comes more responsibility, though. It's up to you to resolve dependency issues.

I hope that all makes sense. I don't mean to come off as dismissive, and I apologize if any of my comments did. It's holiday vacation here so I'm with family, but hopefully I've been able to help get through some of the hurdles you've experienced.

@paul121
Copy link
Member

paul121 commented Dec 27, 2023

@wasdammak you could also try using DDEV: https://farmos.org/blog/2023/installing-farmos-on-ddev-with-composer/

It is still a Docker and Composer based workflow, but with various helpers that have helped others who had various depdency/environment issues on Windows in particular.

@wasdammak
Copy link
Author

Just to inform you, after many attempts and research, currently it is impossible to install farmOS with composer on windows. :'(
FarmOS must also update its dependencies to new versions that are compatible with PHP 8 such as simple_oauth, oauth2-server, oauth2-openid-connect-server, lcobucci/jwt,...

a list of requires that the majority are compatible with php 8 but there are conflicts with some current farmOS requires

"oomphinc/composer-installers-extender": "^2.0", "wikimedia/composer-merge-plugin": "^2.0", "ext-simplexml": "*", "chi-teck/drupal-code-generator": "2.4.0", "composer/installers": "^2.0", "cweagans/composer-patches": "^1.7", "drupal/admin_toolbar": "^3.4", "drupal/consumers": "^1.17", "drupal/core": "^9 || ^10", "drupal/core-composer-scaffold": "^10.1", "drupal/config_update": "^2.0@alpha", "drupal/core-project-message": "^10.1", "drupal/core-recommended": "^10.1", "drupal/csv_serialization": "^3.0@beta", "drupal/date_popup": "1.3.0", "drupal/entity": "1.4", "drupal/entity_browser": "2.9", "drupal/entity_reference_integrity": "^1.2", "drupal/entity_reference_revisions": "1.10", "drupal/entity_reference_validators": "dev-1.x", "drupal/exif_orientation": "1.2", "drupal/fraction": "2.3.1", "drupal/geofield": "1.40", "drupal/gin": "^3.0@rc", "drupal/inline_entity_form": "1.x-dev@dev", "drupal/inspire_tree": "^1.0", "drupal/jsonapi_extras": "3.22", "drupal/jsonapi_schema": "1.0-rc1", "drupal/log": "2.2", "drupal/migrate_plus": "6.0", "drupal/migrate_source_csv": "3.5", "drupal/migrate_source_ui": "1.0", "drupal/migrate_tools": "6.0.2", "drupal/role_delegation": "^1.2", "drupal/simple_oauth": "6.0.0-beta5", "drupal/simple_oauth_password_grant": "^1.0@RC", "drupal/state_machine": "1.8.0", "drupal/subrequests": "3.0.6", "drupal/token": "^1.11", "drupal/views_geojson": "1.2", "drush/drush": "11.3.0", "itamair/geophp": "^1.3", "lcobucci/jwt":"^5.0", "league/oauth2-server": "8.5.4", "steverhoades/oauth2-openid-connect-server": "2.6.0"

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

after many attempts and research, currently it is impossible to install farmOS with composer on windows. :'(

Thanks for sticking with it @wasdammak! Let's figure out what's going wrong... if there is a bug with Windows installs specifically we should fix it.

Can you paste your full composer.json file and your full terminal output logs with the commands you ran so we can see the error message(s)? The more details you can provide the easier it will be for us to find the problem.

FarmOS must also update its dependencies to new versions that are compatible with PHP 8

Unfortunately I don't think that is the problem. farmOS 2.x added support for PHP 8 in October/November when PHP 7.4 was end of life. The farmOS 3.x Docker images are built on PHP 8.2 and all tests are passing, which includes installing farmOS via Composer.

So something else must be going on... your full terminal logs will help.

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

For reference, here is a screenshot of /admin/reports/status on a running farmOS instance version 3.0.0-beta3:

Screenshot from 2023-12-27 17-31-53

@wasdammak
Copy link
Author

composer.json

PS C:\wamp64\www\farmwd> composer install --ignore-platform-req=ext-sodium
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires drupal/simple_oauth 6.0.0-beta5 -> satisfiable by drupal/simple_oauth[6.0.0-beta5].
- drupal/simple_oauth 6.0.0-beta5 requires lcobucci/jwt ^4 -> found lcobucci/jwt[4.0.0-alpha1, ..., 4.4.x-dev] but it conflicts with your root composer.json require (^5.0).
Problem 2
- drupal/simple_oauth_password_grant[1.0.0-rc1, ..., 1.0.0-rc2] require drupal/simple_oauth ^6 -> satisfiable by drupal/simple_oauth[6.0.0-beta5].
- drupal/simple_oauth 6.0.0-beta5 requires lcobucci/jwt ^4 -> found lcobucci/jwt[4.0.0-alpha1, ..., 4.4.x-dev] but it conflicts with your root composer.json require (^5.0).
- Root composer.json requires drupal/simple_oauth_password_grant ^1.0@RC -> satisfiable by drupal/simple_oauth_password_grant[1.0.0-rc1, 1.0.0-rc2].

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

@wasdammak Try this: delete your composer.json and all files in the same directory (start fresh!)

Run composer create-project farmos/project:3.x-dev.

This will download the composer.json from https://github.com/farmOS/composer-project and install it.

Please tell us what happens, including the full terminal log.

@mstenta
Copy link
Member

mstenta commented Dec 27, 2023

composer install --ignore-platform-req=ext-sodium

And please install ext-sodium first per the instructions here: https://www.php.net/manual/en/sodium.installation.php

Using --ignore-platform-req is not recommended.

@wasdammak
Copy link
Author

wasdammak commented Dec 28, 2023

PS C:\wamp64\www> composer create-project farmos/project:3.x-dev .\farmoswd
Creating a "farmos/project:3.x-dev" project at "./farmoswd"
Installing farmos/project (3.x-dev fd3e7f18add9647d671862bb7726e0a713f817b8)

  • Installing farmos/project (3.x-dev fd3e7f1): Extracting archive
    Created project in C:\wamp64\www.\farmoswd
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.

Problem 1
- farmos/farmos[3.0.0-beta1, ..., 3.0.0-beta3] require drupal/simple_oauth 6.0.0-beta5 -> satisfiable by drupal/simple_oauth[6.0.0-beta5].
- drupal/simple_oauth[6.0.0-beta2, ..., 6.0.x-dev] require steverhoades/oauth2-openid-connect-server ^2.4 -> satisfiable by steverhoades/oauth2-openid-connect-server[v2.4.0, v2.5.0, v2.6.0, v2.6.1].
- steverhoades/oauth2-openid-connect-server v2.4.0 requires lcobucci/jwt 4.1.5 -> satisfiable by lcobucci/jwt[4.1.5].
- steverhoades/oauth2-openid-connect-server[v2.6.0, ..., v2.6.1] require lcobucci/jwt 4.1.5|^4.2|^4.3|^5.0 -> satisfiable by lcobucci/jwt[4.1.5, ..., 4.4.x-dev, 5.0.0, ..., 5.3.x-dev].
- steverhoades/oauth2-openid-connect-server v2.5.0 requires lcobucci/jwt 4.1.5|^4.2 -> satisfiable by lcobucci/jwt[4.1.5, ..., 4.4.x-dev].
- lcobucci/jwt[4.1.5, ..., 4.4.x-dev, 5.0.0, ..., 5.3.x-dev] require ext-sodium * -> it is missing from your system. Install or enable PHP's sodium extension.
- Root composer.json requires farmos/farmos ^3@beta -> satisfiable by farmos/farmos[3.0.0-beta1, 3.0.0-beta2, 3.0.0-beta3].

To enable extensions, verify that they are enabled in your .ini files:
- C:\wamp64\bin\php\php8.2.14\php.ini
You can also run php --ini in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with --ignore-platform-req=ext-sodium to temporarily ignore these required extensions.
PS C:\wamp64\www>

image

@mstenta
Copy link
Member

mstenta commented Dec 28, 2023

@wasdammak What if you try the steps in the second part of this answer? https://stackoverflow.com/a/62348348

  1. Run the cmd php --ini in terminal, and note the php.ini file path like C:\wamp64\bin\php\php8.1.16\php.ini
  2. Locate and open php.ini file
  3. Find and uncomment extension=sodium
  4. Save the file and restart WAMP.

@wasdammak
Copy link
Author

wasdammak commented Dec 29, 2023

@mstenta
sodium is ok

@wasdammak
Copy link
Author

wasdammak commented Dec 29, 2023

@mstenta

In PluginManager.php(277) : eval()'d code line 331:

Cannot apply patch Issue #2429699: Add Views EntityReference filter to be available for all entity reference fields
. (https://www.drupal.org/files/issues/2021-12-02/2429699-453-9.3.x.patch)!

create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--add-repository] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--ask] [--] [ [ []]]

like issue farmOS/composer-project#11

@wasdammak
Copy link
Author

PS C:\wamp64\www\farmwd> composer update
Removing package drupal/core so that it can be re-installed and re-patched.

  • Removing drupal/core (10.1.6)
    Removing package drupal/entity so that it can be re-installed and re-patched.
  • Removing drupal/entity (1.4.0)
    Removing package drupal/entity_browser so that it can be re-installed and re-patched.
  • Removing drupal/entity_browser (2.9.0)
    Removing package drupal/entity_reference_revisions so that it can be re-installed and re-patched.
  • Removing drupal/entity_reference_revisions (1.10.0)
    Removing package drupal/jsonapi_schema so that it can be re-installed and re-patched.
  • Removing drupal/jsonapi_schema (1.0.0-rc1)
    Removing package drupal/simple_oauth so that it can be re-installed and re-patched.
  • Removing drupal/simple_oauth (6.0.0-beta5)
    Removing package itamair/geophp so that it can be re-installed and re-patched.
  • Removing itamair/geophp (1.3)
    Deleting C:\wamp64\www\farmwd/web/modules/jsonapi_schema - deleted
    Deleting C:\wamp64\www\farmwd/web/modules/entity_reference_revisions - deleted
    Deleting C:\wamp64\www\farmwd/web/modules/entity - deleted
    Deleting C:\wamp64\www\farmwd/web/modules/simple_oauth - deleted
    Deleting C:\wamp64\www\farmwd/web/modules/entity_browser - deleted
    Deleting C:\wamp64\www\farmwd/web/core - deleted
    Loading composer repositories with package information
    Updating dependencies
    Nothing to modify in lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 7 installs, 0 updates, 0 removals
    No patches supplied.
    Gathering patches for dependencies. This might take a minute.
  • Installing drupal/core (10.1.6): Extracting archive
  • Installing itamair/geophp (1.3): Extracting archive
  • Installing drupal/simple_oauth (6.0.0-beta5): Extracting archive
  • Installing drupal/entity (1.4.0): Extracting archive
  • Installing drupal/jsonapi_schema (1.0.0-rc1): Extracting archive
  • Installing drupal/entity_reference_revisions (1.10.0): Extracting archive
  • Installing drupal/entity_browser (2.9.0): Extracting archive
  • Applying patches for drupal/core
    https://www.drupal.org/files/issues/2021-12-02/2429699-453-9.3.x.patch (Issue #2429699: Add Views EntityReference filter to be available for all entity reference fields.)
    Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2021-12-02/2429699-453-9.3.x.patch

In Patches.php line 331:

Cannot apply patch Issue #2429699: Add Views EntityReference filter to be available for all entity reference fields
. (https://www.drupal.org/files/issues/2021-12-02/2429699-453-9.3.x.patch)!

update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [...]

PS C:\wamp64\www\farmwd>

@mstenta
Copy link
Member

mstenta commented Dec 29, 2023

I bet you don't have the patch utility installed, like I said in one of my first comments. The patch command is required to use https://github.com/cweagans/composer-patches, which we use to apply patches to Drupal core and modules.

This has happened to others on Windows in the past, and they've figured out how to install patch and make it work.

Also: do not run composer update. We are trying to get composer create-project farmos/farmos:3.x-dev to work... that is all you need to run. If that fails, then it means some dependency was not met.

@mstenta
Copy link
Member

mstenta commented Dec 29, 2023

I am not familiar with Windows (or the various ways to run Linux commands on it), but there appear to be numerous closed issues in the cweagans/composer-patches issue queue that show people figuring out how to do it in various ways, depending on your setup: https://github.com/cweagans/composer-patches/issues?q=is%3Aissue+windows+is%3Aclosed

@mstenta
Copy link
Member

mstenta commented Mar 28, 2024

Hopefully you were able to figure out your issues @wasdammak. I'm going to close this because it hasn't been determined that there is a bug. If you need more support please start a topic on the forum, and if we identify that there is a bug we will open a bug report with specific details and a plan to fix the bug specifically.

Forum: https://farmOS.discourse.group

@mstenta mstenta closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants