nextcloud / polls

🗳️ Polls app for Nextcloud
https://apps.nextcloud.com/apps/polls
GNU Affero General Public License v3.0
257 stars 73 forks source link

[8.0.0-alpha] overview of options is not shown #3702

Open Juergen-Vollmer opened 2 months ago

Juergen-Vollmer commented 2 months ago

⚠️ This issue respects the following points: ⚠️

What went wrong, what did you observe?

After update to polls 8.0.0. alpha the middle part of the polls view with all the details is not shown anymore:

nextcloud-plls-view

If I view an exported link of the poll, everything is ok:

nextcloud-polls-view-ok

What did you expect, how polls should behave instead?

The details of the second screenshot should be displayed ion the "owenwers" view, as described in hiere:

What steps does it need to replay this bug?

  1. nothing special has to be done, just upgrading and viewing my polls

Installation method

Installed/updated from the appstore (Apps section of your site)

Installation type

Updated from a minor version within same major version (i.e. 4.0.0 to 4.1.1)

Affected polls version

8.0.0.0 alpha 4

Which browser did you use, when experiencing the bug?

Other browser

No response

Add your browser log here

No response

Additional client environment information

No response

NC version

Other/Don't know

Other Nextcloud version

No response

PHP engine version

PHP 8.2

Other PHP version

Nextcloud Hub 9 (30.0.0 RC4)

Database engine

MariaDB

Database Engine version or other Database

No response

Which user-backends are you using?

Add your nextcloud server log here

No response

Additional environment informations

No response

Configuration report

{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.vollmer.computer",
"nextcloud.vollmer.homelinux.net",
"nextcloud.vollmer.home"
],
"enable_previews": true,
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.0.12",
"overwrite.cli.url": "https:\/\/nextcloud.vollmer.computer",
"htaccess.RewriteBase": "\/",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"memcache.local": "\\OC\\Memcache\\APCu",
"loglevel": 0,
"log_type": "file",
"log_rotate_size": 104857600,
"maintenance": false,
"onlyoffice": {
"verify_peer_off": true
},
"theme": "",
"simpleSignUpLink.shown": false,
"app_install_overwrite": [
"calendar",
"keeweb",
"files_readmemd",
"twofactor_email",
"keeporsweep",
"twofactor_rcdevsopenotp",
"whiteboard",
"twofactor_u2f",
"nextbackup",
"polls",
"twofactor_admin",
"richdocuments",
"previewgenerator",
"forms",
"groupfolders",
"files_markdown",
"files_mindmap",
"tasks",
"spreed",
"afterlogic",
"mindmap_app",
"richdocumentscode",
"twofactor_totp",
"pdfdraw",
"customproperties",
"cookbook",
"imageconverter",
"files_videoplayer"
],
"twofactor_enforced": "true",
"twofactor_enforced_groups": [
"u2f"
],
"twofactor_enforced_excluded_groups": [],
"maintenance_window_start": 1,
"default_language": "de_DE",
"default_locale": "de_DE",
"default_phone_region": "DE",
"force_language": "de_DE",
"skeletondirectory": "",
"updater.release.channel": "stable",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
}
}

List of activated Apps

No response

Nextcloud Signing status

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
    - INVALID_HASH
        - .htaccess

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [.htaccess] => Array
                        (
                            [expected] => 999403d20234fade42c6ee181e44d1d0c8bfeff0c855067259a76acffdb3acf34cdd647dba080dff59958cfa6192fd7eb6241cd8d498537241df8bb3b0ae9902
                            [current] => 726d526decc88805a506c725556fa63476098b7cdc7603b35b625031f8c73c7e641871237a2945a7376153c1b46f6b72a8e495d8a33ae5756371aa0c7987843f
                        )

                )

        )

)

Additional Information

No response

dartcafe commented 2 months ago

Have you verified, you cleared your cache? I cannot reproduce that behavior.

Juergen-Vollmer commented 2 months ago

Yes I cleared the browser caches. The same behaviour under

Juergen-Vollmer commented 2 months ago

I opend the HTML-code of the polls page and opened firefox's web-developer tool and found ... see screenshot. I have no idea whether this helps :-) ksnip_20240914-124419

dartcafe commented 2 months ago

Any relevant information inside the browser console?

Something seems to prevent loading the app properly.

Juergen-Vollmer commented 2 months ago

I just tried another user account, for wich I never used polls before- and there it worked as expected.

I just a thrid account, which already had polls before, showing the "old" polls or creating a new one - in both caeses, it does not work.

In case of the error the browser console shows:

TypeError: (intermediate value)(...).user is null setup https://nextcloud.vollmer.computer/apps/polls/js/polls-main.mjs?v=7929802a-2859:169 E2 https://nextcloud.vollmer.computer/apps/polls/js/Spinner.vue_vue_type_style_index_0_scoped_4bfce222_lang-CgAHGH23.chunk.mjs:3 Ne https://nextcloud.vollmer.computer/apps/polls/js/Spinner.vue_vue_type_style_index_0_scoped_4bfce222_lang-CgAHGH23.chunk.mjs:3 ..... many more of these lines

Jürgen

Juergen-Vollmer commented 1 month ago

I just tried: adding another user as administrator of the poll. That other user sees the options, i.e. everthing is ok. But still the original user does not see the options.

Any Idea?

Jürgen

dartcafe commented 1 month ago

Not until now. I am wondering where this comes from. But your observations are helpful, although I did not get behind the reason.

