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

Import error #243

Closed
jerolomb opened this issue Jan 24, 2020 · 2 comments
Closed

Import error #243

jerolomb opened this issue Jan 24, 2020 · 2 comments
Assignees
Labels
bug

Comments

@jerolomb
Copy link
Contributor

@jerolomb jerolomb commented Jan 24, 2020

Describe the bug
In some case there is an error when trying to import from 2.9.9 to 2.9.9

To Reproduce
Steps to reproduce the behavior:

  1. Go to your favorite analysis which contains information risks no needs to be huge :
    image

  2. Make an export of the whole analysis with or without assessment

  3. Import it in a new analysis

  4. See error

Expected behavior
Proper import without error

Desktop (please complete the following information):

Questions Answers
Type of issue Bug
OS version (server) Debian, Ubuntu, ...
OS version (client) Win10
PHP version ?
MONARC version / git hash 2.9.9,
Browser Firefox

Additional context
Tested on several environment
Possibly unhandled rejection: {"data":{"errors":[{"message":"Label is required","error":"error-exception","exception":{"class":"Monarc\Core\Exception\Exception","file":"/var/lib/monarc/fo/vendor/monarc/core/src/Model/Entity/AbstractEntity.php","line":197,"message":"Label is required","stacktrace":"#0 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrAssetService.php(183): Monarc\Core\Model\Entity\AbstractEntity->exchangeArray(Array)\n#1 /var/lib/monarc/fo/vendor/monarc/core/src/Service/ObjectExportService.php(183): Monarc\FrontOffice\Service\AnrAssetService->importFromArray('2.9.9', Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), Array)\n#2 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrInstanceService.php(173): Monarc\Core\Service\ObjectExportService->importFromArray(Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), 'merge', Array)\n#3 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrInstanceService.php(1055): Monarc\FrontOffice\Service\AnrInstanceService->importFromArray(Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), 5687, 'merge', false, Array)\n#4 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrInstanceService.php(1055): Monarc\FrontOffice\Service\AnrInstanceService->importFromArray(Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), 5686, 'merge', false, Array)\n#5 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrInstanceService.php(1579): Monarc\FrontOffice\Service\AnrInstanceService->importFromArray(Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), NULL, 'merge', false, Array, true)\n#6 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Service/AnrInstanceService.php(88): Monarc\FrontOffice\Service\AnrInstanceService->importFromArray(Array, Object(DoctrineORMModule\Proxy\CG\Monarc\FrontOffice\Model\Entity\Anr), NULL, 'merge', false, Array, true)\n#7 /var/lib/monarc/fo/vendor/monarc/frontoffice/src/Controller/ApiAnrImportAbstractController.php(39): Monarc\FrontOffice\Service\AnrInstanceService->importFromFile(227, Array)\n#8 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/Controller/AbstractRestfulController.php(471): Monarc\FrontOffice\Controller\ApiAnrImportAbstractController->create(Array)\n#9 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/Controller/AbstractRestfulController.php(429): Zend\Mvc\Controller\AbstractRestfulController->processPostData(Object(Zend\Http\PhpEnvironment\Request))\n#10 /var/lib/monarc/fo/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\Controller\AbstractRestfulController->onDispatch(Object(Zend\Mvc\MvcEvent))\n#11 /var/lib/monarc/fo/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))\n#12 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(106): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))\n#13 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/Controller/AbstractRestfulController.php(313): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))\n#14 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/DispatchListener.php(138): Zend\Mvc\Controller\AbstractRestfulController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))\n#15 /var/lib/monarc/fo/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))\n#16 /var/lib/monarc/fo/vendor/zendframework/zend-eventmanager/src/EventManager.php(179): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent), Object(Closure))\n#17 /var/lib/monarc/fo/vendor/zendframework/zend-mvc/src/Application.php(332): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))\n#18 /var/lib/monarc/fo/public/index.php(34): Zend\Mvc\Application->run()\n#19 {main}"}}]},"status":412,"config":{"method":"POST","transformRequest":[null],"transformResponse":[null],"jsonpCallbackParam":"callback","url":"api/client-anr/227/instances/import","data":{"mode":"merge","file":[{}],"password":""},"_isDigested":true,"_chunkSize":null,"headers":{"Accept":"application/json, text/plain, /","token":"mysecrettoken"},"_deferred":{"promise":{}},"cached":false},"statusText":"Precondition Failed","xhrStatus":"complete"}

testexport(2).json.txt

@cedricbonhomme

This comment has been minimized.

Copy link
Member

@cedricbonhomme cedricbonhomme commented Jan 27, 2020

@ruslanbaidan

This comment has been minimized.

@ruslanbaidan ruslanbaidan added this to To do in MONARC Development Overview via automation Jan 29, 2020
@ruslanbaidan ruslanbaidan self-assigned this Jan 29, 2020
@ruslanbaidan ruslanbaidan moved this from To do to Deployed on formation in MONARC Development Overview Jan 29, 2020
MONARC Development Overview automation moved this from Deployed on formation to Done (deployed on prod) Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
MONARC Development Overview
  
Done (deployed on prod)
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.