koel/koel · warning · Exception
No data returned.
Error message
No data returned.
What it means
Raised inside php artisan koel:doctor's service-integration checks. The doctor sends a real Last.fm GetArtistInfoRequest('Pink Floyd'); when the connector's dto() comes back null it means the API responded but with a payload that didn't deserialize into the expected DTO - almost always an error response (e.g. 'invalid api key') rather than actual artist data. The doctor collects it and reports the Last.fm integration as failing; it is diagnostic output, not an application crash.
Source
Thrown at app/Console/Commands/DoctorCommand.php:175
} catch (Throwable $e) {
$this->collectError($e);
$this->reportError('Mailer configuration');
}
}
private function checkServiceIntegrations(): void
{
if (!LastfmService::enabled()) {
$this->reportWarning('Last.fm integration', 'Not available');
} else {
/** @var LastfmConnector $connector */
$connector = app(LastfmConnector::class);
try {
$dto = $connector->send(new GetArtistInfoRequest('Pink Floyd'))->dto();
if (!$dto) {
throw new Exception('No data returned.');
}
$this->reportSuccess('Last.fm integration');
} catch (Throwable $e) {
$this->collectError($e);
$this->reportError('Last.fm integration');
}
}
if (!YouTubeService::enabled()) {
$this->reportWarning('YouTube integration', 'Not available');
} else {
/** @var YouTubeConnector $connector */
$connector = app(YouTubeConnector::class);
try {
$object = $connector->send(new SearchVideosRequest('Pink Floyd Comfortably Numb'))->object();
View on GitHub (pinned to 41cab99fee)
Solutions
- Set valid LASTFM_KEY and LASTFM_SECRET in .env (from last.fm/api/account/create)
- Run php artisan config:clear so new keys are picked up, then rerun koel:doctor
- Verify outbound access from the server: curl 'https://ws.audioscrobbler.com/2.0/' and check the raw response
- Treat the failure as non-fatal if you don't use Last.fm scrobbling - other doctor checks proceed independently
Defensive patterns
Strategy: validation
Validate before calling
// Skip or short-circuit Last.fm work when credentials are absent
if (!config('koel.lastfm.key') || !config('koel.lastfm.secret')) {
return; // integration intentionally unused
}
$dto = app(LastfmConnector::class)->send(new GetArtistInfoRequest($artist))->dto(); Try / catch
try {
$dto = $connector->send(new GetArtistInfoRequest('Pink Floyd'))->dto();
} catch (Throwable $e) {
// network/HTTP-level failure: report and degrade gracefully (scrobbling off)
Log::warning('Last.fm unreachable', ['error' => $e->getMessage()]);
$dto = null;
} Prevention
- Set LASTFM_KEY/LASTFM_SECRET in .env before enabling scrobbling features and config:cache after
- Run php artisan koel:doctor after credential changes to verify integrations before relying on them
- Treat dto() === null as 'API answered with an error payload', not as empty data - log the raw response when debugging
When it happens
Trigger: LASTFM_KEY/LASTFM_SECRET missing, invalid, or revoked in .env; Last.fm returning an error JSON (no artist object to map); outbound HTTPS to ws.audioscrobbler.com blocked by firewall/DNS.
Common situations: Fresh installs where Last.fm env vars were never set; keys rotated or revoked; server egress restrictions; stale config cache keeping old keys after .env changes.
Related errors
- object_get($object, 'error.message')
- No result returned.
- Multiple licenses found. This can cause unexpected behaviors
- Your license status is unknown. Please try again later.
- No active Plus license found.
AI-assisted analysis of koel/koel@41cab99fee (2026-08-23).
Data as JSON: /api/errors/62f0775e20570ef0.
Report an issue: GitHub.