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

[BUG] Not working after update to 1.23.1 #6088

Closed
lelanophilus opened this issue Feb 3, 2024 · 30 comments · Fixed by #6450
Closed

[BUG] Not working after update to 1.23.1 #6088

lelanophilus opened this issue Feb 3, 2024 · 30 comments · Fixed by #6450
Labels
Bug (unconfirmed) issues thar could not reproduced yeat Docker Everything related to Docker Support Support users to use FreshRSS
Milestone

Comments

@lelanophilus
Copy link

Describe the bug
I was on the last freshrss/freshrss:arm release and upgraded to freshrss/freshrss:latest in docker. Now new feeds won't download and the console is very buggy. Trying to update read status doesn't persist after page refresh. Looking in the docker logs I see:

Fatal error: Maximum execution time of 30+2 seconds exceeded (terminated) in /var/www/FreshRSS/lib/Minz/Request.php on line 331

I did find https://github.com/FreshRSS/FreshRSS/blob/edge/lib/Minz/Request.php#L331 but couldn't really understand why that might be timing out.

Any suggestions for how this might be fixed?

To Reproduce
Steps to reproduce the behavior:

  1. After having upgraded I can reproduce behavior by clicking the read/unread envelope and then refreshing.
  2. I also get "Bad Gateway" sometimes when trying to click around in admin or logs in freshrss web

Expected behavior
To be able to update feeds and refresh.

Environment information (please complete the following information):

  • Device: laptop
  • OS: Linux Mint
  • Browser: Firefox
  • FreshRSS version: 1.23.1
  • Database version: not sure, I think whatever is packaged in latest docker image
  • PHP version: as above
  • Installation type: docker image on a raspberry pi

Additional context
I upgraded to try to use the html/xpath scraping feed. I don't know if it was working properly before I tried to create an html/xpath feed but that feed never worked and when I try to delete it I can still see it show up in the "feeds with errors" view of the subscription management page.

@lelanophilus
Copy link
Author

I was able to load the /i/?c=update&a=checkInstall page and everything is green. It says PHP version is 8.2.7. It doesn't say the database version.

@lelanophilus
Copy link
Author

The update page says " An update of FreshRSS is available (Version 1.19.2), but check permissions on /var/www/FreshRSS directory. HTTP server must have have write permission"
It also says: "Current installed version 1.23.1"

@lelanophilus
Copy link
Author

The logs page loaded and it has some errors:

❌		1969-12-31 15:59:59 	SQL error FreshRSS_CategoryDAO::listCategories["HY000",1,"no such column: f.kind"] 

It also seems that after I updated the timestamp screwed up. The latest timestamps are as above. Previous to updating to the :latest docker branch the timestamps in the logs were correct.

@Alkarex
Copy link
Member

Alkarex commented Feb 3, 2024

Probably similar to #6057 (comment)

Could you try to perform other operations such as refreshing a feed or adding a feed?

@lelanophilus
Copy link
Author

I do see categories on the side panel. The first time I click "update feeds" the message "There are no feeds to update" immediately pops up. If I click it again the request times out with a "Bad gateway" response. If I try to add a new feed I sometimes get "Bad gateway" and sometimes get an error page that says "Error 403 - Forbidden You don’t have permission to access this page [CSRF]" /i/?c=error&rid=b5c11670fff07250

@math-GH
Copy link
Contributor

math-GH commented Feb 3, 2024

The timestamp of your log entry is a bit strange

@lelanophilus
Copy link
Author

It must be a -1internally, which for a timestamp converted to date looks like 1969-12-31 15:59:59. I assume the -1 represents an error state internally somewhere.

Any thoughts on what logs or configs I could look at to try to diagnose a bit more?

@Alkarex
Copy link
Member

Alkarex commented Feb 4, 2024

My guess is that the maximum execution time of 30s has been too short for some of the automatic database updates.
If you have an export backup from before, you can try to import it again from command line
https://github.com/FreshRSS/FreshRSS/blob/edge/cli/README.md

If you do not have an export, try to see whether a new export is working:

sudo docker exec --user www-data freshrss cli/export-sqlite-for-user.php --user lelanophilus --filename data/users/lelanophilus/lelanophilus-20240204.sqlite

@lelanophilus
Copy link
Author

I didn't make a backup export before upgrading, but the command to export does successfully run. Is there a way to increase the maximum execution time?

@Alkarex
Copy link
Member

Alkarex commented Feb 5, 2024

To get you back to a working state, as the export worked, you can try to:

  1. Rename your data/users/lelanophilus/db.sqlite to data/users/lelanophilus/db.sqlite.bak
  2. Rename your data/users/lelanophilus/lelanophilus-20240204.sqlite to ./data/users/lelanophilus/db.sqlite
  3. Try again

@lelanophilus
Copy link
Author

I spun up a new docker container with empty data and extensions volumes and then imported the exported sqlite backup there. The command line seemed to work, and I see the feeds in the new freshrss endpoint. The experience seems about the same as before. Errors, and not allowing me to fetch new feeds and I can't update read status. The only message in the logs is

1969-12-31 15:59:59 Error: SQLite import file is not readable:

@Alkarex
Copy link
Member

Alkarex commented Feb 6, 2024

Strange timestamp you get there. If the import works and you get that message, it could be that the access rights on your SQLite file are not good. Try at least to restart the container once, and also double-check.
If not too confidential, you can try to send me your original SQLite file

@lelanophilus
Copy link
Author

Maybe it is an issue with the latest version on arm architecture? I did a clean install on my raspberry pi and just loading the start page I get frequent "Request Timeout" (that seem to happen immediately) and am only able to get through after multiple refreshes.

@lelanophilus
Copy link
Author

