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

Error with FreshRSS backend #120

Open
daomah opened this issue Jan 31, 2025 · 10 comments
Open

Error with FreshRSS backend #120

daomah opened this issue Jan 31, 2025 · 10 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@daomah
Copy link

daomah commented Jan 31, 2025

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!

@guyfedwards
Copy link
Owner

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
Copy link
Owner

guyfedwards commented Jan 31, 2025

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 guyfedwards added bug Something isn't working documentation Improvements or additions to documentation labels Jan 31, 2025
@daomah
Copy link
Author

daomah commented Jan 31, 2025

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

@guyfedwards
Copy link
Owner

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

@guyfedwards
Copy link
Owner

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?

@daomah
Copy link
Author

daomah commented Feb 2, 2025

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
Copy link
Author

daomah commented Feb 4, 2025

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
Copy link
Author

daomah commented Feb 4, 2025

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

@daomah
Copy link
Author

daomah commented Feb 4, 2025

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)

@guyfedwards
Copy link
Owner

Any luck with this @daomah ?

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

No branches or pull requests

2 participants