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

Nextcloud Realease 26 beta4 not supported #1050

Closed
frake65 opened this issue Feb 23, 2023 · 15 comments · Fixed by #1055
Closed

Nextcloud Realease 26 beta4 not supported #1050

frake65 opened this issue Feb 23, 2023 · 15 comments · Fixed by #1055

Comments

@frake65
Copy link

frake65 commented Feb 23, 2023

Hello Paul,
with Nextcloud 26 beta 4 (as well as before with the other 26 betas) when I call the app, it instantly generates an internal server error- resulting from following message. - As far as I understand, OCP appFramework Db.mapper is not available in this release. - Does this make any sense to you?
Is there any chance, you could have a look into this issue, as I guess the behaviour woud not change for the final release of NC26?
Thank you very much and best regards!
Frank

{"reqId":"mwutPSUwVIbXFnod64hQ","level":3,"time":"2023-02-23T11:41:39+00:00","remoteAddr":"87.179.19.70","user":"frank","app":"index","method":"GET","url":"/index.php/apps/music/","message":"Class "OCP\AppFramework\Db\Mapper" not found","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","version":"26.0.0.6","exception":{"Exception":"Error","Message":"Class "OCP\AppFramework\Db\Mapper" not found","Code":0,"Trace":[{"file":"/nc/data/nextcloud/lib/composer/composer/ClassLoader.php","line":578,"function":"include"},{"file":"/nc/data/nextcloud/lib/composer/composer/ClassLoader.php","line":432,"function":"Composer\Autoload\{closure}","class":"Composer\Autoload\ClassLoader","type":"::","args":["*** sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/apps/music/lib/App/Music.php","line":351,"function":"loadClass","class":"Composer\Autoload\ClassLoader","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":171,"function":"OCA\Music\App\{closure}","class":"OCA\Music\App\Music","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":138,"function":"offsetGet","class":"Pimple\Container","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":487,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/apps/music/lib/App/Music.php","line":608,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":171,"function":"OCA\Music\App\{closure}","class":"OCA\Music\App\Music","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":138,"function":"offsetGet","class":"Pimple\Container","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":487,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":65,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":331,"function":"get","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":171,"function":"OC\AppFramework\DependencyInjection\{closure}","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":138,"function":"offsetGet","class":"Pimple\Container","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":487,"function":"query","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":465,"function":"queryNoFallback","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":65,"function":"query","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":188,"function":"get","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":171,"function":"OC\AppFramework\DependencyInjection\{closure}","class":"OC\AppFramework\DependencyInjection\DIContainer","type":"->","args":[" sensitive parameters replaced "]},{"file":"/nc/data/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php","line":122,"function":"OC\AppFramework\Utility\{closure}","class":"OC\AppFramework\Utility\SimpleContainer","type":"->","args":[" sensitive parameters replaced ***"]},{"file":"/nc/data/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":221,"function":"offsetGet","class":"Pimple\Container","type":"->"},{"file":"/nc/data/nextcloud/lib/private/AppFramework/App.php","line":171,"function":"offsetGet","class":"OC\AppFramework\Utility\SimpleContainer","type":"->"},{"file":"/nc/data/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/nc/data/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/nc/data/nextcloud/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/nc/data/nextcloud/apps/music/lib/Db/AmpacheSessionMapper.php","Line":23,"CustomMessage":"--"}}
{"reqId":"mwutPSUwVIbXFnod64hQ","level":3,"time":"2023-02-23T11:41:39+00:00","remoteAddr":"87.179.19.70","user":"frank","app":"cssresourceloader","method":"GET","url":"/index.php/apps/music/","message":"Could not find resource core/css/styles.css to load","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","version":"26.0.0.6","data":{"app":"cssresourceloader"}}
{"reqId":"mwutPSUwVIbXFnod64hQ","level":3,"time":"2023-02-23T11:41:39+00:00","remoteAddr":"87.179.19.70","user":"frank","app":"cssresourceloader","method":"GET","url":"/index.php/apps/music/","message":"Could not find resource core/css/header.css to load","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/111.0","version":"26.0.0.6","data":{"app":"cssresourceloader"}}

@paulijar
Copy link
Collaborator

paulijar commented Feb 27, 2023

Yes, I have read it from somewhere that NC26 will drop the base class OCP\AppFramework\Db\Mapper. Unfortunately, the Music app relies heavily on this class and migrating away from it may not be a simple task. Also, I suspect that the replacement for this might not be available on ownCloud (I haven't checked, though). If this is the case, then supporting both OC and NC with a single code line would become impossible. As I'm currently also busy with other things in my life, there's a high risk that NC26 cannot be supported by the Music app in the near future.

@meizfl
Copy link

meizfl commented Mar 8, 2023

fixed it. you need to add the Mapper.php file from nextcloud 25 to the /nextcloud/lib/public/AppFramework/Db/ directory in nextcloud 26 and everything will work.

@JoshuaPettus
Copy link

JoshuaPettus commented Mar 10, 2023

That's very sad news :( At least there may be a work around if meizuflym is still correct at release...

@meizuflym you will probably have to ignore the security checks...NC really doesn't like extra files in my experience.

@paulijar
Copy link
Collaborator

Okay, if the work-around suggested by @meizuflym worked, then that just gave me an idea: We could provide an own copy of Mapper.php in another namespace as part of the Music app. Then we would just need to change all the references to the class to use the other namespace. With this approach, we probably could provide support for both OC and NC without major refactoring.

The downside is that the Mapper.php most likely uses some internal APIs of ownCloud/Nextcloud, meaning that the compatibility may break again in any future release of NC, and then more work is needed again.

@JoshuaPettus
Copy link

JoshuaPettus commented Mar 10, 2023

Maybe the new NC way will be viable for you by then?

OTOH fixing all of NCs incompatibilities on each release seems kinda standard procedure at this point...

@ernolf
Copy link

ernolf commented Mar 21, 2023

@meizuflym
fixed it. you need to add the Mapper.php file from nextcloud 25 to the /nextcloud/lib/public/AppFramework/Db/ directory in nextcloud 26 and everything will work.

I could activate the app without crash (internal server error), got the little player back at the bottom of the folder, can playback files from folder as before but it is not possible to open the app itself in its own window.

I administer an instance for people in music industry, they need this app (the little player that works with this workaround) as air to breath. Would be very sad, to loose it.

@ernolf
Copy link

ernolf commented Mar 21, 2023

Unfortunately, I had to deactivate the app, even with the workaround, because strange side effects occur at all corners and ends. For example, it is no longer possible to delete files in the web frontend.

@AubinF
Copy link

AubinF commented Mar 22, 2023

Just upgraded to NC26 and now the music app is broken on my instance. So sad... Music is a great app, especially the subsonic support (the built-in music player in the NC app for android is quite basic, so subsonic support is a must).

@JoshuaPettus
Copy link

JoshuaPettus commented Mar 22, 2023

For me Music is a critical application, I will not be upgrading till paulijar says he is good to go no matter how long it takes. Perhaps you can roll back from backups? Myself, I make use of LVM snapshots with every major upgrade. Makes it a lot easier to rollback if something is broken which has happened to me more than once.

@AubinF
Copy link

AubinF commented Mar 22, 2023

@JoshuaPettus 100%. I would not have upgraded to NC26 so soon if I'd known it would kill the app I use the most :/
Annoyingly I keep the data backed up automatically but not the system. Thanks for the LVM pointer. I will set it up before the next upgrades.

@JoshuaPettus
Copy link

JoshuaPettus commented Mar 22, 2023

@AubinF Oof, my backup solution is remote too. Though i use ssh and rsync to restore files. LVM or BTRFS are both good for snapshoting (maybe you already have btrfs when you installed the system?). It can be a big job to migrate on a live system and takes a bit of reserch and planning. Snaphots are also better for complete backups as rsync doesnt work very well with active files.

@blizzz
Copy link
Contributor

blizzz commented Mar 22, 2023

ownCloud does not have a OCP\AppFramework\Db\Mapper. Nextcloud's implementation does only have IDBConneciton as dependency, plus a few Exception classes. It's easy actually easy to carry it over… PR incoming.

@AubinF
Copy link

AubinF commented Mar 23, 2023

Thanks! @blizzz 💪

@john-2000
Copy link

I have also tested it and it works in my case

@paulijar
Copy link
Collaborator

paulijar commented Apr 1, 2023

The support for NC26 has now been released in Music v1.8.2.

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

Successfully merging a pull request may close this issue.

8 participants