cartalyst / demo-api

Demo of Cartalyst's API V2 for Laravel 4.1+
Other
28 stars 10 forks source link

SentinelServiceProvider Config problem #2

Closed websemantics closed 9 years ago

websemantics commented 9 years ago

I'm getting this error right after composer install

{"error":{"type":"ErrorException","message":"Argument 1 passed to Cartalyst\Sentinel\Laravel\SentinelServiceProvider::configHitsLottery() must be of the type array, null given, called in \/Applications\/XAMPP\/xamppfiles\/htdocs\/demo-api\/vendor\/cartalyst\/sentinel\/src\/Laravel\/SentinelServiceProvider.php on line 414 and defined","file":"\/Applications\/XAMPP\/xamppfiles\/htdocs\/demo-api\/vendor\/cartalyst\/sentinel\/src\/Laravel\/SentinelServiceProvider.php","line":430}}{"error":{"type":"ErrorException","message":"Argument 1 passed to Cartalyst\Sentinel\Laravel\SentinelServiceProvider::configHitsLottery() must be of the type array, null given, called in \/Applications\/XAMPP\/xamppfiles\/htdocs\/demo-api\/vendor\/cartalyst\/sentinel\/src\/Laravel\/SentinelServiceProvider.php on line 414 and defined","file":"\/Applications\/XAMPP\/xamppfiles\/htdocs\/demo-api\/vendor\/cartalyst\/sentinel\/src\/Laravel\/SentinelServiceProvider.php","line":430}}MacBook-Pro-3:demo-api adnan$

It does seem to come from

/Applications/XAMPP/xamppfiles/htdocs/demo-api/vendor/cartalyst/sentinel/src/Laravel/SentinelServiceProvider.php

Line: 396

Any thoughts?

Thank you

suwardany commented 9 years ago

Hello @websemantics I fixed these, pull in the changes and you should be good to go.

Let me know if you need any additional information.

websemantics commented 9 years ago

Thanks for that suwardany, .. problem fixed, ..

one last issue, .. can't access the end-point http://localhost/demo-api/api/v1/places on my local, any pointers?

suwardany commented 9 years ago

No problem! Not sure how that is setup on your end, i'm testing it on a separate vhost so my url is http://demo-api.dev/api/v1/places and is working fine.

What happens when you hit that page?

websemantics commented 9 years ago

Object not found page, the only setting i did was the database config, .. am I missing something?

suwardany commented 9 years ago

Check out the steps here https://github.com/cartalyst/demo-api/blob/master/readme.md#installation .. need to migrate and seed sentinel and the db!

websemantics commented 9 years ago

Yes, followed all the steps, migrate, seed etc

suwardany commented 9 years ago

Did you run composer install after pulling the changes?

websemantics commented 9 years ago

I actually cloned the repo afresh, .. then ran composer

suwardany commented 9 years ago

Could you paste the error stacktrace on a gist or pastebin?

websemantics commented 9 years ago

It's not an error, but a 404

suwardany commented 9 years ago

maybe http://localhost/demo-api/public/api/v1/places ? It's related to your host setup, the browser isn't hitting the correct routes of the app

websemantics commented 9 years ago

That would give,

Error in exception handler.

suwardany commented 9 years ago

That means the app is trying to write an exception and doesn't have the permissions to do so.

websemantics commented 9 years ago

I am checking the app/routes.php and nothing from those work including '/'

websemantics commented 9 years ago

Thanks though for your help, .. I'll do some debugging and report back

suwardany commented 9 years ago

You're welcome!

websemantics commented 9 years ago

Ok, found it, .. I had to run this

''chmod 777 app/storage/*''

vishalmote commented 9 years ago

Hello,

I am facing the same issue :

I have upgraded the laravel version 4.1 to 4.2. I am using purchased version sentinel. It is working properly in 4.1 but I have to upgarde the laravel version to 4.2 for other purpose but getting same kind of error please look attached screen shot.

Argument 1 passed to Cartalyst\Sentinel\Laravel\SentinelServiceProvider::configHitsLottery() must be of the type array, null given, called in /var/www/html/keurix50/web/vendor/cartalyst/sentinel/src/Laravel/SentinelServiceProvider.php on line 414 and defined

My composer.json is look like: ... "repositories": [ { "type": "composer", "url": "http://packages.cartalyst.com" } ], "require": { "laravel/framework": "4.2.", "cartalyst/sentinel": "1.0.", . . . . } ...

screenshot from 2015-05-13 15 19 55

I dont know reason behind it. composer install runs properly but when I try to visit a login page throghing above bug.

brunogaspar commented 9 years ago

You need to 're publish the Sentinel config file.

levipeto commented 4 years ago

php artisan vendor:publish then select [1 ] Provider: Cartalyst\Cart\Laravel\CartServiceProvider