nom icon indicating copy to clipboard operation
nom copied to clipboard

Error with FreshRSS backend

Open daomah opened this issue 11 months ago • 10 comments

Hello. This is my first time ever submitting an issue so please forgive any faux pas.

I am running Ubuntu 24.0.1 LTS in WSL and have configured nom to use the FreshRSS backend to connect to my self-hosted server. When I attempt to run nom I get the following error:

panic: runtime error: index out of range [1] with length 1

goroutine 1 [running]:
github.com/guyfedwards/nom/v2/internal/config.getFreshRSSFeeds(0xc00041fc20)
        github.com/guyfedwards/nom/v2/internal/config/backends.go:60 +0x629
github.com/guyfedwards/nom/v2/internal/config.(*Config).Load(0xc0002cdb00)
        github.com/guyfedwards/nom/v2/internal/config/config.go:199 +0x565
main.getCmds()
        ./main.go:90 +0x69
main.main()
        ./main.go:128 +0x225

Here is the config file:

configpath: ~/.config/nom/config.yml
showfavourites: false
version: ""
feeds:
ordering: asc
theme:
  glamour: dark
  titleColor: "62"
  filterColor: "62"
  selectedItemColor: "170"
  readIcon: ✓
backends:
  freshrss:
    host: http://rss.mydomain.com
    user: freshrssusername
    password: freshrsspassword
http:
  mintls: TLS 1.2

Any assistance is much appreciated!

daomah avatar Jan 31 '25 15:01 daomah

Hey, great first issue, all the useful information is here.

It looks like the error is being thrown due to an unexpected auth response. Nom should be handling this gracefully but could you try this in the terminal and share the response (make sure to obfuscate any private details)?

curl [YOUR_FRESHRSS_HOST]/api/greader.php/accounts/ClientLogin?Email=[YOUR_USER]&Passwd=[YOUR_PASSWORD]

guyfedwards avatar Jan 31 '25 16:01 guyfedwards

I have dug a little deeper locally, have you set the API password explicitly in settings? You can find the setting here: Settings > Profile > API password. You will also need to enable API access in Profile > Authentication > Allow API Access

See the note here

guyfedwards avatar Jan 31 '25 16:01 guyfedwards

Yes, I do have API access enabled and using the password. I have my mobile client configured using the same details.

The response I get is "Unauthorized!%"

On my mobile client I auth with my username, not my email. In a browser I attempted to auth with the email associated with my account and received the following error, "Error 403 - Forbidden. Login is invalid." I have attempted the curl command you suggested with both username and email address with the same unauthorized response

daomah avatar Jan 31 '25 17:01 daomah

Are you able to get the curl command to return 200 using a different combination of user/email/password?

guyfedwards avatar Jan 31 '25 22:01 guyfedwards

Sorry, just saw that you've already tried that. That curl command is essentially the same command that is being run in nom. Are you hosting freshrss yourself and see the logs?

guyfedwards avatar Jan 31 '25 22:01 guyfedwards

Yes, I am hosting FreshRSS myself. I'll take a look at the logs when I get the chance and let you know what I discover.

I appreciate all of your assistance!

daomah avatar Feb 02 '25 01:02 daomah

Apologies for the delay. FreshRSS logs for my user state Password API mismatch for user whenever I attempt to run nom. I confirmed that the proper API password is being used. My mobile client shows the same password and works.

I've tried wrapping it with both ''s and ""s to no avail. I have also tried adding /api/greader.php to the host URL. Same Password API mismatch no matter what

daomah avatar Feb 04 '25 20:02 daomah

Oh, and I have pulled the latest FreshRSS image and recreated the container

daomah avatar Feb 04 '25 20:02 daomah

Sorry for the spam, but I just noticed a setting in FreshRSS. Under my admin account, which is separate from my personal account, there is an Authentication section in the settings. The setting Allow unsafe automatic login using the format: is unchecked and looks similar to the curl you suggested I try. Allow API access is enabled. The authentication method is set to Web form (traditional, requires JavaScript)

daomah avatar Feb 04 '25 21:02 daomah

Any luck with this @daomah ?

guyfedwards avatar Feb 14 '25 15:02 guyfedwards

Closing as no response

guyfedwards avatar May 02 '25 10:05 guyfedwards