Freshrss: Import of exported subscriptions fail.

Created on 20 May 2018  路  13Comments  路  Source: FreshRSS/FreshRSS

PHP message: PHP Fatal error:  Uncaught Error: Call to a member function id() on null in /opt/freshrss/freshrss/app/Controllers/importExportController.php:428
Stack trace:
#0 /opt/freshrss/freshrss/app/Controllers/importExportController.php(93): FreshRSS_importExport_Controller->importJson('{\n    "id": "us...', true)
#1 /opt/freshrss/freshrss/app/Controllers/importExportController.php(143): FreshRSS_importExport_Controller->importFile('freshrss_2018-0...', '/tmp/phpTQ99qz')
#2 /opt/freshrss/freshrss/lib/Minz/Dispatcher.php(118): FreshRSS_importExport_Controller->importAction()
#3 /opt/freshrss/freshrss/lib/Minz/Dispatcher.php(47): Minz_Dispatcher->launchAction('importAction')
#4 /opt/freshrss/freshrss/lib/Minz/FrontController.php(84): Minz_Dispatcher->run()
#5 /opt/freshrss/freshrss/p/i/index.php(46): Minz_FrontController->run()
#6 {main}

Steps to reproduce:

  1. Import attached zip (simple export with both checkboxes - favourites and list of feeds)

freshrss_2018-05-20_export.zip

It failed on import of json with starred - content is:

{
    "id": "user/bart/state/org.freshrss/starred",
    "title": "List of favourite articles",
    "author": "bart",
    "items": [

]}
Important

All 13 comments

Thanks for the report, @bartlomiejcieszkowski

Same issue here with a .opml file directly exported from TTRSS.

Thanks @upils
Will fix ASAP.

Should be fixed in https://github.com/FreshRSS/FreshRSS/pull/1901
Tests / feedback appreciated.

Still the same error with the latest docker image based on dev.

Logs

 PHP Fatal error:  Uncaught Error: Call to a member function id() on boolean in /var/www/FreshRSS/app/Controllers/importExportController.php:295\nStack trace:\n#0 /var/www/FreshRSS/app/Controllers/importExportController.php(229): FreshRSS_importExport_Controller->addFeedOpml(Array, 'blog s\\xC3\\xA9cu')\n#1 /var/www/FreshRSS/app/Controllers/importExportController.php(361): FreshRSS_importExport_Controller->addOpmlElements(Array, 'blog s\\xC3\\xA9cu')\n#2 /var/www/FreshRSS/app/Controllers/importExportController.php(244): FreshRSS_importExport_Controller->addCategoryOpml(Array, NULL, false)\n#3 /var/www/FreshRSS/app/Controllers/importExportController.php(202): FreshRSS_importExport_Controller->addOpmlElements(Array)\n#4 /var/www/FreshRSS/app/Controllers/importExportController.php(83): FreshRSS_importExport_Controller->importOpml('<?xml version="...')\n#5 /var/www/FreshRSS/app/Controllers/importExportController.php(143): FreshRSS_importExport_Controller->importFile('TinyTinyRSS_201...', '/tmp/phpkCPHEa')\n#6 /var/www/FreshRSS/lib/Minz/Dispatc in /var/www/FreshRSS/app/Controllers/importExportController.php on line 295

@upils Thanks for the test. It is a related error, but not the same :-) Could you please tell a bit more about your setup? In particular: what database? Empty installation or existing data? Would you have the possibility of sharing a subset of your OPML triggering the problem?

@upils The error you get happens when the default category (id = 1) does not exist. It looks like there is a bug in the re-creation of the default category.

OK, I have found the issue. I use docker-compose and I have made a mistake in the volumes section. I will commit the fix and ask for a pull request.

The related bug in the automatic rebuild of the default category should be fixed in https://github.com/FreshRSS/FreshRSS/pull/1907

Can not import this file.
Log: [warning] --- File cannot be uploaded. Error code: 1
file.zip

@squromiv Please updade to the latest /dev branch (fix https://github.com/FreshRSS/FreshRSS/pull/2351 ), then increase your PHP upload_max_filesize configuration (your file is larger than the default 2MB), restart your Web server / PHP service, and finally try to import again.

then increase your PHP

At first, I changed "upload_max_filesize" and it worked. Great support from you.

Three settings are relevant, and must all be high enough, for instance:

memory_limit = 256M
post_max_size = 64M
upload_max_filesize = 48M
Was this page helpful?
0 / 5 - 0 ratings