cookbook icon indicating copy to clipboard operation
cookbook copied to clipboard

”Unknown answer return from server, see log”

Open faxotherapy opened this issue 2 years ago • 4 comments

Description I imported receipe from Marmiton. Now, when I want to edit it, I got the following error message: “unknown answer return from server, see log”.

[index] Error: Exception: OCA\Cookbook\Service\ThumbnailService::createThumbnail(): Return value must be of type string, null returned in file '/var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Service/ThumbnailService.php' line 82 at <<closure>>

0. /snap/nextcloud/38457/htdocs/lib/private/AppFramework/App.php line 183
   OC\AppFramework\Http\Dispatcher->dispatch()
1. /snap/nextcloud/38457/htdocs/lib/private/Route/Router.php line 315
   OC\AppFramework\App::main()
2. /snap/nextcloud/38457/htdocs/lib/base.php line 1068
   OC\Route\Router->match()
3. /snap/nextcloud/38457/htdocs/index.php line 36
   OC::handleRequest()

Caused by:

TypeError: OCA\Cookbook\Service\ThumbnailService::createThumbnail(): Return value must be of type string, null returned at <<closure>>

 0. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Service/ThumbnailService.php line 48
    OCA\Cookbook\Service\ThumbnailService->createThumbnail("*** sensitive parameters replaced ***")
 1. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Helper/ImageService/ImageGenerationHelper.php line 56
    OCA\Cookbook\Service\ThumbnailService->getThumbnail()
 2. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Helper/ImageService/ThumbnailFileHelper.php line 96
    OCA\Cookbook\Helper\ImageService\ImageGenerationHelper->generateThumbnail()
 3. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Helper/ImageService/ThumbnailFileHelper.php line 117
    OCA\Cookbook\Helper\ImageService\ThumbnailFileHelper->recreateSingleThumbnail("*** sensitive parameters replaced ***")
 4. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Service/ImageService.php line 137
    OCA\Cookbook\Helper\ImageService\ThumbnailFileHelper->recreateThumbnails("*** sensitive parameters replaced ***")
 5. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Service/RecipeService.php line 293
    OCA\Cookbook\Service\ImageService->setImageData()
 6. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Controller/Implementation/RecipeImplementation.php line 111
    OCA\Cookbook\Service\RecipeService->addRecipe()
 7. /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Controller/RecipeController.php line 48
    OCA\Cookbook\Controller\Implementation\RecipeImplementation->update("*** sensitive parameters replaced ***")
 8. /snap/nextcloud/38457/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 230
    OCA\Cookbook\Controller\RecipeController->update("*** sensitive parameters replaced ***")
 9. /snap/nextcloud/38457/htdocs/lib/private/AppFramework/Http/Dispatcher.php line 137
    OC\AppFramework\Http\Dispatcher->executeController()
10. /snap/nextcloud/38457/htdocs/lib/private/AppFramework/App.php line 183
    OC\AppFramework\Http\Dispatcher->dispatch()
11. /snap/nextcloud/38457/htdocs/lib/private/Route/Router.php line 315
    OC\AppFramework\App::main()
12. /snap/nextcloud/38457/htdocs/lib/base.php line 1068
    OC\Route\Router->match()
13. /snap/nextcloud/38457/htdocs/index.php line 36
    OC::handleRequest()

PUT /index.php/apps/cookbook/webapp/recipes/9344

I allso get the following error message:

[PHP] Error: Undefined array key "id" at /var/snap/nextcloud/38457/nextcloud/extra-apps/cookbook/lib/Helper/Filter/JSON/RecipeIdTypeFilter.php#15

POST /index.php/apps/cookbook/webapp/import

Reproduction Steps to reproduce the behavior:

  1. Import recipe from Marmiton
  2. Save and exit.
  3. Come back to the recipe.
  4. Edit it
  5. Then, save.

Expected behavior After saving, the app should say “Saved”

Actual behavior Only one pop-up window saying “Unknown answer return from server, see log”

Browser Thorium

Versions Nextcloud server version: 27.1.3 Cookbook version: 0.10.2 Database system: MySQL


Thank you for your help.

faxotherapy avatar Nov 18 '23 16:11 faxotherapy

Could you please share a link to the recipe? I would like to have a look of I can access it directly.

christianlupus avatar Nov 18 '23 17:11 christianlupus

Here it is: https://www.marmiton.org/recettes/recette_gratin-dauphinois_13809.aspx Thank you.

faxotherapy avatar Nov 18 '23 17:11 faxotherapy

Hi, I did a new test, using Firefox and no problem at all. I was using Chromium-based Thorium browser. Initially I did not think that a browser could affect the behavior of a web app. Clearly, Thorium affects how Cookbook behaves. You can, for example, manually create a new receipe, add a few instructions, then SAVE, and notice that the last one of the instruction set is never saved. Using Thorium browser, this happens consistently. Maybe Thorium is a bit too much optimised… Falling back on Firefox, no issue. I added some more recipes with Firefox and everything is OK.

faxotherapy avatar Nov 19 '23 11:11 faxotherapy

I have the same problem except it happend when I try to save a new recipe, that I created manualy in the web interface. I also use the Firefox browser.

GambaJo avatar Jan 15 '24 10:01 GambaJo