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

Internet radio export Unexpected error #822

Closed
poltrian opened this issue Feb 8, 2021 · 6 comments
Closed

Internet radio export Unexpected error #822

poltrian opened this issue Feb 8, 2021 · 6 comments
Labels

Comments

@poltrian
Copy link

poltrian commented Feb 8, 2021

I Try to Export my list. Goto Export in a Files and it shows Unexpected error

@paulijar
Copy link
Collaborator

paulijar commented Feb 8, 2021

Thanks for the report. When this happens, can you find any more information from nextcloud.log or owncloud.log (depending on which cloud you use)?

@poltrian
Copy link
Author

poltrian commented Feb 9, 2021

Hope that helps.

Nextcloud 20.0.7 PHP 7.4 Ubuntu 20.04

  Exception: Argument 3 passed to OCA\Music\Controller\RadioApiController::exportAllToFile() must be of the type string, int given, called in /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 169/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 152: OC\AppFramework\Http\Dispatcher->dispatch()/var/www/html/nextcloud/lib/private/Route/Router.php - line 309: OC\AppFramework\App::main()/var/www/html/nextcloud/lib/base.php - line 1008: OC\Route\Router->match()/var/www/html/nextcloud/index.php - line 37: OC::handleRequest()Verursacht durchTypeError: Argument 3 passed to OCA\Music\Controller\RadioApiController::exportAllToFile() must be of the type string, int given, called in /var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 169/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 169: OCA\Music\Controller\RadioApiController->exportAllToFile()/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 100: OC\AppFramework\Http\Dispatcher->executeController()/var/www/html/nextcloud/lib/private/AppFramework/App.php - line 152: OC\AppFramework\Http\Dispatcher->dispatch()/var/www/html/nextcloud/lib/private/Route/Router.php - line 309: OC\AppFramework\App::main()/var/www/html/nextcloud/lib/base.php - line 1008: OC\Route\Router->match()/var/www/html/nextcloud/index.php - line 37: OC::handleRequest()

@MattRC7
Copy link

MattRC7 commented Feb 9, 2021

I also encountered this issue. I noticed when I entered the folder where I wanted to export the playlist to, it said there were no files in there, even though I double-checked and I have several .pls files in that folder. It still let me click "Choose" without selecting a file, and that's when the Unexpected error occurred.

Hope this helps:

image

@paulijar
Copy link
Collaborator

paulijar commented Feb 9, 2021

Okay, I could reproduce the error now on NC 20.0.7. The API of the Nextcloud file picker seems to have changed a bit, and this now breaks the exporting functionality. The problem affects also playlist exporting. I'm not sure, when has it broken, but I think I still successfully used export on some earlier hotfix of NC20.

@MattRC7 Not showing any files there is normal, we are using the filepicker dialog in folder selection mode. Hence, it shows only folders and no files. The text "No files in here" is quite misleading, though.

@paulijar paulijar added the Bug label Feb 9, 2021
paulijar added a commit that referenced this issue Feb 12, 2021
There has always been a small API difference on the filepicker between
ownCloud and Nextcloud, but this was not taken into account in the
Music app. However, the use of the picker had worked correctly simply
by chance (*) up until Music 1.0.0 added some argument type declarations
on the back-end. Coupled by the activation of the strict typing in NC14,
this made the bug very visible and broke the playlist exporting
functionality.

(*) We were passing integer 1 as argument `oncollision` while it was
supposed to be the string "abort". However, any unknown argument
values had the same handling as the string "abort", hiding the bug as
long as no-one was checking the argument types.

refs #822
@paulijar
Copy link
Collaborator

Upon closer examination, it was revealed that the playlist and radio exporting is broken on Music v1.0.0 with all the supported Nextcloud versions except 13. There is an API difference between ownCloud and Nextcloud, which I hadn't taken into account, but the exporting had worked also on NC regardless, simply by chance. On v1.0.0, we ran out of luck and the bug became apparent.

Fix for this is now implemented, and I'm planning to make a hotfix release soon.

@paulijar
Copy link
Collaborator

Hotfix v1.0.1 for this issue is now released to the Nextcloud app store.

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

No branches or pull requests

3 participants