I was able to get back to a working state by using the freshrss/freshrss:1.18.1-arm docker image. I will try using a more recent image later

@Alkarex
Copy link
Member

Alkarex commented Feb 8, 2024

Maybe it is an issue with the latest version on arm architecture?

It would be interesting to test some more. One way is to build locally:

  freshrss:
    image: freshrss/freshrss:latest
    build:
      # Pick #latest (stable release) or #edge (rolling release) or a specific release like #1.23.1
      context: https://github.com/FreshRSS/FreshRSS.git#latest
      # Pick Docker/Dockerfile for Debian-based image or Docker/Dockerfile-Alpine for Alpine-based image
      dockerfile: Docker/Dockerfile-Alpine
    ...

Trying both our Debian-based image (Docker/Dockerfile) and Alpine-based image (Docker/Dockerfile-Alpine).

@Alkarex
Copy link
Member

Alkarex commented Feb 8, 2024

What OS architecture do you run, more precisely? (arm/v7, arm64)

@lelanophilus
Copy link
Author

model name: ARMv7 Processor rev 3 (v7l)

@Alkarex
Copy link
Member

Alkarex commented Feb 8, 2024

Would you have a chance to try the builds as I suggested?

@lelanophilus
Copy link
Author

Not yet. I tried upgrading to the next release after my current (1.19.0-arm) but it has the same behavior of instability. I will try doing a build next.

@Alkarex Alkarex added this to the 1.24.0 milestone Feb 16, 2024
@Alkarex Alkarex added the Bug (unconfirmed) issues thar could not reproduced yeat label Feb 16, 2024
@lelanophilus
Copy link
Author

I think I set it up to build but got the same results with the same error message. Is standing up this docker compose file sufficient to have the underlying service built? Do I need to take other actions?

version: '3.8'

services:
  freshrss:
    image: freshrss/freshrss:latest
    build:
      context: https://github.com/FreshRSS/FreshRSS.git#latest
      dockerfile: Docker/Dockerfile
    container_name: freshrss-two
    restart: unless-stopped
    logging:
      options:
        max-size: 10m
    environment:
      CRON_MIN: "4,34"
      TZ: "America/Los_Angeles"
    ports:
      - "8080:80"
    volumes:
      - freshrss-data:/var/www/FreshRSS/data
      - freshrss-extensions:/var/www/FreshRSS/extensions

@math-GH math-GH added Docker Everything related to Docker Support Support users to use FreshRSS labels May 5, 2024
@math-GH
Copy link
Contributor

math-GH commented May 5, 2024

any news here?

@lelanophilus
Copy link
Author

I deleted and did a clean install. When I try to import the backup exported by 1.18 into the latest I get this error:

$ cli/import-sqlite-for-user.php --user joshua --filename data/users/joshua/joshua-20240508.sqlite --force-overwrite
FreshRSS importing database from SQLite for user “joshua”…
Deleting SQL data for user “joshua”…
Start SQL copy…
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such column: kind in /var/www/FreshRSS/lib/Minz/Pdo.php:78
Stack trace:
#0 /var/www/FreshRSS/lib/Minz/Pdo.php(78): PDO->query()
#1 /var/www/FreshRSS/app/Models/CategoryDAO.php(230): Minz_Pdo->query()
#2 /var/www/FreshRSS/app/Models/DatabaseDAO.php(326): FreshRSS_CategoryDAO->selectAll()
#3 /var/www/FreshRSS/cli/import-sqlite-for-user.php(31): FreshRSS_DatabaseDAO->dbCopy()
#4 {main}
thrown in /var/www/FreshRSS/lib/Minz/Pdo.php on line 78

@lelanophilus
Copy link
Author

It sounds like kind is a new column that was introduced. Is there a way to make it default to something innocuous rather than blow up?

https://github.com/FreshRSS/FreshRSS/blob/edge/app/Models/CategoryDAO.php#L227C1-L230

@Alkarex
Copy link
Member

Alkarex commented May 8, 2024

Thanks for the bug report @lelanophilus
Will fix

@Alkarex
Copy link
Member

Alkarex commented May 8, 2024

Did you try with our edge version?

@lelanophilus
Copy link
Author

I don't think so, I created the docker container with freshrss/freshrss:latest as the image.

@Alkarex
Copy link
Member

Alkarex commented May 8, 2024

If you can, just try the same with freshrss/freshrss:edge

@lelanophilus
Copy link
Author

This attempt is with 1.23.2-dev. I think same error, though different spot maybe.

PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1 no such column: kind in /var/www/FreshRSS/lib/Minz/Pdo.php:93
Stack trace:
#0 /var/www/FreshRSS/lib/Minz/Pdo.php(93): PDO->query()
#1 /var/www/FreshRSS/app/Models/CategoryDAO.php(228): Minz_Pdo->query()
#2 /var/www/FreshRSS/app/Models/DatabaseDAO.php(342): FreshRSS_CategoryDAO->selectAll()
#3 /var/www/FreshRSS/cli/import-sqlite-for-user.php(36): FreshRSS_DatabaseDAO->dbCopy()
#4 {main}
thrown in /var/www/FreshRSS/lib/Minz/Pdo.php on line 93

@Alkarex
Copy link
Member

Alkarex commented May 11, 2024

Import fixed with #6450
Would you be able to test?

  freshrss:
    image: freshrss/freshrss:6450
    build:
      context: http://github.com/Alkarex/FreshRSS.git#fix-import
      dockerfile: Docker/Dockerfile-Alpine
    ...

@lelanophilus
Copy link
Author

That worked, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug (unconfirmed) issues thar could not reproduced yeat Docker Everything related to Docker Support Support users to use FreshRSS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants