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

[Bug]: grant.js :: HTMLCollection does not have a .forEach method #41098

Closed
5 of 8 tasks
callmemagnus opened this issue Oct 24, 2023 · 1 comment · Fixed by #41117
Closed
5 of 8 tasks

[Bug]: grant.js :: HTMLCollection does not have a .forEach method #41098

callmemagnus opened this issue Oct 24, 2023 · 1 comment · Fixed by #41117
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: authentication

Comments

@callmemagnus
Copy link
Contributor

⚠️ This issue respects the following points: ⚠️

Bug description

There is a mistake in the code of grant.js

Steps to reproduce

  1. Try to setup an application (e.g. floccus)
  2. login
  3. get stuck on the Grant access page

This is how I noticed the issue. There is a js stack trace:

Uncaught TypeError: wrapper.getElementsByClassName(...).forEach is not a function

Expected behavior

no stacktrace and hopefully the grant is setup correctly :-)

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

I cannot to a PR right now but the code

  wrapper.getElementsByClassName('icon-confirm-white').forEach(function(el) {

should be replaced with for example

  Array.from(wrapper.getElementsByClassName('icon-confirm-white')).forEach(function(el) {
@callmemagnus callmemagnus added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 24, 2023
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 26, 2023
Closes #41098

Signed-off-by: Magnus Anderssen <magnus@magooweb.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 26, 2023
Closes #41098

Signed-off-by: Magnus Anderssen <magnus@magooweb.com>
backportbot-nextcloud bot pushed a commit that referenced this issue Oct 26, 2023
Closes #41098

Signed-off-by: Magnus Anderssen <magnus@magooweb.com>
@callmemagnus
Copy link
Contributor Author

Ok, a little off-topic but I wanted to provide a little feedback on my original problem that was application onboarding through the grant process which was blocked.

Fixing the JS stack trace did not fix the original issue but enabled me to investigate further.

My issue was CSP and the fact that my setup was resolving to http:// in the form action, which is disallowed in the CSP.

I'm using the nextcloud apache docker image but I was extending it to add a supervisor. The issue is that when you extend the docker image and provide another CMD you break some feature of the docker image (like disabling the infamous rewrite of the REMOTE_ADDR by the apache server with the value of X_FORWARDED_FOR).

So I'm able to connect application again (nextcloud core feature) but I'm back to square one with the fulltextsearch live process I wanted to enable.

susnux pushed a commit that referenced this issue Nov 15, 2023
Closes #41098

Signed-off-by: Magnus Anderssen <magnus@magooweb.com>
zak39 pushed a commit to zak39/server that referenced this issue Dec 19, 2023
Closes nextcloud#41098

Signed-off-by: Magnus Anderssen <magnus@magooweb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: authentication
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants