nextcloud / bookmarks

🔖 Bookmark app for Nextcloud
https://apps.nextcloud.com/apps/bookmarks
GNU Affero General Public License v3.0
1.03k stars 174 forks source link

Importing bookmarks on Nextcloud AIO fails with "Request failed with status code 500" #2197

Closed vbresan closed 2 months ago

vbresan commented 4 months ago

Describe the bug I have successfully installed Nextcloud AIO following the instructions here. I added the Bookmarks app and tried to import a file exported from another Nextcloud instance. A modal with progress appears and then disappears, followed by the message "Request failed with status code 500."

The same file can be imported into Nextcloud 29.0.3 (which was installed via the Hestia control panel) with Bookmarks 14.2.2.

To Reproduce Steps to reproduce the behavior:

  1. Go to Bookmarks app
  2. Click on 'Import bookmarks'
  3. Select a file
  4. See error

Expected behavior Bookmarks imported.

Desktop (please complete the following information):

Server (please complete the following information):

Additional context Add any other context about the problem here.

Web server error log No new web server log entries when trying to import bookmarks.

Nextcloud log (nextcloud/data/nextcloud.log)

2024-07-16T12:35:06.086012923Z [16-Jul-2024 14:35:05] WARNING: [pool www] child 489 exited on signal 9 (SIGKILL) after 31.147074 seconds from start
2024-07-16T12:35:06.116683909Z [16-Jul-2024 14:35:05] NOTICE: [pool www] child 505 started
2024-07-16T12:35:18.962169356Z [16-Jul-2024 14:35:18] WARNING: [pool www] child 499 exited on signal 9 (SIGKILL) after 41.411567 seconds from start
2024-07-16T12:35:18.966267786Z [16-Jul-2024 14:35:18] NOTICE: [pool www] child 509 started
2024-07-16T12:35:20.956992757Z [16-Jul-2024 14:35:20] WARNING: [pool www] child 505 exited on signal 9 (SIGKILL) after 15.001020 seconds from start
2024-07-16T12:35:20.959068126Z [16-Jul-2024 14:35:20] NOTICE: [pool www] child 510 started
2024-07-16T12:35:41.140811019Z [16-Jul-2024 14:35:40] WARNING: [pool www] child 509 exited on signal 9 (SIGKILL) after 22.022422 seconds from start
2024-07-16T12:35:41.142951539Z [16-Jul-2024 14:35:40] NOTICE: [pool www] child 520 started
2024-07-16T12:35:51.997091091Z [16-Jul-2024 14:35:51] WARNING: [pool www] child 510 exited on signal 9 (SIGKILL) after 31.037932 seconds from start
2024-07-16T12:35:51.999949001Z [16-Jul-2024 14:35:51] NOTICE: [pool www] child 521 started
2024-07-16T12:35:53.999696272Z [16-Jul-2024 14:35:53] WARNING: [pool www] child 520 exited on signal 9 (SIGKILL) after 13.010382 seconds from start
2024-07-16T12:35:54.002718782Z [16-Jul-2024 14:35:54] NOTICE: [pool www] child 522 started
2024-07-16T12:36:04.010878940Z [16-Jul-2024 14:36:04] WARNING: [pool www] child 521 exited on signal 9 (SIGKILL) after 12.011183 seconds from start
2024-07-16T12:36:04.012703160Z [16-Jul-2024 14:36:04] NOTICE: [pool www] child 523 started
2024-07-16T12:36:06.014071970Z [16-Jul-2024 14:36:06] WARNING: [pool www] child 522 exited on signal 9 (SIGKILL) after 12.011698 seconds from start
2024-07-16T12:36:06.016065519Z [16-Jul-2024 14:36:06] NOTICE: [pool www] child 524 started
2024-07-16T12:36:23.044433431Z [16-Jul-2024 14:36:23] WARNING: [pool www] child 523 exited on signal 9 (SIGKILL) after 19.023038 seconds from start
2024-07-16T12:36:23.046618741Z [16-Jul-2024 14:36:23] NOTICE: [pool www] child 534 started
2024-07-16T12:36:25.039345426Z [16-Jul-2024 14:36:25] WARNING: [pool www] child 524 exited on signal 9 (SIGKILL) after 19.023106 seconds from start
2024-07-16T12:36:25.042441096Z [16-Jul-2024 14:36:25] NOTICE: [pool www] child 535 started
github-actions[bot] commented 4 months ago

Hello :wave:

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue Cheers :blue_heart:

marcelklehr commented 4 months ago

Hello @vbresan The log you posted seems to be the web server log, but I'd need the nextcloud logs. You might have to check how to get those from AIO.

vbresan commented 4 months ago

It is my nextcloud log that I get from https://myipaddress:8080/api/docker/logs?id=nextcloud-aio-nextcloud

I am aware that it is not relevant, I pasted it anyway as those were the only lines that showed after my import attempt.

However, I have just looked at the database log and found the following:

2024-07-16T13:07:36.277003029Z 2024-07-16 15:07:36.276 CEST [950] ERROR:  value "4294967295" is out of range for type integer
2024-07-16T13:07:36.300316345Z 2024-07-16 15:07:36.276 CEST [950] CONTEXT:  unnamed portal parameter $5 = '...'
2024-07-16T13:07:36.300370355Z 2024-07-16 15:07:36.276 CEST [950] STATEMENT:  INSERT INTO "oc_bookmarks" ("user_id", "url", "title", "description", "added", "lastmodified", "last_preview", "clickcount") VALUES($1, $2, $3, $4, $5, $6, $7, $8)
marcelklehr commented 4 months ago

Mh, that looks like an int column is too small.

marcelklehr commented 4 months ago

Can you share the exported bookmarks file with me, privately? My email address is mklehr@gmx.net, for example

vbresan commented 4 months ago

I have inspected the bookmarks file and found that "4294967295" is set as the ADD_DATE for a number of entries. The bookmarks file was exported from Bookmarks 11.0.4 running on Nextcloud Hub 3 (25.0.1).

When I inspected one of these entries in Nextcloud Bookmarks where they got exported from, it reported that it was "Created 29787 days ago". I suspect that the values got corrupted a long time ago during the import from Google Bookmarks or from Delicious, which preceded even that one.

yayaasd commented 3 months ago

same Problem here with Nextcloud Hub 29.0.5. I edited XML manually and changed the add_date to: ADD_DATE=""

still getting a 500 error, trying to raise debug messages now to see more..

marcelklehr commented 2 months ago

The latest released versions should fix this.