Algolia sync is not working on production server

I have face problem is that algolia is working fine in my local system with laravel and when i deployed to production server its not working. checked MYAPPID-dns.algolia.net and getting out, same cred using in but not getting issue on production server.

there are another scenario on production server. if i change cred in env by the wrong cred then it is not giving me error on production but this is same case i applied on local system give instant error.

Hi @nageen.nayak,

First, do you mind if I make this thread public? I believe other people can benfit from it.

Usually this happens when Laravel is still using the Null engine. This could happens if you have cached your configuration and didn’t clear it. Please try to php artisan config:clear and see if it works better.

Yes please make it public.
thanks @julienbourdeau for your time. i have ran php artisan config:clear that command and try but not working.
can you please give me another idea so i can go ahead.

Can you check what driver is used?
You can start laravel tinker and print the value of config('scout.driver').

Hi i have print it and its “algolia” printed. Also check in scout.php and its

'driver' => env('SCOUT_DRIVER', 'algolia'),

Can you add some debug code to see what is passed to addObjects here: scout/AlgoliaEngine.php at 5.0 · laravel/scout · GitHub

On production server there is nothing happens in the file which you send me link and local system have given error Call to undefined method Illuminate\Database\Query\Builder::scoutMetadata()

i think Searchable class not calling in production server. i echo in Searchable class but code not reach there on production server but local it is reached.

Also searchableAs() gives users in local but production is not nothing giving

scoutMetadata method is very new. Can you update Laravel Scout and make sure you’re using the same version in both environment.

Hi is the issue soved ? I have same issue in my laravel web app. I am using algolia/scout-extended laravel package in my web app. when I run php artisan scout:import “App\Models\Article” command in local server it sync my local db to algolia but same thing not working on production server.