I have a really weird issue after the update to 4.1.0. A test with 4.0.0 shows that this issue doesn't exist on this version.
Sometimes I just don't get any output. No error, nothing. I have a script to update game info and this just gets the data via IGDB-IDs. Most of the time it works just fine but sometimes it doesn't. I tried to replicate this issue with Tinkerwell but I'm still not 100% sure what is happening. But at the end of the issue is a video that shows the issue.
I have an array with 431 IDs. Neither the number nor the exakt ID seems to be an issue, as I get this behavior with multiple configurations. Even when I only take 300 the error is there and is not if I delete the last one that shouldn't even be in the result.
Also if I remove involved_companies.company
from the included fields, it just works fine. If I remove everything but involved_companies.company
it also works. So it's probably not this. If I reduce the limit to 250 it also works.
It's really really strange.
This is the exakt code I tried it with in the video, so you can try to replicate it.
use MarcReichel\IGDBLaravel\Models\Game;
$gameIds = [41892,49,6322,178105,219115,219117,115276,68074,28663,182211,88859,222852,231822,64820,167114,225551,15421,20686,24635,159336,132044,26765,36198,14394,242025,8593,178054,90113,61573,134500,217837,159274,239007,135230,163155,223050,65974,241027,240990,11193,12427,26201,48133,178058,132842,37151,70136,78885,99959,122205,178062,8534,81275,218292,3985,248142,1066,28168,218030,75948,18011,25646,26658,68271,26223,27725,106992,225217,20687,128832,78153,87817,2336,215150,133923,135218,229339,28552,108693,10168,55190,37016,22258,51149,113114,135071,120201,198688,11668,103295,144986,208493,105049,222777,139139,218070,67024,242136,210340,14561,135148,26142,2180,3680,218883,205994,240267,248568,15690,201761,16047,16198,16203,27092,109573,153407,67940,248209,140895,159074,234545,237366,77804,14573,93517,192905,13189,55282,54678,56033,105176,109550,103314,11367,141568,54696,71443,49414,55155,8894,44897,74701,245672,11148,245299,115653,63150,20684,121025,85152,28070,41117,121504,67879,114795,26941,14676,20676,131436,159332,1887,42995,121024,77221,10740,83876,121824,13798,22962,2685,3136,229515,46067,7414,5161,5538,4033,110840,248544,111047,11,783,7433,43335,1051,141927,19164,2153,7645,198341,620,2416,351,1624,87190,229516,330,19418,3548,891,186723,181637,5038,225,959,1064,47823,660,2166,6203,5037,2482,575,869,5532,5076,2708,2946,6182,3374,215,3249,2158,96159,8264,98,4877,39342,699,87,2715,3156,136899,5338,3154,8898,135144,650,335,586,71,131,195027,4588,2113,721,4415,27075,58312,51953,5535,494,1314,90,5749,42523,1621,2656,79594,887,241008,2246,4429,159120,93789,240997,104,4905,119318,4492,192920,3350,38,2431,155199,202673,230166,36,91432,1493,1275,237,210599,1316,8224,7224,1317,96,132033,4725,35,2250,1497,4178,46226,95434,436,2588,1006,93691,934,5539,7056,759,4509,3875,5761,117772,137008,20386,67030,132029,10,1322,3145,5867,473,3094,2585,20220,14531,219121,503,78550,11675,2666,2665,3371,135243,3541,3989,132049,6964,53044,130,3901,42898,1922,3158,13115,155204,1079,1216,903,8100,4825,1494,11068,91994,904,4904,5904,2398,210703,20675,4028,103,1828,132640,5035,443,6631,4443,1059,229956,325,4506,3212,48711,2249,5971,68040,207005,950,649,51,1921,5156,3063,73027,234773,390,592,7670,5157,4258,72,22,260,214996,229521,4975,5620,205,670,5053,89,245478,2260,3752,1644,3852,4394,996,4444,3033,2500,46640,135223,229520,179730,277,7115,97,4906,5396,1002,3693,117405,41363,58941,192924,192922,231740,231741,192923,5220,3547,687,43280,7107,1832];
$igdbGames = Game::with([
'alternative_names',
'cover' => ['url', 'image_id', 'checksum'],
'platforms' => ['id'],
'genres' => ['id'],
'parent_game',
'version_parent',
'websites',
'videos',
'involved_companies',
'involved_companies.company',
'release_dates' => ['date', 'platform', 'status'],
])
->whereIn('id', $gameIds)
->take(300)
->get();