Failed to get user's public timeline without logging to nextcloud instance
When I try to open https://nextcloud-instance/apps/social/@username I can't see public timeline and see the following error in Browser Console:
Uncaught TypeError: Cannot read property 'uid' of null
at Object.<anonymous> (logger.js:27)
at o (bootstrap:63)
at Object.<anonymous> (social.js:59)
at o (bootstrap:63)
at Module.<anonymous> (social.js:1046)
at o (bootstrap:63)
at bootstrap:198
at social.js:1
If i replace getCurrentUser().uid with 0 at https://github.com/nextcloud/social/blob/d6092fb331de16aaff28d0cba799fc78df99944b/src/logger.js#L27 then public timeline starts to work.
Social app version: 0.3.1
Operating system: CentOS Linux release 7.8.2003
Web server: nginx 1.16.1
Database: mariadb 5.5.65
PHP version: 7.3.11
Nextcloud version: 19.0.4
Tested browsers: Chromium 81.0.4044.138 IceCat 68.11.0esr
Same on NC20
Same here as well. Was driving me nuts because I was also getting a false positive on the .well-known/webfinger redirect. It was only until I found this error that I realized something else was going on.
NC20.0.3 - Official Docker Image nextcloud:latest - using nginx:latest for the reverse proxy in front of it.
All testing of redirects works fine except viewing the external feed in which my error and mitigation is exactly as it is in OP.
Hi all, Here's how to fix this manually on the latest NC 20:
Apply this change manually: https://github.com/nextcloud/social/pull/1134 as well as this change: https://github.com/nextcloud/social/pull/1135
and this should get you to a functional state.
DISCLAIMER: As you may have noticed, these PR's have failed on tests. I suspect it's because one fix requires the other. However, it may also be causing bugs that I've not run into. So please don't apply this to a production instance.
@th3raid0r actually all of the PR's in this repository failed on tests, even #1165 with minor dependency upgrade. This is issue of the tests, not changes.
Change #1134 do not require any other fixes to use it, so if reading of the users public timeline is enough then #1135 is not necessary.