travelpayouts / flights-api-project

Flights search reference project based on PHP
Other
34 stars 31 forks source link

CreateListFromArrayLike Error #4

Open gr8rck opened 6 years ago

gr8rck commented 6 years ago

Hello,

This is not working. I've installed the demo, run composer and every time we go to try and search to return ticket results we get "Looking for tickets, please wait..."

This is the error being generated in console:

vendor.bundle.js:1 TypeError: CreateListFromArrayLike called on non-object at app.bundle.js:1 at processQueue (vendor.bundle.js:1) at vendor.bundle.js:1 at Scope.$digest (vendor.bundle.js:1) at Scope.$apply (vendor.bundle.js:1) at done (vendor.bundle.js:1) at completeRequest (vendor.bundle.js:1) at XMLHttpRequest.xhr.onload (vendor.bundle.js:1) "Possibly unhandled rejection: {}"

Please advise.

Thanks, gr8rck

magbaba commented 6 years ago

I have the same issue and saw that in the demo it uses the path /flights/search while the one we are running uses /search instead, without the /flights part. If we add it it will return a 404 error

codeqasim commented 5 years ago

Hello Team

I have done all the steps but it is showing many errors please see below and suggest your best solution thanks.

An Error occurred while handling another error: Exception: It seems that you are forgot to compile your frontend files with webpack. Check documentation at https://github.com/travelpayouts/flights-api-project in /home/phpnet/public_html/public/tp/travel/components/WebpackAssetBundle.php:65 Stack trace:

0 /home/phpnet/public_html/public/tp/travel/components/WebpackAssetBundle.php(23): app\components\WebpackAssetBundle->getWebpackAssets()

1 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/BaseObject.php(109): app\components\WebpackAssetBundle->init()

2 [internal function]: yii\base\BaseObject->__construct(Array)

3 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/di/Container.php(376): ReflectionClass->newInstanceArgs(Array)

4 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/di/Container.php(156): yii\di\Container->build('app\assets\AppA...', Array, Array)

5 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/BaseYii.php(349): yii\di\Container->get('app\assets\AppA...', Array, Array)

6 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/AssetManager.php(264): yii\BaseYii::createObject(Array)

7 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/AssetManager.php(237): yii\web\AssetManager->loadBundle('app\assets\AppA...', Array, true)

8 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/View.php(286): yii\web\AssetManager->getBundle('app\assets\AppA...')

9 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/AssetBundle.php(125): yii\web\View->registerAssetBundle('app\assets\AppA...')

10 /home/phpnet/public_html/public/tp/travel/views/layouts/main.php(10): yii\web\AssetBundle::register(Object(yii\web\View))

11 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/View.php(348): require('/home/phpnet/pu...')

12 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/View.php(257): yii\base\View->renderPhpFile('/home/phpnet/pu...', Array)

13 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Controller.php(399): yii\base\View->renderFile('/home/phpnet/pu...', Array, Object(app\controllers\SiteController))

14 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Controller.php(385): yii\base\Controller->renderContent('<div class="sit...')

15 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/ErrorAction.php(139): yii\base\Controller->render('error', Array)

16 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/ErrorAction.php(118): yii\web\ErrorAction->renderHtmlResponse()

17 [internal function]: yii\web\ErrorAction->run()

18 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)

19 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array)

20 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Module.php(528): yii\base\Controller->runAction('error', Array)

21 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/ErrorHandler.php(108): yii\base\Module->runAction('site/error')

22 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/ErrorHandler.php(111): yii\web\ErrorHandler->renderException(Object(yii\web\NotFoundHttpException))

23 [internal function]: yii\base\ErrorHandler->handleException(Object(yii\web\NotFoundHttpException))

24 {main}

Previous exception: yii\base\InvalidRouteException: Unable to resolve the request "public/tp/travel/web/". in /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Module.php:537 Stack trace:

0 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/Application.php(103): yii\base\Module->runAction('public/tp/trave...', Array)

1 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))

2 /home/phpnet/public_html/public/tp/travel/web/index.php(13): yii\base\Application->run()

3 {main}

Next yii\web\NotFoundHttpException: Page not found. in /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/web/Application.php:115 Stack trace:

0 /home/phpnet/public_html/public/tp/travel/vendor/yiisoft/yii2/base/Application.php(386): yii\web\Application->handleRequest(Object(yii\web\Request))

1 /home/phpnet/public_html/public/tp/travel/web/index.php(13): yii\base\Application->run()

2 {main}