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

Not working with owncloud 10.0.8 #631

Closed
minj opened this issue Apr 29, 2018 · 17 comments
Closed

Not working with owncloud 10.0.8 #631

minj opened this issue Apr 29, 2018 · 17 comments

Comments

@minj
Copy link

minj commented Apr 29, 2018

The title says it all. No entries displayed at all after oc upgrade.

Let me know if you need any details, I'm on my phone atm

@David-Guillot
Copy link

Confirming the issue, even after wiping app data and re-authenticated to owncloud server.

@David-Development
Copy link
Member

Thank you for the feedback. Please make sure that the news app is still enabled in the owncloud. Furthermore you can check if there are any error messages in the owncloud log.

If everything looks fine, make sure, that the owncloud news API works properly. The following comment shows how to test the API: #527 (comment)

@David-Guillot
Copy link

Thanks for the tip! I tried and here's the result:

$ curl -u david https://myowncloudinstance/index.php/apps/news/api/v1-2/feeds
Enter host password for user 'david':
{"starredCount":0,"feeds":[],"newestItemId":0}
$

OC log shows nothing for this particular API call, but: looking very deep into the log showed the following, the day after updating Owncloud from 10.0.7.2 to 10.0.8.5 (probably the first time i tried to use the News app after the OC update, i don't remember exactly):

{
	"reqId": "5chAhEelBMwY7zB02g8p",
	"level": 3,
	"time": "2018-04-30T11:33:35+00:00",
	"remoteAddr": "myIpAtThatTime",
	"user": "david",
	"app": "index",
	"method": "PUT",
	"url": "\/cloud\/index.php\/apps\/news\/api\/v1-2\/items\/read\/multiple",
	"message": "Exception: {\"Exception\":\"OCP\\\\AppFramework\\\\Db\\\\DoesNotExistException\",\"Message\":\"Did expect one result but found none when executing: query \\\"SELECT `items`.* FROM `*PREFIX*news_items` `items` JOIN `*PREFIX*news_feeds` `feeds` ON `feeds`.`id` = `items`.`feed_id` AND `feeds`.`deleted_at` = 0 AND `feeds`.`user_id` = ? AND `items`.`id` = ? LEFT OUTER JOIN `*PREFIX*news_folders` `folders` ON `folders`.`id` = `feeds`.`folder_id` WHERE `feeds`.`folder_id` = 0 OR `folders`.`deleted_at` = 0 ORDER BY `items`.`id` DESC\\\"; parameters Array\\n(\\n    [0] => \\n    [1] => 45621\\n)\\n; limit \\\"\\\"; offset \\\"\\\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Mapper.php(379): OCP\\\\AppFramework\\\\Db\\\\Mapper->findOneQuery('SELECT `items`....', Array, NULL, NULL)\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/news\\\/db\\\/itemmapper.php(82): OCP\\\\AppFramework\\\\Db\\\\Mapper->findEntity('SELECT `items`....', Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/news\\\/db\\\/mysql\\\/itemmapper.php(67): OCA\\\\News\\\\Db\\\\ItemMapper->find(45621, NULL)\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/news\\\/service\\\/itemservice.php(152): OCA\\\\News\\\\Db\\\\Mysql\\\\ItemMapper->readItem(45621, true, 1525088015, NULL)\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/news\\\/controller\\\/itemapicontroller.php(177): OCA\\\\News\\\\Service\\\\ItemService->read(45621, true, NULL)\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/news\\\/controller\\\/itemapicontroller.php(193): OCA\\\\News\\\\Controller\\\\ItemApiController->setMultipleRead(true, Array)\\n#6 [internal function]: OCA\\\\News\\\\Controller\\\\ItemApiController->readMultiple(Array)\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(159): call_user_func_array(Array, Array)\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(89): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\News\\\\Controller\\\\ItemApiController), 'readMultiple')\\n#9 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(103): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\News\\\\Controller\\\\ItemApiController), 'readMultiple')\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(46): OC\\\\AppFramework\\\\App::main('ItemApiControll...', 'readMultiple', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#11 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(912): OC\\\\Route\\\\Router->match('\\\/apps\\\/news\\\/api\\\/...')\\n#14 \\\/var\\\/www\\\/owncloud\\\/index.php(55): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/public\\\/AppFramework\\\/Db\\\/Mapper.php\",\"Line\":294}"
}

Is it possible that this error somehow screwed up the News API?

@David-Development
Copy link
Member

Yes, I think the API is not working properly anymore.. The field "feeds" should contain all your feeds.

Is the web-interface of the news app still showing feeds etc.?

@David-Guillot
Copy link

Yes the web-interface is still working properly, this is probably why @minj and myself thought the issue was related to the Android app ;)

@minj
Copy link
Author

minj commented May 3, 2018

Should we refile this on the backend repo?

@David-Development
Copy link
Member

Since there is no maintainer for the backend app right now I doubt that anyone will fix anything there anytime soon. But it'll definitely be worth trying. Maybe you can try to disable/uninstall the news app completely and reinstall it first?

@David-Development
Copy link
Member

Did you find a workaround for this issue yet?

@minj
Copy link
Author

minj commented May 11, 2018

No, I plan to try looking at it this weekend

@David-Guillot
Copy link

David-Guillot commented May 19, 2018

After a bit of investigation it appears the problem is related to a recent change to the OC core: owncloud/core#30421: when debugging the simplest request on server-side, the UserId is not there. It's most likely related to the new SecurityMiddleware structure. I'll see if i can submit a fix.

@David-Guillot
Copy link

owncloud-archive/news#1030

@minj
Copy link
Author

minj commented Jun 24, 2018

@David-Guillot have you tried rebasing this on https://github.com/nextcloud/news ?

@David-Guillot
Copy link

Not yet ; it should be quite easy but i won't be able to test it with a live instance...

@David-Guillot
Copy link

@minj it was a bit more difficult on nextcloud/news, but for a good reason: that app is tested, and i had to keep the tests passing :) nextcloud/news#303

@David-Guillot
Copy link

@minj @David-Development can we consider this issue as closed? It's clearly not related to the Android app, and both server apps have their PRs (one is merged and the other project is archived).

@minj
Copy link
Author

minj commented Jul 5, 2018

I guess so. I'm testing the nextcloud/news on my server. Even though I had some issues both with building and during runtime, but nothing that I could not hack around.

The mobile app seems to sync properly now, though.

@David-Development
Copy link
Member

@David-Guillot thank you for looking into it and fixing this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants