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

Webfinger: Exception parse_str(): Argument #1 ($string) must be of type string, null given in file '/opt/nextcloud/apps/social/lib/WellKnown/WebfingerHandler.php' line [...] #1888

Open
HighWingy opened this issue Jun 5, 2024 · 8 comments · May be fixed by #1951
Labels
3. to review bug Something isn't working

Comments

@HighWingy
Copy link

HighWingy commented Jun 5, 2024

Describe the bug
Going to the url for webfinger on my Nextcloud gives an internal server error. And when I check the logs, I see the following message:

Exception parse_str(): Argument #1 ($string) must be of type string, null given in file '/opt/nextcloud/apps/social/lib/WellKnown/WebfingerHandler.php' line 235

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://cloud.home.dragongames.net/index.php/.well-known/webfinger
  2. See error

Expected behavior
I'm not entirely sure what is supposed to happen as I've never been able to get this to work. But I do know that the 500 error and the error in the log file are not correct

Screenshots
n/a my site is public ish

Client details:

  • OS: Fedora 39
  • Browser: Chrome
  • Version: 29
  • Device: Laptop
Server details **Social app version:** 8.0 **Operating system**: Debian 12.5 **Web server:** Apache2 **Database:** MariaDB **PHP version:** 8.2 **Nextcloud version:** (see Nextcloud admin page) 29
Logs

Nextcloud log (data/nextcloud.log)

Exception parse_str(): Argument #1 ($string) must be of type string, null given in file '/opt/nextcloud/apps/social/lib/WellKnown/WebfingerHandler.php' line 235

#### Browser log

n/a this is all server side

@HighWingy HighWingy added the bug Something isn't working label Jun 5, 2024
@HighWingy HighWingy changed the title Webfilnger giving Internal Server Error and exception error in logs Webfinger giving Internal Server Error and exception error in logs Jun 5, 2024
@noci2012

This comment has been minimized.

@paulvt
Copy link

paulvt commented Oct 28, 2024

I didn't have this before, but I have it now that I updated to the release 0.7.0.
Were you running a snapshot after 0.6.2 @HighWingy?

@noci2012

This comment has been minimized.

@joshtrichards
Copy link
Member

While social should handle missing parameters better to avoid the exception (that's the bug), technically it doesn't impact functionality because it only occurs if you leave off the required ?resource= parameter when querying the /.well-known/webfinger URL.

@joshtrichards joshtrichards changed the title Webfinger giving Internal Server Error and exception error in logs Webfinger: Exception parse_str(): Argument #1 ($string) must be of type string, null given in file '/opt/nextcloud/apps/social/lib/WellKnown/WebfingerHandler.php' line [...] Nov 21, 2024
@joshtrichards
Copy link
Member

If you're able, test #1951. Should fix this issue.

@oculos
Copy link

oculos commented Nov 21, 2024

If you're able, test #1951. Should fix this issue.

It didn't for me. The error now is on line 229, which is, for me, this:

	parse_str(parse_url($requestUri, PHP_URL_QUERY), $query);

@HighWingy
Copy link
Author

I feel I should add I don't only get this error when going to the well-known url. It happens when trying to view user profiles via the social app, and various other actions on it. I can post and view messages, so it's not like it's completely broken. But that makes me think that there is something else going on for profile pages to also be generating this same error?

@ghost
Copy link

ghost commented Nov 22, 2024

this bug is still present in the last release installed via the app manager, and prevent nextcloud accounts from being followed from mastodon at least. this is a showstopper as it renders nextcloud social completely useless for most use cases (eg fediverse self hosting)

edit: it's not the webfinger. the webfinger works. but the URL retrieved next by mastodon just returns a broken webpage

Here are my logs (actual account name changed):

192.168.0.6 - - [22/Nov/2024:03:49:14 -0600] "GET /.well-known/webfinger?resource=acct:user@example.com HTTP/1.1" 200 1766 "-" "Mastodon/4.3.1 (http.rb/5.2.0; +https://chaos.social/)"
192.168.0.6 - - [22/Nov/2024:03:49:14 -0600] "GET /index.php/apps/social/@user HTTP/1.1" 200 2208 "-" "Mastodon/4.3.1 (http.rb/5.2.0; +https://chaos.social/)"

Last URL returns a page with an infinite spinner. and nothing else happens.

When I visit the above page while not being loaded, the page displays a popup that says: Failed to load relationship info

looks like there is a neglected entry for this bug: #1160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants