wallabag / wallabag

wallabag is a self hostable application for saving web pages: Save and classify articles. Read them later. Freely.
https://wallabag.org
MIT License
10.4k stars 767 forks source link

Pocket imports are not working at all #7635

Open a20eac1d opened 2 months ago

a20eac1d commented 2 months ago

Environment

What is the bug?

Wallabag fails to import Pocket links.

When trying to import using the Pocket API, the import fails randomly. Sometimes it imports nothing, sometimes it imports 100-200 links. After that it fails with a cryptic error message such as:

An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x91\x87</...' for column wallabag.wallabag_entry.content at row 1

Even though the imported links do not contain any UTF-8 codepoints or smilies.

Converting the exported file to JSON and then importing that using the Wallabagv2 JSON importer also fails for similar reasons.

What steps will reproduce the bug?

If you need anymore information please let me know.

j0k3r commented 1 month ago

Is there any chance to know which content/url produce the error?

michaelfromyeg commented 1 month ago

Seeing the same on a wallbag.it account

500: Internal Server Error
Wallabag\ImportBundle\Import\AbstractImport::parseEntriesForProducer(): Argument #1 ($entries) must be of type array, null given, called in /var/www/wallabag.it/app2019/src/Wallabag/ImportBundle/Import/PocketImport.php on line 134

Web and retrieve are enabled.

nobbes commented 1 month ago

Similar issue here:

Environment Version: 2.6.9 Installation: nativ, vServer PHP version: 8.2 OS: Debian 12 Database: SQLite / MySQL Parameters: Redis for async import is activated

What is the bug? Import from Pocket fails after authorisation in Pocket. Either after a timeout or a PHP Warning:

2024/09/29 12:35:34 [error] 1737292#1737292: *30107 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 1.2.3.4, server: walla.huppertz.me, request: "GET /import/pocket/callback HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock", host: "wallabag...", referrer: "https://getpocket.com/"

2024/09/29 12:36:12 [error] 1737292#1737292: *30107 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "list" in [PATH]/src/Wallabag/ImportBundle/Import/PocketImport.php on line 136" while reading response header from upstream, client: 91.57.250.65, server: wallabag..., request: "GET /import/pocket/callback HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "wallabag...", referrer: "https://getpocket.com/"

What steps will reproduce the bug?

j0k3r commented 1 month ago

@nobbes in your case, as the error says, upstream timed out. Which means, request to Pocket timed out. Not a wallabag problem.

nobbes commented 1 month ago

@j0k3r true. Then just the second line is relevant.