TypeError: (intermediate value)(...).user is null

Maybe the network tab can reveal an information, which user is null.

I think I have to build the alpha using dev mode, to get better information about the failing line. The linked code is not helpful, since it is minified.

Juergen-Vollmer commented 1 month ago

I found another strange thing, the following message is written to nextcloud.log, but only in the error cases (user with "old polls")

 More than 30 characters for an output column name are not allowed on Oracle.

it comes from the PHP file

  src/lib/private/DB/QueryBuilder/QueryBuilder.php    line:284   function prepareForExecute

If I add some debug info that source the columnname causing that error ist

 current_user_count_orphaned_votes

May be that "orphaned" user is the user where the javascript interpreter complains

 TypeError: (intermediate value)(...).user is null

(as shown in a previous messsage)

If I use another nextcloud user, who is now administrator of that poll, no error happens, and that user sees everything fine as it should be.

Any Idea about that? Jürgen

dartcafe commented 1 month ago

First of all thanks for the hint of

If I add some debug info that source the columnname causing that error is current_user_count_orphaned_votes

I shortened this names.

But i doubt, that this is the cause, since it would then also cause an error with the privileged users.

Seems that some information is cut of for non privileged users, but I could not reproduce it until now. Anyways, I changed some code also regarding the user properties. Additionally I changed the build to a dev build for alpha releases, so the console errors should lead to unminified code.

Did you install the alpha via appstore or manually?

Juergen-Vollmer commented 1 month ago

I used the "standard" web-update mechanism.

If you tell me where i get the "alpha-code", fpr testeing, I can douwnload it and install it. Maybe you may add some debugging-output.

Jürgen

dartcafe commented 1 month ago

Just wanted to know. You should find a new alpha6 in the appstore.

I fixed some bugs and did some refactoring regarding users. Also the build is compiled as a dev build without minified code (I hope).

dartcafe commented 1 month ago

alpha7 is out, too.

BTW: If you do not find the release via the appstore, the latest builds are always found here.

Juergen-Vollmer commented 1 month ago

Not until now. I am wondering where this comes from. But your observations are helpful, although I did not get behind the reason.

TypeError: (intermediate value)(...).user is null

Maybe the network tab can reveal an information, which user is null.

I think I have to build the alpha using dev mode, to get better information about the failing line. The linked code is not helpful, since it is minified.

gli

Juergen-Vollmer commented 1 month ago

After the update, polls does not work anymore. It does not show up if clicking on the icon in the "menu line" in the nextcloud window. If I click on that iocn, I get the last action, e.g. visiting "mail" beofre and then "polls" the "mail" stuff ist shown again.

That happens for all users.

Juergen-Vollmer commented 1 month ago

ok several deinstallation and installation of polls, polls shows up again, but the initial error ist still present. Jürgen

dartcafe commented 1 month ago

If I click on that icon, I get the last action, e.g. visiting "mail" before and then "polls" the "mail" stuff is shown again.

Ah, yeah. Damned. Since I changed the routes from the routes.php to attributes, there is no more named route for the main index. Have to fiddle that out.

But you are still able to enter the app via the url.

here it would help to know on what position the error is raised (see browser console). Since the build is build as dev build (nice sentence), the code position should be identifiable. And if you are able to, post the according API call from the network tab (mind sensitive information there).

dartcafe commented 1 month ago

If I click on that icon, I get the last action, e.g. visiting "mail" before and then "polls" the "mail" stuff is shown again.

Fixed in alpha8

Juergen-Vollmer commented 1 month ago

Ok with alpha8,the click on poll works again for all users. Still the original problem still exists.

But I detected another problem one. Clicking on "Einstellungen" (configuration?) shows for the user with the wrong display of options the following (see screenshot) Image

For the nextcloud-user with correct shown options (the same poll) the second picture shows the expected configurations. Image

Ok, when I remember right, that problem exists since the begnning of this bug report.

Jürgen

dartcafe commented 1 month ago

I also can't reproduce that.

But I still need information from the browser log, to be able to analyze that or access to the instance. Everything else is guessing.

Juergen-Vollmer commented 1 month ago

Enclosed you find the result from

tail -f /var/log/nextcloud.log  | grep juergen.vollmer

as action I clicked on "Polls" in the amin menue and the on relevant pools the first one showing the bug. (file nc1.log)

the nect action I clicked on "Einstellung" (file nc2.log)

Jürgen

nc1.log nc2.log

dartcafe commented 1 month ago

Thanks, but this are the server logs, which do not mention any relevant error (Besides some wrong named routes, which I fixed in #3749)

What I think I need is information from the browser's console, like you quoted in https://github.com/nextcloud/polls/issues/3702#issuecomment-2354747628

Juergen-Vollmer commented 1 month ago

Here the borwser console logs

File 1: clicking on a poll, which showed the error

console-export-2024-10-13_20-26-17.txt

File 2: error when clicking the "Einstellungen" button

console-export-2024-10-13_20-24-15.txt

Juergen-Vollmer commented 1 month ago

Since I need polls urgently, I deleted the app an installed manually (unpacking the tgz.gz file) polls-v7.2.4. Everything works fine again.

Jürgen

dartcafe commented 1 month ago

Good to hear. But from your words, I suspect you are running a productive installation with the beta channel. I strongly suggest, you switch back to the stable channel, since betas - and especially alphas - are expected to be not production ready and contain bugs.

Anyways, thanks for your effort and input. This is very valuable.