Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Import Failed Exception: on some recipe imports #188

Open
krisgesling opened this issue Apr 5, 2023 · 6 comments
Open

Import Failed Exception: on some recipe imports #188

krisgesling opened this issue Apr 5, 2023 · 6 comments
Assignees
Labels
bug Something isn't working feedback Need feedback otherwise the issue will be closed

Comments

@krisgesling
Copy link

Hey, first wanted to say thanks for the awesome app, absolutely loving it so far!

Issue description

When importing some recipes using the Android app, I'm seeing the following error displayed as a red bar at the bottom of the screen:

Import Failed Exception: type 'Null' is not a subtype of type 'String' in type cast

Without re-importing - navigating to the list of recipes shows that the initial import was successful.

I do not get this error if using the import function through the NextCloud Cookbook web interface eg https://exampledomain.com/apps/cookbook/#/

Example recipe:

Error screenshot

Screenshot_20230405-105821

Additional details

  • Google Pixel 7
  • App from Play store - last updated 25 March 2023 (v0.7.9 according to the changelog)
  • Nextcloud v25.0.3
  • Cookbook app v0.10.2
@Leptopoda Leptopoda self-assigned this Apr 5, 2023
@Leptopoda
Copy link
Collaborator

This should already be fixed on the develop branch but unfortunately a few restructures prevent a new release at the moment.

I'll add unit tests to make sure this can't happen again and hope that a new release is ready in one to two weeks.

@Leptopoda
Copy link
Collaborator

Ok never mind I can't reproduce this behavior on the master branch so far.
further information is welcome :)

@Leptopoda Leptopoda added bug Something isn't working feedback Need feedback otherwise the issue will be closed labels Apr 5, 2023
@krisgesling
Copy link
Author

Hmm, no repro = likely something in my setup then...

Some other urls that returned the same error:

Here's the error and preceding warnings from the NextCloud server logs for the capsicum recipe - IP and user have been redacted. Each of the urls above returned the same error, with slightly different libxml warnings as you'd expect. My assumption is that these warnings are expected and not related to the real issue but I'm including them for completeness.

[PHP] Error: Error: Undefined array key "id" at /var/www/nextcloud/apps/cookbook/lib/Helper/Filter/JSON/RecipeIdTypeFilter.php#15 at <<closure>>

 0. /var/www/nextcloud/apps/cookbook/lib/Helper/Filter/JSON/RecipeIdTypeFilter.php line 15
    OC\Log\ErrorHandler::onError()
 1. /var/www/nextcloud/apps/cookbook/lib/Helper/Filter/JSONFilter.php line 63
    OCA\Cookbook\Helper\Filter\JSON\RecipeIdTypeFilter->apply()
 2. /var/www/nextcloud/apps/cookbook/lib/Service/RecipeService.php line 177
    OCA\Cookbook\Helper\Filter\JSONFilter->apply()
 3. /var/www/nextcloud/apps/cookbook/lib/Service/RecipeService.php line 324
    OCA\Cookbook\Service\RecipeService->checkRecipe()
 4. /var/www/nextcloud/apps/cookbook/lib/Controller/Implementation/RecipeImplementation.php line 222
    OCA\Cookbook\Service\RecipeService->downloadRecipe()
 5. /var/www/nextcloud/apps/cookbook/lib/Controller/RecipeController.php line 85
    OCA\Cookbook\Controller\Implementation\RecipeImplementation->import()
 6. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 225
    OCA\Cookbook\Controller\RecipeController->import()
 7. /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php line 133
    OC\AppFramework\Http\Dispatcher->executeController()
 8. /var/www/nextcloud/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
 9. /var/www/nextcloud/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
10. /var/www/nextcloud/lib/base.php line 1047
    OC\Route\Router->match()
11. /var/www/nextcloud/index.php line 36
    OC::handleRequest()

POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00

This was preceded by the following warnings:

[cookbook] Warning: libxml: Error 76 occurred while parsing https://www.taste.com.au/recipes/slow-roasted-capsicums-filled-mushroom-feta/e413060d-6aee-47f4-adbe-d0e5b8223f60. First time it occurred in line 1453 and column 23: Unexpected end tag : div


POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00
[cookbook] Warning: libxml: Error 23 occurred 51 times while parsing https://www.taste.com.au/recipes/slow-roasted-capsicums-filled-mushroom-feta/e413060d-6aee-47f4-adbe-d0e5b8223f60. First time it occurred in line 688 and column 119: htmlParseEntityRef: expecting ';'


POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00
[cookbook] Warning: libxml: Error 42 occurred while parsing https://www.taste.com.au/recipes/slow-roasted-capsicums-filled-mushroom-feta/e413060d-6aee-47f4-adbe-d0e5b8223f60. First time it occurred in line 197 and column 203: Attribute cooker redefined


POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00
[cookbook] Warning: libxml: Error 801 occurred 34 times while parsing https://www.taste.com.au/recipes/slow-roasted-capsicums-filled-mushroom-feta/e413060d-6aee-47f4-adbe-d0e5b8223f60. First time it occurred in line 122 and column 24: Tag nav invalid


POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00
[cookbook] Warning: libxml: Error 68 occurred 29 times while parsing https://www.taste.com.au/recipes/slow-roasted-capsicums-filled-mushroom-feta/e413060d-6aee-47f4-adbe-d0e5b8223f60. First time it occurred in line 8 and column 61: htmlParseEntityRef: no name


POST /apps/cookbook/webapp/import
from REDACTED by REDACTED at 2023-04-05T01:32:05+00:00

@Syntoxr
Copy link

Syntoxr commented Jun 17, 2023

Same for me.
I've only imported from https://chefkoch.de for now but it's the same for every recipe.

  • Samsung galaxyA52
  • Downloaded from FDroid
  • NC version 26.0.2
  • NC app version 0.10.2
  • Android app version 0.7.9

@Leptopoda
Copy link
Collaborator

Ok Thanks for the input

I'll have another look

@Michele64
Copy link

Still the same issue.....
fresh install of Lineageos14
Screenshot_20240522-180212_Nextcloud Cookbook

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working feedback Need feedback otherwise the issue will be closed
Projects
None yet
Development

No branches or pull requests

4 participants