[GH-ISSUE #77] Error importing songs #57

Closed
opened 2026-02-26 02:31:57 +03:00 by kerem · 22 comments
Owner

Originally created by @etopian on GitHub (Dec 16, 2015).
Original GitHub issue: https://github.com/koel/koel/issues/77

Error:
Whoops, looks like something went wrong.
2/2 QueryException in Connection.php line 651: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'artists_name_unique' (SQL: insert into `artists` (`name`, `updated_at`, `created_at`) values (��Hitmakers Feat. KNA Connected, 2015-12-16 16:00:52, 2015-12-16 16:00:52))

    in Connection.php line 651
    at Connection->runQueryCallback('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 611
    at Connection->run('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 391
    at Connection->statement('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 347
    at Connection->insert('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Processor.php line 32
    at Processor->processInsertGetId(object(Builder), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), 'id') in Builder.php line 1799
    at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')
    at call_user_func_array(array(object(Builder), 'insertGetId'), array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in Builder.php line 943
    at Builder->__call('insertGetId', array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in compiled.php line 10476
    at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') in compiled.php line 10476
    at Model->insertAndSetId(object(Builder), array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52')) in compiled.php line 10465
    at Model->performInsert(object(Builder), array()) in compiled.php line 10422
    at Model->save() in compiled.php line 10055
    at Model::create(array('name' => '��Hitmakers Feat. KNA Connected')) in compiled.php line 10070
    at Model::firstOrCreate(array('name' => '��Hitmakers Feat. KNA Connected'), array('name' => '��Hitmakers Feat. KNA Connected')) in Artist.php line 47
    at Artist::get('��Hitmakers Feat. KNA Connected') in Media.php line 103
    at Media->syncFile(object(SplFileInfo)) in Media.php line 52
    at Media->sync() in compiled.php line 6022
    at Facade::__callStatic('sync', array()) in SettingController.php line 25
    at Media::sync() in SettingController.php line 25
    at SettingController->save(object(SettingRequest))
    at call_user_func_array(array(object(SettingController), 'save'), array(object(SettingRequest))) in compiled.php line 8866
    at Controller->callAction('save', array(object(SettingRequest))) in compiled.php line 8935
    at ControllerDispatcher->call(object(SettingController), object(Route), 'save') in compiled.php line 8915
    at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 8916
    at ControllerDispatcher->callWithinStack(object(SettingController), object(Route), object(Request), 'save') in compiled.php line 8901
    at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\API\SettingController', 'save') in compiled.php line 7855
    at Route->runWithCustomDispatcher(object(Request)) in compiled.php line 7826
    at Route->run(object(Request)) in compiled.php line 7479
    at Router->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Authenticate.php line 45
    at Authenticate->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 7480
    at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7468
    at Router->dispatchToRoute(object(Request)) in compiled.php line 7453
    at Router->dispatch(object(Request)) in compiled.php line 2302
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2926
    at VerifyCsrfToken->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12949
    at ShareErrorsFromSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11536
    at StartSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12686
    at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12623
    at EncryptCookies->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2983
    at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 2249
    at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2232
    at Kernel->handle(object(Request)) in index.php line 53

1/2 PDOException in Connection.php line 390: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'artists_name_unique'

    in Connection.php line 390
    at PDOStatement->execute(array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 390
    at Connection->Illuminate\Database\{closure}(object(MySqlConnection), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 644
    at Connection->runQueryCallback('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 611
    at Connection->run('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 391
    at Connection->statement('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 347
    at Connection->insert('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Processor.php line 32
    at Processor->processInsertGetId(object(Builder), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), 'id') in Builder.php line 1799
    at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')
    at call_user_func_array(array(object(Builder), 'insertGetId'), array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in Builder.php line 943
    at Builder->__call('insertGetId', array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in compiled.php line 10476
    at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') in compiled.php line 10476
    at Model->insertAndSetId(object(Builder), array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52')) in compiled.php line 10465
    at Model->performInsert(object(Builder), array()) in compiled.php line 10422
    at Model->save() in compiled.php line 10055
    at Model::create(array('name' => '��Hitmakers Feat. KNA Connected')) in compiled.php line 10070
    at Model::firstOrCreate(array('name' => '��Hitmakers Feat. KNA Connected'), array('name' => '��Hitmakers Feat. KNA Connected')) in Artist.php line 47
    at Artist::get('��Hitmakers Feat. KNA Connected') in Media.php line 103
    at Media->syncFile(object(SplFileInfo)) in Media.php line 52
    at Media->sync() in compiled.php line 6022
    at Facade::__callStatic('sync', array()) in SettingController.php line 25
    at Media::sync() in SettingController.php line 25
    at SettingController->save(object(SettingRequest))
    at call_user_func_array(array(object(SettingController), 'save'), array(object(SettingRequest))) in compiled.php line 8866
    at Controller->callAction('save', array(object(SettingRequest))) in compiled.php line 8935
    at ControllerDispatcher->call(object(SettingController), object(Route), 'save') in compiled.php line 8915
    at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 8916
    at ControllerDispatcher->callWithinStack(object(SettingController), object(Route), object(Request), 'save') in compiled.php line 8901
    at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\API\SettingController', 'save') in compiled.php line 7855
    at Route->runWithCustomDispatcher(object(Request)) in compiled.php line 7826
    at Route->run(object(Request)) in compiled.php line 7479
    at Router->Illuminate\Routing\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Authenticate.php line 45
    at Authenticate->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 7480
    at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7468
    at Router->dispatchToRoute(object(Request)) in compiled.php line 7453
    at Router->dispatch(object(Request)) in compiled.php line 2302
    at Kernel->Illuminate\Foundation\Http\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9585
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2926
    at VerifyCsrfToken->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12949
    at ShareErrorsFromSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11536
    at StartSession->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12686
    at AddQueuedCookiesToResponse->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12623
    at EncryptCookies->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2983
    at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577
    at Pipeline->Illuminate\Pipeline\{closure}(object(Request))
    at call_user_func(object(Closure), object(Request)) in compiled.php line 9567
    at Pipeline->then(object(Closure)) in compiled.php line 2249
    at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2232
    at Kernel->handle(object(Request)) in index.php line 53

Originally created by @etopian on GitHub (Dec 16, 2015). Original GitHub issue: https://github.com/koel/koel/issues/77 ``` Error: Whoops, looks like something went wrong. 2/2 QueryException in Connection.php line 651: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'artists_name_unique' (SQL: insert into `artists` (`name`, `updated_at`, `created_at`) values (��Hitmakers Feat. KNA Connected, 2015-12-16 16:00:52, 2015-12-16 16:00:52)) in Connection.php line 651 at Connection->runQueryCallback('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 611 at Connection->run('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 391 at Connection->statement('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 347 at Connection->insert('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Processor.php line 32 at Processor->processInsertGetId(object(Builder), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), 'id') in Builder.php line 1799 at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') at call_user_func_array(array(object(Builder), 'insertGetId'), array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in Builder.php line 943 at Builder->__call('insertGetId', array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in compiled.php line 10476 at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') in compiled.php line 10476 at Model->insertAndSetId(object(Builder), array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52')) in compiled.php line 10465 at Model->performInsert(object(Builder), array()) in compiled.php line 10422 at Model->save() in compiled.php line 10055 at Model::create(array('name' => '��Hitmakers Feat. KNA Connected')) in compiled.php line 10070 at Model::firstOrCreate(array('name' => '��Hitmakers Feat. KNA Connected'), array('name' => '��Hitmakers Feat. KNA Connected')) in Artist.php line 47 at Artist::get('��Hitmakers Feat. KNA Connected') in Media.php line 103 at Media->syncFile(object(SplFileInfo)) in Media.php line 52 at Media->sync() in compiled.php line 6022 at Facade::__callStatic('sync', array()) in SettingController.php line 25 at Media::sync() in SettingController.php line 25 at SettingController->save(object(SettingRequest)) at call_user_func_array(array(object(SettingController), 'save'), array(object(SettingRequest))) in compiled.php line 8866 at Controller->callAction('save', array(object(SettingRequest))) in compiled.php line 8935 at ControllerDispatcher->call(object(SettingController), object(Route), 'save') in compiled.php line 8915 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 8916 at ControllerDispatcher->callWithinStack(object(SettingController), object(Route), object(Request), 'save') in compiled.php line 8901 at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\API\SettingController', 'save') in compiled.php line 7855 at Route->runWithCustomDispatcher(object(Request)) in compiled.php line 7826 at Route->run(object(Request)) in compiled.php line 7479 at Router->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Authenticate.php line 45 at Authenticate->handle(object(Request), object(Closure)) at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 7480 at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7468 at Router->dispatchToRoute(object(Request)) in compiled.php line 7453 at Router->dispatch(object(Request)) in compiled.php line 2302 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2926 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12949 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11536 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12686 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12623 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2983 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 2249 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2232 at Kernel->handle(object(Request)) in index.php line 53 1/2 PDOException in Connection.php line 390: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '' for key 'artists_name_unique' in Connection.php line 390 at PDOStatement->execute(array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 390 at Connection->Illuminate\Database\{closure}(object(MySqlConnection), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 644 at Connection->runQueryCallback('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 611 at Connection->run('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), object(Closure)) in Connection.php line 391 at Connection->statement('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Connection.php line 347 at Connection->insert('insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52')) in Processor.php line 32 at Processor->processInsertGetId(object(Builder), 'insert into `artists` (`name`, `updated_at`, `created_at`) values (?, ?, ?)', array('��Hitmakers Feat. KNA Connected', '2015-12-16 16:00:52', '2015-12-16 16:00:52'), 'id') in Builder.php line 1799 at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') at call_user_func_array(array(object(Builder), 'insertGetId'), array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in Builder.php line 943 at Builder->__call('insertGetId', array(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id')) in compiled.php line 10476 at Builder->insertGetId(array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52'), 'id') in compiled.php line 10476 at Model->insertAndSetId(object(Builder), array('name' => '��Hitmakers Feat. KNA Connected', 'updated_at' => '2015-12-16 16:00:52', 'created_at' => '2015-12-16 16:00:52')) in compiled.php line 10465 at Model->performInsert(object(Builder), array()) in compiled.php line 10422 at Model->save() in compiled.php line 10055 at Model::create(array('name' => '��Hitmakers Feat. KNA Connected')) in compiled.php line 10070 at Model::firstOrCreate(array('name' => '��Hitmakers Feat. KNA Connected'), array('name' => '��Hitmakers Feat. KNA Connected')) in Artist.php line 47 at Artist::get('��Hitmakers Feat. KNA Connected') in Media.php line 103 at Media->syncFile(object(SplFileInfo)) in Media.php line 52 at Media->sync() in compiled.php line 6022 at Facade::__callStatic('sync', array()) in SettingController.php line 25 at Media::sync() in SettingController.php line 25 at SettingController->save(object(SettingRequest)) at call_user_func_array(array(object(SettingController), 'save'), array(object(SettingRequest))) in compiled.php line 8866 at Controller->callAction('save', array(object(SettingRequest))) in compiled.php line 8935 at ControllerDispatcher->call(object(SettingController), object(Route), 'save') in compiled.php line 8915 at ControllerDispatcher->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 8916 at ControllerDispatcher->callWithinStack(object(SettingController), object(Route), object(Request), 'save') in compiled.php line 8901 at ControllerDispatcher->dispatch(object(Route), object(Request), 'App\Http\Controllers\API\SettingController', 'save') in compiled.php line 7855 at Route->runWithCustomDispatcher(object(Request)) in compiled.php line 7826 at Route->run(object(Request)) in compiled.php line 7479 at Router->Illuminate\Routing\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Authenticate.php line 45 at Authenticate->handle(object(Request), object(Closure)) at call_user_func_array(array(object(Authenticate), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 7480 at Router->runRouteWithinStack(object(Route), object(Request)) in compiled.php line 7468 at Router->dispatchToRoute(object(Request)) in compiled.php line 7453 at Router->dispatch(object(Request)) in compiled.php line 2302 at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9585 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2926 at VerifyCsrfToken->handle(object(Request), object(Closure)) at call_user_func_array(array(object(VerifyCsrfToken), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12949 at ShareErrorsFromSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(ShareErrorsFromSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 11536 at StartSession->handle(object(Request), object(Closure)) at call_user_func_array(array(object(StartSession), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12686 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) at call_user_func_array(array(object(AddQueuedCookiesToResponse), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 12623 at EncryptCookies->handle(object(Request), object(Closure)) at call_user_func_array(array(object(EncryptCookies), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in compiled.php line 2983 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in compiled.php line 9577 at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in compiled.php line 9567 at Pipeline->then(object(Closure)) in compiled.php line 2249 at Kernel->sendRequestThroughRouter(object(Request)) in compiled.php line 2232 at Kernel->handle(object(Request)) in index.php line 53 ```
kerem closed this issue 2026-02-26 02:31:57 +03:00
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

Seems to be a problem with default artist being empty. Like the Laravel ORM is not correctly assigning ID 1 for artists that are empty. Instead it tries to create a new Artist with an empty name value, and that works for the first empty value, but it fails after that.

<!-- gh-comment-id:165303274 --> @etopian commented on GitHub (Dec 17, 2015): Seems to be a problem with default artist being empty. Like the Laravel ORM is not correctly assigning ID 1 for artists that are empty. Instead it tries to create a new Artist with an empty name value, and that works for the first empty value, but it fails after that.
Author
Owner

@funcoding commented on GitHub (Dec 17, 2015):

@etopian Any suggestions on how the error can be intentionally carried out?

<!-- gh-comment-id:165334056 --> @funcoding commented on GitHub (Dec 17, 2015): @etopian Any suggestions on how the error can be intentionally carried out?
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

Can you try setting artist name to preg_replace('/[^\p{L}\s]/u', '', $artist_name) and let me know if it works? See https://3v4l.org/Tj2M6. If it works for you, I'll introduce it into the code.

<!-- gh-comment-id:165335504 --> @phanan commented on GitHub (Dec 17, 2015): Can you try setting artist name to `preg_replace('/[^\p{L}\s]/u', '', $artist_name`) and let me know if it works? See https://3v4l.org/Tj2M6. If it works for you, I'll introduce it into the code.
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

Ok, what's your table encoding?

<!-- gh-comment-id:165357721 --> @phanan commented on GitHub (Dec 17, 2015): Ok, what's your table encoding?
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

@phanan yes your fix works. pull request.

https://github.com/phanan/koel/pull/94

<!-- gh-comment-id:165442723 --> @etopian commented on GitHub (Dec 17, 2015): @phanan yes your fix works. pull request. https://github.com/phanan/koel/pull/94
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

what's your table encoding?

<!-- gh-comment-id:165442880 --> @phanan commented on GitHub (Dec 17, 2015): > what's your table encoding?
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

utf8...

<!-- gh-comment-id:165443164 --> @etopian commented on GitHub (Dec 17, 2015): utf8...
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

Ok.. anyway the fix above doesn't work for all cases, so I closed the PR. Sorry.

<!-- gh-comment-id:165443546 --> @phanan commented on GitHub (Dec 17, 2015): Ok.. anyway the fix above doesn't work for all cases, so I closed the PR. Sorry.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

i have a parser that i can use to fix all the album and artist names because I do think the tag is corrupt somehow. but in the wild you can receive any input. so it should be robust enough to handle this or any other input.

<!-- gh-comment-id:165444140 --> @etopian commented on GitHub (Dec 17, 2015): i have a parser that i can use to fix all the album and artist names because I do think the tag is corrupt somehow. but in the wild you can receive any input. so it should be robust enough to handle this or any other input.
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

Actually the code to save and check for unique record is 100% Laravel, so if this is a bug, it's their bug. I doubt it's a bug though.

<!-- gh-comment-id:165444786 --> @phanan commented on GitHub (Dec 17, 2015): Actually the code to save and check for unique record is 100% Laravel, so if this is a bug, it's their bug. I doubt it's a bug though.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

@phanan what library is used for parsing idv2 tags? where is the code for that. perhaps figure out what encoding it's reading the tags, and then use that information to make sure it comes out fine on the other side. ultimately the problem is with how the string is represented.

if i do a utf8_encode on the album and the artist strings everything comes out fine, like it parses everything. but i get weird characters that show up, so the initial encoding is not ISO-8859-1.

also might also be a problem with the way php is compiled in Alpine Linux. that could also be a problem.

<!-- gh-comment-id:165447163 --> @etopian commented on GitHub (Dec 17, 2015): @phanan what library is used for parsing idv2 tags? where is the code for that. perhaps figure out what encoding it's reading the tags, and then use that information to make sure it comes out fine on the other side. ultimately the problem is with how the string is represented. if i do a utf8_encode on the album and the artist strings everything comes out fine, like it parses everything. but i get weird characters that show up, so the initial encoding is not ISO-8859-1. also might also be a problem with the way php is compiled in Alpine Linux. that could also be a problem.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

after some more investigation, if i utf-8 encode the strings... I get ÿþ in front of some of the titles. According to the article below that's the delimiter for UTF-16. So that's what's happening the string is not a UTF-8 string or a ISO string or an ascii string, it's a UTF-16 string. The only way to deal with this is to figure out ahead of time what type of string it is and then decode it properly before sending it to the database.

http://stackoverflow.com/questions/26493053/remove-%C3%BF%C3%BE-from-string

<!-- gh-comment-id:165452079 --> @etopian commented on GitHub (Dec 17, 2015): after some more investigation, if i utf-8 encode the strings... I get ÿþ in front of some of the titles. According to the article below that's the delimiter for UTF-16. So that's what's happening the string is not a UTF-8 string or a ISO string or an ascii string, it's a UTF-16 string. The only way to deal with this is to figure out ahead of time what type of string it is and then decode it properly before sending it to the database. http://stackoverflow.com/questions/26493053/remove-%C3%BF%C3%BE-from-string
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

A way to try to deal with this is to use this and probably use strict, but it's hit or miss here, the ideal way is to know ahead of time:

http://php.net/manual/en/function.mb-detect-encoding.php

<!-- gh-comment-id:165452229 --> @etopian commented on GitHub (Dec 17, 2015): A way to try to deal with this is to use this and probably use strict, but it's hit or miss here, the ideal way is to know ahead of time: http://php.net/manual/en/function.mb-detect-encoding.php
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

https://github.com/neitanod/forceutf8

this however does not support utf-16. it does seem however that utf-16 should be supported as some idv2 tags contain it.

<!-- gh-comment-id:165459469 --> @etopian commented on GitHub (Dec 17, 2015): https://github.com/neitanod/forceutf8 this however does not support utf-16. it does seem however that utf-16 should be supported as some idv2 tags contain it.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

idv2 tags are marked with the encoding, https://en.wikipedia.org/wiki/ID3

the library which is reading the tag should be reading it. i can no longer afford to spend more time on this. hopefully enough information has been provided to find a solution to the problem.

$00 – ISO-8859-1 (LATIN-1, Identical to ASCII for values smaller than 0x80).
$01 – UCS-2 (UTF-16 encoded Unicode with BOM), in ID3v2.2 and ID3v2.3.
$02 – UTF-16BE encoded Unicode without BOM, in ID3v2.4.
$03 – UTF-8 encoded Unicode, in ID3v2.4.

<!-- gh-comment-id:165462552 --> @etopian commented on GitHub (Dec 17, 2015): idv2 tags are marked with the encoding, https://en.wikipedia.org/wiki/ID3 the library which is reading the tag should be reading it. i can no longer afford to spend more time on this. hopefully enough information has been provided to find a solution to the problem. $00 – ISO-8859-1 (LATIN-1, Identical to ASCII for values smaller than 0x80). $01 – UCS-2 (UTF-16 encoded Unicode with BOM), in ID3v2.2 and ID3v2.3. $02 – UTF-16BE encoded Unicode without BOM, in ID3v2.4. $03 – UTF-8 encoded Unicode, in ID3v2.4.
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

Thanks for the findings @etopian. I'll look into it.

<!-- gh-comment-id:165496257 --> @phanan commented on GitHub (Dec 17, 2015): Thanks for the findings @etopian. I'll look into it.
Author
Owner

@phanan commented on GitHub (Dec 17, 2015):

I've pushed an attempt to fix, please let me know if it works.

On Thu, Dec 17, 2015 at 10:15 PM, Etopian Inc. notifications@github.com
wrote:

idv2 tags are marked with the encoding, https://en.wikipedia.org/wiki/ID3

$00 – ISO-8859-1 (LATIN-1, Identical to ASCII for values smaller than
0x80).
$01 – UCS-2 (UTF-16 encoded Unicode with BOM), in ID3v2.2 and ID3v2.3.
$02 – UTF-16BE encoded Unicode without BOM, in ID3v2.4.
$03 – UTF-8 encoded Unicode, in ID3v2.4.


Reply to this email directly or view it on GitHub
https://github.com/phanan/koel/issues/77#issuecomment-165462552.

<!-- gh-comment-id:165531783 --> @phanan commented on GitHub (Dec 17, 2015): I've pushed an attempt to fix, please let me know if it works. On Thu, Dec 17, 2015 at 10:15 PM, Etopian Inc. notifications@github.com wrote: > idv2 tags are marked with the encoding, https://en.wikipedia.org/wiki/ID3 > > $00 – ISO-8859-1 (LATIN-1, Identical to ASCII for values smaller than > 0x80). > $01 – UCS-2 (UTF-16 encoded Unicode with BOM), in ID3v2.2 and ID3v2.3. > $02 – UTF-16BE encoded Unicode without BOM, in ID3v2.4. > $03 – UTF-8 encoded Unicode, in ID3v2.4. > > — > Reply to this email directly or view it on GitHub > https://github.com/phanan/koel/issues/77#issuecomment-165462552.
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

iconv fails to convert from UTF16L.. use mb_convert_encoding. also apply this to album names in case.

            //$name = iconv($encoding, 'UTF-8//IGNORE', $name);
            $name = mb_convert_encoding($name , 'UTF-8' , $encoding);
<!-- gh-comment-id:165581735 --> @etopian commented on GitHub (Dec 17, 2015): iconv fails to convert from UTF16L.. use mb_convert_encoding. also apply this to album names in case. ``` php //$name = iconv($encoding, 'UTF-8//IGNORE', $name); $name = mb_convert_encoding($name , 'UTF-8' , $encoding); ```
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

Probably a good idea to apply it to all fields that you get out of getid3 in Media.php

<!-- gh-comment-id:165582573 --> @etopian commented on GitHub (Dec 17, 2015): Probably a good idea to apply it to all fields that you get out of getid3 in Media.php
Author
Owner

@etopian commented on GitHub (Dec 17, 2015):

Not 100% sure but might be chopping off character on certain strings. It works, but not perfectly. It might be the case that the encoding detection is not 100%.

<!-- gh-comment-id:165604330 --> @etopian commented on GitHub (Dec 17, 2015): Not 100% sure but might be chopping off character on certain strings. It works, but not perfectly. It might be the case that the encoding detection is not 100%.
Author
Owner

@phanan commented on GitHub (Dec 18, 2015):

This issue is only critical for artist, as it's required to be unique. I'd
leave the other tags alone to gain some speed.

On Fri, Dec 18, 2015 at 6:39 AM, Etopian Inc. notifications@github.com
wrote:

Not 100% sure but might be chopping off character on certain strings. It
works, but not perfectly. It might be the case that the encoding detection
is not 100%.


Reply to this email directly or view it on GitHub
https://github.com/phanan/koel/issues/77#issuecomment-165604330.

<!-- gh-comment-id:165645383 --> @phanan commented on GitHub (Dec 18, 2015): This issue is only critical for artist, as it's required to be unique. I'd leave the other tags alone to gain some speed. On Fri, Dec 18, 2015 at 6:39 AM, Etopian Inc. notifications@github.com wrote: > Not 100% sure but might be chopping off character on certain strings. It > works, but not perfectly. It might be the case that the encoding detection > is not 100%. > > — > Reply to this email directly or view it on GitHub > https://github.com/phanan/koel/issues/77#issuecomment-165604330.
Author
Owner

@etopian commented on GitHub (Dec 18, 2015):

same issue: https://github.com/phanan/koel/issues/113

<!-- gh-comment-id:165908022 --> @etopian commented on GitHub (Dec 18, 2015): same issue: https://github.com/phanan/koel/issues/113
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/koel-koel#57
No description provided.