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

[NC<=19] [v. 1.2.0] Error: Call to undefined method #80

Closed
lyn1337 opened this issue Jan 17, 2021 · 15 comments
Closed

[NC<=19] [v. 1.2.0] Error: Call to undefined method #80

lyn1337 opened this issue Jan 17, 2021 · 15 comments

Comments

@lyn1337
Copy link

lyn1337 commented Jan 17, 2021

Just updated to version unsplash 1.2.0 using occ and NC 19.0.7.1. This leads to the following error:

occ log:watch



   Error    index              Error: Call to undefined method                                2021-01-17T13:45:00+00:00
                               OC\AppFramework\DependencyInjection\DIContainer::get() at
                               apps/unsplash/lib/AppInfo/Application.php line 45
 
                                0. .../Application.php line 30
                                   OCA\Unsplash\AppInfo\Application->registerSystemEvents(
 
                                   )
                                1. .../routes.php line 9
                                   OCA\Unsplash\AppInfo\Application->__construct(
 
                                   )
                                2. lib/private/Route/Router.php line 380
                                   include_once("\/srv\/nextcloud\/apps\/unsplash\/ ... p")
                                3. .../Router.php line 151
                                   OC\Route\Router->requireRouteFile(
                                     "\/srv\/nextcl ... p",
                                     "unsplash"
                                   )
                                4. .../Router.php line 331
                                   OC\Route\Router->loadRoutes(
 
                                   )
                                5. .../URLGenerator.php line 83
                                   OC\Route\Router->generate("settings.Help.help", [])
                                6. .../NavigationManager.php line 204
                                   OC\URLGenerator->linkToRoute("settings.Help.help")
                                7. .../NavigationManager.php line 115
                                   OC\NavigationManager->init(
 
                                   )
                                8. .../TemplateLayout.php line 88
                                   OC\NavigationManager->getAll(
 
                                   )
                                9. .../OC_Template.php line 185
                                   OC\TemplateLayout->__construct("user", "mail")
                               10. .../TemplateResponse.php line 166
                                   OC_Template->fetchPage({debug:false,app-version: ... "})
                               11. .../Dispatcher.php line 124
                                   OCP\AppFramework\Http\TemplateResponse->render(
 
                                   )
                               12. .../App.php line 137
                                   OC\AppFramework\Http\Dispatcher->dispatch(
                                     OCA\Ma ... {},
                                     "index"
                                   )
                               13. .../RouteActionHandler.php line 47
                                   OC\AppFramework\App::main(
                                     "OCA\\Mail\\Controller ... r",
                                     "index",
                                     OC\AppFramework\Depend ... {},
                                     {_route:"mail.page.index"}
                                   )
                               14. <<closure>>
                                   OC\AppFramework\Routing\RouteActionHandler->__invoke(
                                     {_route:"mail.page.in ... "}
                                   )
                               15. lib/private/Route/Router.php line 297
                                   call_user_func(
                                     OC\AppFramework\Routing\RouteActi ... {},
                                     {_route:"mail.page.index"}
                                   )
                               16. lib/base.php line 1010
                                   OC\Route\Router->match("\/apps\/mail\/")
                               17. index.php line 37
                                   OC::handleRequest(
 
                                   )
 
@marius-wieschollek
Copy link
Contributor

I guess that did not exist in NC 19.
If you edit this line and replace "get" with "query", it should work.

@lyn1337
Copy link
Author

lyn1337 commented Jan 17, 2021

@marius-wieschollek That suppressed the err msg but the app doesn't seem to work.

@DJCrashdummy
Copy link

DJCrashdummy commented Jan 17, 2021

must confirm this issue for NC 19 (and 18 and even 17)!
i had to deactivate the app manually to get NC working again.

@lyn1337 lyn1337 changed the title [NC19] [v. 1.2.0] Error: Call to undefined method [NC18+19] [v. 1.2.0] Error: Call to undefined method Jan 17, 2021
marius-wieschollek added a commit that referenced this issue Jan 17, 2021
Signed-off-by: Marius David Wieschollek <git.public@mdns.eu>
@marius-wieschollek
Copy link
Contributor

You can try the PR i just opened. It should fix the issue.

@feligato
Copy link

Hi there, just want to add that, if you update via the web button, it would give you a Internal Server Error
image

Got to delete the app from the directory manually as said above.

Log

{"reqId":"YAYjNA-L1wqcoUp29Mb6ogAAAAM","level":3,"time":"2021-01-19T00:09:24+00:00","remoteAddr":"10.8.64.99","user":"remssmoc","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json","message":{"Exception":"Err$
{"reqId":"YAYjNGZ12Kb5FQiDRk8BlAAAAAI","level":3,"time":"2021-01-19T00:09:24+00:00","remoteAddr":"10.8.64.99","user":"C9C2E511-2FC4-4E43-A176-2472F8E1E7BA","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications?format=json"${"reqId":"YAYjNdCe5BtW9HIVFPiT3gAAAAE","level":3,"time":"2021-01-19T00:09:25+00:00","remoteAddr":"10.8.65.108","user":"74781310-35C5-48BF-B9EB-0741AF471E15","app":"no app in context","method":"GET","url":"/ocs/v2.php/core/navigation/apps?absolute=true&format=json","me${"reqId":"YAYjNbDOEtLekDTdSKRU-gAAAAQ","level":3,"time":"2021-01-19T00:09:25+00:00","remoteAddr":"190.160.40.211","user":"CBB4A189-C16C-4F3C-AFBB-2C1FC01578A4","app":"no app in context","method":"GET","url":"/ocs/v2.php/core/navigation/apps?absolute=true&format=json",${"reqId":"YAYjNzvUwVgc8X9T20jofwAAAAU","level":3,"time":"2021-01-19T00:09:27+00:00","remoteAddr":"181.43.78.36","user":"felipe","app":"index","method":"GET","url":"/","message":{"Exception":"Error","Message":"Call to undefined method OC\\AppFramework\\DependencyInject${"reqId":"YAYjNx19Yw-OuEzgFqktkAAAAAA","level":3,"time":"2021-01-19T00:09:28+00:00","remoteAddr":"181.43.78.36","user":"felipe","app":"index","method":"GET","url":"/index.php/js/core/merged-template-prepend.js?v=5f566a53","message":{"Exception":"Error","Message":"Call${"reqId":"YAYjONCe5BtW9HIVFPiT3wAAAAE","level":3,"time":"2021-01-19T00:09:28+00:00","remoteAddr":"181.43.78.36","user":"felipe","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":{"Exception":"Error","Message${"reqId":"YAYjOHpqCa3RWsa4DRK6TgAAAAg","level":3,"time":"2021-01-19T00:09:28+00:00","remoteAddr":"181.43.78.36","user":"felipe","app":"index","method":"GET","url":"/undefined/img/notifications.svg","message":{"Exception":"Exception","Message":"The requested uri(/undef$

@nmatton
Copy link

nmatton commented Jan 19, 2021

Exact same issue, updated from web interface
Got the following log

`{"reqId":"Ig1xTf41SeQc3pgecN3Y","level":3,"time":"2021-01-19T09:12:25+00:00","remoteAddr":"192.168.0.20","user":"nicolas","app":"index","method":"GET","url":"/","message":{"Exception":"Error","Message":"Call to undefined method OC\AppFramework\DependencyInjection\DIContainer::get()","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/unsplash/lib/AppInfo/Application.php","line":30,"function":"registerSystemEvents","class":"OCA\Unsplash\AppInfo\Application","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/unsplash/appinfo/routes.php","line":9,"function":"__construct","class":"OCA\Unsplash\AppInfo\Application","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":353,"args":["/var/www/nextcloud/apps/unsplash/appinfo/routes.php"],"function":"include_once"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":152,"function":"requireRouteFile","class":"OC\Route\Router","type":"->","args":["/var/www/nextcloud/apps/unsplash/appinfo/routes.php","unsplash"]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":270,"function":"loadRoutes","class":"OC\Route\Router","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\Route\Router","type":"->","args":[""]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/apps/unsplash/lib/AppInfo/Application.php","Line":45,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OPR/73.0.3856.344","version":"18.0.4.2"}

Had to disable using terminal
sudo -u www-data php /var/www/nextcloud/occ app:disable unsplash

Running Nextcloud 17.0.2.1
PHP Version : 7.3.11

@alanqchen
Copy link

PR #81 does appear to fix this issue for me, though the 404 image is still displayed (issue #72).

@lyn1337 lyn1337 changed the title [NC18+19] [v. 1.2.0] Error: Call to undefined method [NC<=19] [v. 1.2.0] Error: Call to undefined method Jan 19, 2021
@rainerzufall
Copy link

Also got an internal server error after updating to unsplash 1.2. on NC 19.0.3. My Nextcloud Provider Hetzner investigated and had to deactivate unsplash for me, because I could not access my NC admin panel, although I was logged in.

newhinton added a commit that referenced this issue Jan 19, 2021
#80 Restore compatibility with Nextcloud 14 - 19
@newhinton
Copy link
Contributor

I just released the hotfix, sorry for the inconveniences! This one slipped. Please report back if you have further issues!

@lyn1337
Copy link
Author

lyn1337 commented Jan 19, 2021

Just tested v. 1.2.1 from the releases on my NC 19 installation. Does seem to work now.

@lyn1337
Copy link
Author

lyn1337 commented Jan 19, 2021

@rainerzufall Folks without access to the command line tool or a similar level can actually break their entire NC installation because of incompatibilities, just by updating or installing an app. 😬

@rainerzufall
Copy link

rainerzufall commented Jan 19, 2021

@lyn1337 you are right. 😔 I usually always wait while after new releases of apps to minimise this risk. I obviously didn't do it this time. 😖 I will definitely wait for some more confirmations that it works before I activate the app again.

Thanks to marius-wieschollek and newhinton for fixing it so quickly!

@DJCrashdummy
Copy link

@feligato, @rainerzufall & @lyn1337: you can actually deactivate every app manually by simply setting appid->enabled in the table NC_appconfig from yes to no, no mater if done by commandline or GUI (which also most shared hoster provide, even if you don't have ssh).

@DJCrashdummy
Copy link

Just tested v. 1.2.1 from the releases on my NC 19 installation. Does seem to work now.

i also tested version 1.2.1 from the store with NC 19 (and 18 & 17)... and all 3 still work. 😉

@lyn1337
Copy link
Author

lyn1337 commented Jan 19, 2021

@DJCrashdummy While that's a method I'm not convinced it's making it any easier or more accessible to some users.

Looks like I can close this issue now, thanks everyone involved!

@lyn1337 lyn1337 closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants