[Support Request]: Unable to update to latest version #2587

Closed
opened 2026-02-05 04:34:13 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @plummerr on GitHub (Jan 20, 2022).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Hello,
I am running Bookstack 21.04.3 on Ubuntu 18.04.6 LTS, all patches up to date.
PHP ver. 8.0.14
When I run git pull origin release && composer install --no-dev && php artisan migrate, I get the following:
remote: Enumerating objects: 1074, done.
remote: Counting objects: 100% (979/979), done.
remote: Compressing objects: 100% (431/431), done.
remote: Total 1074 (delta 632), reused 769 (delta 545), pack-reused 95
Receiving objects: 100% (1074/1074), 1.13 MiB | 10.63 MiB/s, done.
Resolving deltas: 100% (661/661), completed with 117 local objects.
From https://github.com/BookStackApp/BookStack

  • branch release -> FETCH_HEAD
    009212ab..53f3cca8 release -> origin/release
    Updating 2d8698a2..53f3cca8
    error: Your local changes to the following files would be overwritten by merge:
    .env.example
    .env.example.complete
    .github/ISSUE_TEMPLATE/api_request.md
    .github/ISSUE_TEMPLATE/bug_report.md
    .github/ISSUE_TEMPLATE/feature_request.md
    .github/ISSUE_TEMPLATE/language_request.md
    .github/translators.txt
    .github/workflows/phpunit.yml
    .github/workflows/test-migrations.yml
    .gitignore
    LICENSE
    app/Actions/Activity.php
    app/Actions/ActivityService.php
    app/Actions/ActivityType.php
    app/Actions/Comment.php
    app/Actions/CommentRepo.php
    app/Actions/Tag.php
    app/Actions/TagRepo.php
    app/Actions/View.php
    app/Actions/ViewService.php
    app/Api/ApiDocsGenerator.php
    app/Api/ApiToken.php
    app/Api/ApiTokenGuard.php
    app/Api/ListingResponseBuilder.php
    app/Application.php
    app/Auth/Access/EmailConfirmationService.php
    app/Auth/Access/ExternalAuthService.php
    app/Auth/Access/ExternalBaseUserProvider.php
    app/Auth/Access/Guards/ExternalBaseSessionGuard.php
    app/Auth/Access/Guards/LdapSessionGuard.php
    app/Auth/Access/Guards/Saml2SessionGuard.php
    app/Auth/Access/Ldap.php
    app/Auth/Access/LdapService.php
    app/Auth/Access/RegistrationService.php
    app/Auth/Access/Saml2Service.php
    app/Auth/Access/SocialAuthService.php
    app/Auth/Access/UserInviteService.php
    app/Auth/Access/UserTokenService.php
    app/Auth/Permissions/EntityPermission.php
    app/Auth/Permissions/JointPermission.php
    app/Auth/Permissions/PermissionService.php
    app/Auth/Permissions/PermissionsRepo.php
    app/Auth/Permissions/RolePermission.php
    app/Auth/Role.php
    app/Auth/SocialAccount.php
    app/Auth/User.php
    app/Auth/UserRepo.php
    app/Config/api.php
    app/Config/auth.php
    app/Config/broadcasting.php
    app/Config/cache.php
    app/Config/database.php
    app/Config/debugbar.php
    app/Config/dompdf.php
    app/Config/filesystems.php
    app/Config/hashing.php
    app/Config/logging.php
    app/Config/mail.php
    app/Config/queue.php
    app/Config/saml2.php
    app/Config/services.php
    app/Config/session.php
    app/Config/setting-defaults.php
    app/Config/snappy.php
    app/Console/Commands/CleanupImages.php
    app/Console/Commands/ClearViews.php
    app/Console/Commands/CopyShelfPermissions.php
    app/Console/Commands/CreateAdmin.php
    app/Console/Commands/DeleteUsers.php
    app/Console/Commands/RegenerateSearch.php
    app/Console/Commands/UpdateUrl.php
    app/Console/Commands/UpgradeDatabaseEncoding.php
    app/Console/Kernel.php
    app/Entities/BreadcrumbsViewComposer.php
    app/Entities/EntityProvider.php
    app/Entities/Models/Book.php
    app/Entities/Models/BookChild.php
    app/Entities/Models/Bookshelf.php
    app/Entities/Models/Chapter.php
    app/Entities/Models/Deletion.php
    app/Entities/Models/Entity.php
    app/Entities/Models/HasCoverImage.php
    app/Entities/Models/Page.php
    app/Entities/Models/PageRevision.php
    app/Entities/Models/SearchTerm.php
    app/Entities/Repos/BaseRepo.php
    app/Entities/Repos/BookRepo.php
    app/Entities/Repos/BookshelfRepo.php
    app/Entities/Repos/ChapterRepo.php
    app/Entities/Repos/PageRepo.php
    app/Entities/Tools/BookContents.php
    app/Entities/Tools/ExportFormatter.php
    app/Entities/Tools/Markdown/CustomStrikeThroughExtension.php
    app/Entities/Tools/Markdown/CustomStrikethroughRenderer.php
    app/Entities/Tools/PageContent.php
    app/Entities/Tools/PageEditActivity.php
    app/Entities/Tools/PermissionsUpdater.php
    app/Entities/Tools/SearchIndex.php
    app/Entities/Tools/SearchOptions.php
    app/Entities/Tools/SearchRunner.php
    app/Entities/Tools/ShelfContext.php
    app/Entities/Tools/SiblingFetcher.php
    app/Entities/Tools/SlugGenerator.php
    app/Entities/Tools/TrashCan.php
    app/Exceptions/ApiAuthException.php
    app/Exceptions/ConfirmationEmailException.php
    app/Exceptions/FileUploadException.php
    app/Exceptions/Handler.php
    app/Exceptions/HttpFetchException.php
    app/Exceptions/ImageUploadException.php
    app/Exceptions/JsonDebugException.php
    app/Exceptions/LdapException.php
    app/Exceptions/LoginAttemptEmailNeededException.php
    app/Exceptions/LoginAttemptException.php
    app/Exceptions/MoveOperationException.php
    app/Exceptions/NotFoundException.php
    app/Exceptions/NotifyException.php
    app/Exceptions/PermissionsException.php
    app/Except
    Aborting

I had read that this could be resolved by a git reset, which I have tried. After running the reset and trying to update however, I get a wall of red highlighted text, and Bookstack (or Apache) stops and won't start again. I end up having to restore from a snapshot. I also read that this might have something to do with commiting changes prior to updating, but I'm uncertain on how to do that. Any help would be greatly appreciated

Exact BookStack Version

21.04.3

Log Content

No response

PHP Version

8.0.14

Hosting Environment

Ubuntu 18.04.6 LTS, using the installation script.
No proxies
VM machine hosted in VSphere environment

Originally created by @plummerr on GitHub (Jan 20, 2022). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Hello, I am running Bookstack 21.04.3 on Ubuntu 18.04.6 LTS, all patches up to date. PHP ver. 8.0.14 When I run git pull origin release && composer install --no-dev && php artisan migrate, I get the following: remote: Enumerating objects: 1074, done. remote: Counting objects: 100% (979/979), done. remote: Compressing objects: 100% (431/431), done. remote: Total 1074 (delta 632), reused 769 (delta 545), pack-reused 95 Receiving objects: 100% (1074/1074), 1.13 MiB | 10.63 MiB/s, done. Resolving deltas: 100% (661/661), completed with 117 local objects. From https://github.com/BookStackApp/BookStack * branch release -> FETCH_HEAD 009212ab..53f3cca8 release -> origin/release Updating 2d8698a2..53f3cca8 error: Your local changes to the following files would be overwritten by merge: .env.example .env.example.complete .github/ISSUE_TEMPLATE/api_request.md .github/ISSUE_TEMPLATE/bug_report.md .github/ISSUE_TEMPLATE/feature_request.md .github/ISSUE_TEMPLATE/language_request.md .github/translators.txt .github/workflows/phpunit.yml .github/workflows/test-migrations.yml .gitignore LICENSE app/Actions/Activity.php app/Actions/ActivityService.php app/Actions/ActivityType.php app/Actions/Comment.php app/Actions/CommentRepo.php app/Actions/Tag.php app/Actions/TagRepo.php app/Actions/View.php app/Actions/ViewService.php app/Api/ApiDocsGenerator.php app/Api/ApiToken.php app/Api/ApiTokenGuard.php app/Api/ListingResponseBuilder.php app/Application.php app/Auth/Access/EmailConfirmationService.php app/Auth/Access/ExternalAuthService.php app/Auth/Access/ExternalBaseUserProvider.php app/Auth/Access/Guards/ExternalBaseSessionGuard.php app/Auth/Access/Guards/LdapSessionGuard.php app/Auth/Access/Guards/Saml2SessionGuard.php app/Auth/Access/Ldap.php app/Auth/Access/LdapService.php app/Auth/Access/RegistrationService.php app/Auth/Access/Saml2Service.php app/Auth/Access/SocialAuthService.php app/Auth/Access/UserInviteService.php app/Auth/Access/UserTokenService.php app/Auth/Permissions/EntityPermission.php app/Auth/Permissions/JointPermission.php app/Auth/Permissions/PermissionService.php app/Auth/Permissions/PermissionsRepo.php app/Auth/Permissions/RolePermission.php app/Auth/Role.php app/Auth/SocialAccount.php app/Auth/User.php app/Auth/UserRepo.php app/Config/api.php app/Config/auth.php app/Config/broadcasting.php app/Config/cache.php app/Config/database.php app/Config/debugbar.php app/Config/dompdf.php app/Config/filesystems.php app/Config/hashing.php app/Config/logging.php app/Config/mail.php app/Config/queue.php app/Config/saml2.php app/Config/services.php app/Config/session.php app/Config/setting-defaults.php app/Config/snappy.php app/Console/Commands/CleanupImages.php app/Console/Commands/ClearViews.php app/Console/Commands/CopyShelfPermissions.php app/Console/Commands/CreateAdmin.php app/Console/Commands/DeleteUsers.php app/Console/Commands/RegenerateSearch.php app/Console/Commands/UpdateUrl.php app/Console/Commands/UpgradeDatabaseEncoding.php app/Console/Kernel.php app/Entities/BreadcrumbsViewComposer.php app/Entities/EntityProvider.php app/Entities/Models/Book.php app/Entities/Models/BookChild.php app/Entities/Models/Bookshelf.php app/Entities/Models/Chapter.php app/Entities/Models/Deletion.php app/Entities/Models/Entity.php app/Entities/Models/HasCoverImage.php app/Entities/Models/Page.php app/Entities/Models/PageRevision.php app/Entities/Models/SearchTerm.php app/Entities/Repos/BaseRepo.php app/Entities/Repos/BookRepo.php app/Entities/Repos/BookshelfRepo.php app/Entities/Repos/ChapterRepo.php app/Entities/Repos/PageRepo.php app/Entities/Tools/BookContents.php app/Entities/Tools/ExportFormatter.php app/Entities/Tools/Markdown/CustomStrikeThroughExtension.php app/Entities/Tools/Markdown/CustomStrikethroughRenderer.php app/Entities/Tools/PageContent.php app/Entities/Tools/PageEditActivity.php app/Entities/Tools/PermissionsUpdater.php app/Entities/Tools/SearchIndex.php app/Entities/Tools/SearchOptions.php app/Entities/Tools/SearchRunner.php app/Entities/Tools/ShelfContext.php app/Entities/Tools/SiblingFetcher.php app/Entities/Tools/SlugGenerator.php app/Entities/Tools/TrashCan.php app/Exceptions/ApiAuthException.php app/Exceptions/ConfirmationEmailException.php app/Exceptions/FileUploadException.php app/Exceptions/Handler.php app/Exceptions/HttpFetchException.php app/Exceptions/ImageUploadException.php app/Exceptions/JsonDebugException.php app/Exceptions/LdapException.php app/Exceptions/LoginAttemptEmailNeededException.php app/Exceptions/LoginAttemptException.php app/Exceptions/MoveOperationException.php app/Exceptions/NotFoundException.php app/Exceptions/NotifyException.php app/Exceptions/PermissionsException.php app/Except Aborting I had read that this could be resolved by a git reset, which I have tried. After running the reset and trying to update however, I get a wall of red highlighted text, and Bookstack (or Apache) stops and won't start again. I end up having to restore from a snapshot. I also read that this might have something to do with commiting changes prior to updating, but I'm uncertain on how to do that. Any help would be greatly appreciated ### Exact BookStack Version 21.04.3 ### Log Content _No response_ ### PHP Version 8.0.14 ### Hosting Environment Ubuntu 18.04.6 LTS, using the installation script. No proxies VM machine hosted in VSphere environment
OVERLORD added the 🐕 Support label 2026-02-05 04:34:13 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 21, 2022):

Hi @plummerr,
This could likely be caused by permissions causing confusing in the version control system. If so, this can be easily solved but could you provide the output of the below command so we can verify that causation? Just run this from within your BookStack install folder:

git diff LICENSE
@ssddanbrown commented on GitHub (Jan 21, 2022): Hi @plummerr, This could likely be caused by permissions causing confusing in the version control system. If so, this can be easily solved but could you provide the output of the below command so we can verify that causation? Just run this from within your BookStack install folder: ```bash git diff LICENSE ```
Author
Owner

@plummerr commented on GitHub (Jan 21, 2022):

diff --git a/LICENSE b/LICENSE
old mode 100644
new mode 100755

@plummerr commented on GitHub (Jan 21, 2022): diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755
Author
Owner

@ssddanbrown commented on GitHub (Jan 21, 2022):

@plummerr Thanks, Looks like this is permissions. You can run the following, from your bookstack install folder, to ensure permissions won't affect code control:

git config core.fileMode false

After that you can try updating again, hopefully now with success.

@ssddanbrown commented on GitHub (Jan 21, 2022): @plummerr Thanks, Looks like this is permissions. You can run the following, from your bookstack install folder, to ensure permissions won't affect code control: ```bash git config core.fileMode false ``` After that you can try updating again, hopefully now with success.
Author
Owner

@plummerr commented on GitHub (Jan 21, 2022):

Well, making some progress...but now I get this

Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:62
Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:108
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129
Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129
Cannot create cache directory /home/administrator/.cache/composer/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/administrator/.cache/composer/files/, or directory is not writable. Proceeding without cache

In ArrayLoader.php line 44:

Unknown package has no name defined ([{"name":"aws/aws-sdk-php","version":"3.178.6","versi
on_normalized":"3.178.6.0","source":{"type":"git","url":"https://github.com/aws/aws-sdk
-php.git","reference":"0aa83b522d5ffa794c02e7411af87a0e241a3082"},"dist":{"type":"zip","url
":"https://api.github.com/repos/aws/aws-sdk-php/zipball/0aa83b522d5ffa794c02e7411af8
7a0e241a3082","reference":"0aa83b522d5ffa794c02e7411af87a0e241a3082","shasum":""},"require"
:{"ext-json":"","ext-pcre":"","ext-simplexml":"*","guzzlehttp/guzzle":"^5.3.3|^6.2.1|^7.
0","guzzlehttp/promises":"^1.4.0","guzzlehttp/psr7":"^1.7.0","mtdowling/jmespath.php":"^

This is just a snippet of it, and it's the red highlighted text that I mentioned earlier.

@plummerr commented on GitHub (Jan 21, 2022): Well, making some progress...but now I get this Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:62 Deprecation Notice: Required parameter $path follows optional parameter $schema in /usr/share/php/JsonSchema/Constraints/UndefinedConstraint.php:108 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129 Deprecation Notice: Method ReflectionParameter::getClass() is deprecated in /usr/share/php/Composer/Repository/RepositoryManager.php:129 Cannot create cache directory /home/administrator/.cache/composer/repo/https---packagist.org/, or directory is not writable. Proceeding without cache Cannot create cache directory /home/administrator/.cache/composer/files/, or directory is not writable. Proceeding without cache In ArrayLoader.php line 44: Unknown package has no name defined ([{"name":"aws\/aws-sdk-php","version":"3.178.6","versi on_normalized":"3.178.6.0","source":{"type":"git","url":"https:\/\/github.com\/aws\/aws-sdk -php.git","reference":"0aa83b522d5ffa794c02e7411af87a0e241a3082"},"dist":{"type":"zip","url ":"https:\/\/api.github.com\/repos\/aws\/aws-sdk-php\/zipball\/0aa83b522d5ffa794c02e7411af8 7a0e241a3082","reference":"0aa83b522d5ffa794c02e7411af87a0e241a3082","shasum":""},"require" :{"ext-json":"*","ext-pcre":"*","ext-simplexml":"*","guzzlehttp\/guzzle":"^5.3.3|^6.2.1|^7. 0","guzzlehttp\/promises":"^1.4.0","guzzlehttp\/psr7":"^1.7.0","mtdowling\/jmespath.php":"^ This is just a snippet of it, and it's the red highlighted text that I mentioned earlier.
Author
Owner

@ssddanbrown commented on GitHub (Jan 22, 2022):

Hi @plummerr,
Is sounds like you might be using an out of date version of composer relative to your PHP version, possibly the composer package provided in Ubuntu. If that's in use I'd advise removing that (sudo apt remove composer). Then follow the composer site to setup the latest version: https://getcomposer.org/download/

Note the sudo mv composer.phar /usr/local/bin/composer command they show to globally install it.

@ssddanbrown commented on GitHub (Jan 22, 2022): Hi @plummerr, Is sounds like you might be using an out of date version of composer relative to your PHP version, possibly the composer package provided in Ubuntu. If that's in use I'd advise removing that (`sudo apt remove composer`). Then follow the composer site to setup the latest version: https://getcomposer.org/download/ Note the `sudo mv composer.phar /usr/local/bin/composer` command they show to globally install it.
Author
Owner

@plummerr commented on GitHub (Jan 24, 2022):

I don't know how I screwed up the composer install the first time, so I started all over like you suggested.
We are good to go! I appreciate all your help

@plummerr commented on GitHub (Jan 24, 2022): I don't know how I screwed up the composer install the first time, so I started all over like you suggested. We are good to go! I appreciate all your help
Author
Owner

@HendrikFagel commented on GitHub (May 22, 2024):

Thank you for this helpful post, I had the same problem.
This has helped me.
Thank you very much.

@HendrikFagel commented on GitHub (May 22, 2024): Thank you for this helpful post, I had the same problem. This has helped me. Thank you very much.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2587