polls
polls copied to clipboard
Wrap php dependencies to avoid incompatibility conflicts
What is going wrong? What did you observe?
Blank page
A clear and concise description of what is wrong.
Steps to reproduce the behavior
- Upgrade polls app to a Version 3.5.x
- Try to login to nextcloud
- Blank page.
- After disabling polls app, all is back to normal, but without a working polls app of course.
Information about your polls installation
Polls version: (see apps page) 3.5.0 or 3.5.2 both are affected.
Fresh installation or update from a prior version (from which one)?
- [ ] First time install
- [x] Update from a prior version Version number of the previous version: 3.4.2
How did you install this version?(Appstore or describe installation)
- [ ] Installed from the appstore
- [x] Installed via occ
- [ ] Installed via extracting downloaded package to the apps folder
Information about your Instance of Nextcloud
Nextcloud version: (see Nextcloud admin page) 22.2.3 and 23.0.1 RC3
List of activated apps
Enabled:
- accessibility: 1.9.0
- activity: 2.15.0
- admin_audit: 1.13.0
- analytics: 4.0.3
- announcementcenter: 6.1.1
- appointments: 1.11.12
- apporder: 0.14.0
- audioplayer: 3.2.4
- audioplayer_sonos: 1.3.0
- breezedark: 23.2.0
- bruteforcesettings: 2.3.0
- calendar: 3.0.5
- carnet: 0.24.4
- checksum: 1.1.3
- circles: 23.0.1
- cloud_federation_api: 1.6.0
- co2clock: 0.1.3
- collectives: 0.19.22
- comments: 1.13.0
- contacts: 4.0.7
- contactsinteraction: 1.4.0
- cookbook: 0.9.9
- dashboard: 7.3.0
- data_request: 1.9.0
- dav: 1.21.0
- deck: 1.6.0
- dicomviewer: 1.2.3
- external: 3.10.2
- federatedfilesharing: 1.13.0
- federation: 1.13.0
- files: 1.18.0
- files_accesscontrol: 1.13.0
- files_automatedtagging: 1.13.0
- files_downloadactivity: 1.12.0
- files_markdown: 2.3.5
- files_mindmap: 0.0.26
- files_pdfviewer: 2.4.0
- files_readmemd: 1.2.1
- files_retention: 1.12.0
- files_rightclick: 1.2.0
- files_sharing: 1.15.0
- files_trashbin: 1.13.0
- files_versions: 1.16.0
- files_videoplayer: 1.12.0
- firstrunwizard: 2.12.0
- forms: 2.4.0
- gpxedit: 0.0.14
- gpxpod: 4.3.0
- groupfolders: 11.1.2
- health: 1.5.0
- impersonate: 1.10.0
- integration_github: 1.0.2
- login_notes: 1.0.3
- logreader: 2.8.0
- lookup_server_connector: 1.11.0
- mail: 1.11.6
- maps: 0.1.10
- metadata: 0.15.0
- news: 17.0.1
- nextcloud_announcements: 1.12.0
- notes: 4.3.0
- notifications: 2.11.1
- oauth2: 1.11.0
- password_policy: 1.13.0
- passwords: 2022.2.22
- passwords_handbook: 2022.2.22-build4437
- photos: 1.5.0
- previewgenerator: 4.0.0
- privacy: 1.7.0
- provisioning_api: 1.13.0
- quota_warning: 1.13.0
- ransomware_protection: 1.12.0
- recommendations: 1.2.0
- richdocuments: 5.0.2
- serverinfo: 1.13.0
- settings: 1.5.0
- sharebymail: 1.13.0
- side_menu: 2.3.3
- socialsharing_diaspora: 2.4.0
- socialsharing_email: 2.4.0
- spreed: 13.0.3
- support: 1.6.0
- survey_client: 1.11.0
- systemtags: 1.13.0
- talk_matterbridge: 1.23.2
- tasks: 0.14.2
- terms_of_service: 1.9.2
- text: 3.4.0
- theming: 1.14.0
- timemanager: 0.2.7
- twofactor_backupcodes: 1.12.0
- updatenotification: 1.13.0
- user_status: 1.3.1
- viewer: 1.7.0
- weather_status: 1.3.0
- welcome: 1.0.1
- workflow_script: 1.8.0
- workflowengine: 2.5.0
Disabled:
- audioplayer_editor: 0.3.0
- encryption
- files_external
- polls: 3.5.2
- recognize: 1.11.0
- social: 0.4.2
- suspicious_login: 4.1.0
- user_ldap
Nextcloud Configuration
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Server configuration (decide, if you think it is helpful)
Database:
- [ ] MySql version:
- [x] MariaDB version: 10.4
- [ ] PostgreSQL version:
- [ ] Oracle version:
- [ ] SQLite:
- [ ] Other (add name and version):
PHP version:
- [ ] 7.3 or lower
- [ ] 7.4
- [x] 8.0
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
Client configuration
Device:
- [x] PC
- [ ] Mac
- [ ] Mobile phone
- [ ] Tablet
Browser:
- [x] Firefox version: 97.0
- [ ] Chrome version:
- [ ] Safari version:
- [ ] Other (add name and version):
Logs
Nextcloud log (data/nextcloud.log)
{"reqId":"7P4IlFIScpZAMFZWte43","level":3,"time":"2022-02-11T16:20:56+00:00","remoteAddr":"24.134.13.209","user":"rainer.emrich","app":"PHP","method":"GET","url":"/apps/dashboard/","message":"Declaration of League\\CommonMark\\Extension\\CommonMarkCoreExtension::register(League\\CommonMark\\ConfigurableEnvironmentInterface $environment) must be compatible with League\\CommonMark\\Extension\\ExtensionInterface::register(League\\CommonMark\\Environment\\EnvironmentBuilderInterface $environment): void at /var/www/nc_01/nextcloud/apps/login_notes/vendor/league/commonmark/src/Extension/CommonMarkCoreExtension.php#29","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0","version":"23.0.1.1"}
Browser console log
Insert your browser console log here
Other browser logs
Insert additional logs from your browser here
I was able to complete the upgrade on the CLI on 22.2.3.
- with a
occ upgrade
first - followed by
occ maintenance:repair
(which done aPolls - Create indices and foreign key constraints)
No luck here.
here also no luck
~~I don't understand the error log:~~
~~Are you sure, you pasted the correct line? It is from the dashboard and refers to apps/login_notes~~
just made the error message a little more readable.
{
"reqId": "7P4IlFIScpZAMFZWte43",
"level": 3,
"time": "2022-02-11T16:20:56+00:00",
"remoteAddr": "*",
"user": "*",
"app": "PHP",
"method": "GET",
"url": "/apps/dashboard/",
"message": "Declaration of
League\\CommonMark\\Extension\\CommonMarkCoreExtension::register(
League\\CommonMark\\ConfigurableEnvironmentInterface $environment)
must be compatible with
League\\CommonMark\\Extension\\ExtensionInterface::register(
League\\CommonMark\\Environment\\EnvironmentBuilderInterface $environment): void
at /var/www/nc_01/nextcloud/apps/login_notes/vendor/league/commonmark/src/Extension/CommonMarkCoreExtension.php#29",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0",
"version": "23.0.1.1"
}
Hmm. Just installed login_notes and my test instance is whole white page. But only, if polls is enabled also.
try occ app:disable login_notes
.
Edit: Login notes and Polls use different versions of CommonMark. Why this affects the whole instance??? 🤷
Solution for the moment: disable one of these apps.
@tcitworld Backping: https://framagit.org/framasoft/nextcloud/login-notes/-/issues/13
@RainerEmrich I love it, if a bug issue is filled out properly, so that the important informations are available with the first post. 👍
Vendor deps should be contained to avoid that. The mail app has an example.
@tcitworld Any hint, where to find that? Shouldn't login_note do that as well?
https://github.com/coenjacobs/mozart and https://github.com/nextcloud/mail/blob/main/composer.json
cc @ChristophWurst
login_notes has probably far less users than polls, so you'll probably encounter the issue with other apps anyway. But I'll do it when I can.
An easy short-term fix, of course, is bumping dependencies from both apps to the same version (didn't check that yet).
An easy short-term fix, of course, is bumping dependencies from both apps to the same version (didn't check that yet).
Yes this would remove symptom, but it should be possible to use different dependencies in different apps.
BTW: Update to 2.1 wasn't big thing in polls.
See here https://github.com/nextcloud/polls/commit/9248f016621a69620ca4bc92a775ee16194cf225
And here: https://commonmark.thephpleague.com/2.0/upgrading/
Didn't upgrade CommonMark because I wanted to keep PHP 7.3 compatibility for a bit, but Login Notes 1.0.4 now wraps its dependencies in it's own namespace https://framagit.org/framasoft/nextcloud/login-notes/-/releases/1.0.4
Shouldn't we have the dependency wrapping too? This should avoid such conflicts in the future.
@tcitworld Cool. Thanks for the pattern. I will try to adopt this too, when I have a little bit time to dive deeper into it.
Shouldn't we have the dependency wrapping too? This should avoid such conflicts in the future.
Where here? In polls? Yes, of course. Someday.
Can anyone confirm that the error is gone after udate to Nextcloud 23.0.2 and Polls 3.5.2? It seams to be but I haven't tested it on my productive installation.
The changes in login_notes 1.0.4 solves the issue for now. Woking fine on my side on Nextcloud 22.0.5 and 23.02.
Can anyone confirm that the error is gone [...]
This issue is still open, so it is not solved in polls, but login-notes 1.0.4 solves the current conflict.
I ran into this error today, upgrading polls to 3.5.4 (nextcloud 22.2.5). Updating php from 7.3 to 8 fixed the problem for me.
IMHO polls should not upgrade if the dependencies are not met for a new version.
This issue has nothing to do with the PHP version but with login_notes and a dependency conflict. Polls is marked as compatible from PHP 7.4 up. You shouldn't be able to update with a PHP 7.3.
with polls 3.5.4 and nextcloud 22.2.5 mariadb 10.5.13 php 8.0.15 : when you create a polls, we got the red message "Currently no users have access to this poll" and the list is totaly empty in "Sharing" section, it is unusable.
@Kalimeiro Disable Ad blocker See #2209, #1452