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

collections.go:233: [PROGRAMMER ERROR] WARNING: Collection.hostName is empty! #216

Closed
schu opened this issue Nov 30, 2019 · 4 comments
Closed
Labels
Milestone

Comments

@schu
Copy link

schu commented Nov 30, 2019

ERROR: 2019/11/30 09:33:27 collections.go:233: [PROGRAMMER ERROR] WARNING: Collection.hostName is empty! Federation and many other things will fail! If you're seeing this in the wild, please report this bug and let us know what you were doing just before this: https://github.com/writeas/writefreely/issues/new?template=bug_report.md
ERROR: [repeated a few times]

Error message popped up upon first follower from a Mastodon instance. Follow worked but posts can't be loaded it seems ("No toots here!").

New single-user writefreely instance, version v0.11.1.

@thebaer
Copy link
Member

thebaer commented Nov 30, 2019

Thanks for the report! Do you have the exact URL that was requested when this error came up? (It's usually the line directly following this one.) Or could you share more of your logs? That'll help us fix this.

@schu
Copy link
Author

schu commented Dec 1, 2019

Opening a post for editing seems to trigger the error:

Dec 01 11:58:59 [snip] writefreely[1397]: ERROR: 2019/12/01 11:58:59 collections.go:233: [PROGRAMMER ERROR] WARNING: Collection.hostName is empty! Federation and many other things will fail! If you're seeing this in the wild, please report this bug and let us know what you were doing just before this: https://github.com/writeas/writefreely/issues/new?template=bug_report.md
Dec 01 11:58:59 [snip] writefreely[1397]: 2019/12/01 11:58:59 "GET /...snip.../edit" 200 2.679008ms "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"

From Mastodon I see "4 Toots" (correct number) but only three posts (first missing).

@thebaer
Copy link
Member

thebaer commented Dec 1, 2019

Thanks. The discrepancy in Mastodon is likely something on their end -- e.g. Mastodon doesn't pull in old posts from before you follow a blog, and that number is never guaranteed to match up to actual number of posts on a remote account.

But I'm taking a look at this log message now.

@thebaer thebaer added this to the 0.11.2 milestone Dec 1, 2019
@thebaer thebaer added the logging label Dec 1, 2019
thebaer added a commit that referenced this issue Dec 1, 2019
This adds the instance's Hostname to the collection data loaded when
editing a collection post or its metadata. While not technically needed
in this situation, it suppresses an alarming error log.

Resolves #216
@thebaer thebaer closed this as completed Dec 11, 2019
@thebaer thebaer mentioned this issue Dec 18, 2019
@grinapo
Copy link

grinapo commented Jan 27, 2021

Dunno if this was supposed to be fixed in v0.12.0 but it's not.
Created a new site, new blog, tried to follow it then sent a direct message to it. :-) Okay, maybe that's over the top, but the error is there anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants