Skip to content

Bandcamp Label failed with: count(): Argument #1 ($value) must be of type Countable|array, null given #4978

@sid115

Description

@sid115
TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in bridges/BandcampBridge.php line 181

index.php(73): RssBridge->main()
lib/RssBridge.php(39): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): BasicAuthMiddleware->__invoke()
middlewares/BasicAuthMiddleware.php(13): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): CacheMiddleware->__invoke()
middlewares/CacheMiddleware.php(44): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): ExceptionMiddleware->__invoke()
middlewares/ExceptionMiddleware.php(17): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): SecurityMiddleware->__invoke()
middlewares/SecurityMiddleware.php(19): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): MaintenanceMiddleware->__invoke()
middlewares/MaintenanceMiddleware.php(10): RssBridge->{closure:RssBridge::main():37}()
lib/RssBridge.php(37): TokenAuthenticationMiddleware->__invoke()
middlewares/TokenAuthenticationMiddleware.php(10): RssBridge->{closure:RssBridge::main():33}()
lib/RssBridge.php(34): DisplayAction->__invoke()
actions/DisplayAction.php(54): DisplayAction->createResponse()
actions/DisplayAction.php(89): BandcampBridge->collectData()
bridges/BandcampBridge.php(181)

Query string: action=display&bridge=BandcampBridge&context=By+label&label=44labelgroup&type=changes&limit=5&format=Html
Version: 2025-08-05
Os: Linux
PHP version: 8.4.20

Maintainer: @sebsauvage, @Roliga

I noticed that the mobile/22/band_details API fails for non-browser clients:

php -r "
\$url = 'https://bandcamp.com/api/mobile/22/band_details?band_id=855335734';
echo file_get_contents(\$url);
"
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta
      http-equiv="Content-Security-Policy"
      content="default-src 'self'; img-src 'self' data:; media-src 'self' data:; object-src 'none'; style-src 'self' 'sha256-o4vzfmmUENEg4chMjjRP9EuW9ucGnGIGVdbl8d0SHQQ='; script-src 'self' 'sha256-a9bHdQGvRzDwDVzx8m+Rzw+0FHZad8L0zjtBwkxOIz4=';"
    />
    <link
      href="/_fs-ch-1T1wmsGaOgGaSxcX/assets/inter-var.woff2"
      rel="preload"
      as="font"
      type="font/woff2"
      crossorigin
    />
    <link href="/_fs-ch-1T1wmsGaOgGaSxcX/assets/styles.css" rel="stylesheet" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Client Challenge</title>
    <style>
      #loading-error {
        font-size: 16px;
        font-family: 'Inter', sans-serif;
        margin-top: 10px;
        margin-left: 10px;
        display: none;
      }
    </style>
  </head>
  <body>
    <noscript>
      <div class="noscript-container">
        <div class="noscript-content">
          <img
            src="/_fs-ch-1T1wmsGaOgGaSxcX/assets/errorIcon.svg"
            alt=""
            role="presentation"
            class="error-icon"
          />
          <span class="noscript-span"
            >JavaScript is disabled in your browser.</span
          >
          <p>Please enable JavaScript to proceed.</p>
        </div>
      </div>
    </noscript>
    <div id="loading-error" role="alert" aria-live="polite">
      A required part of this site couldn’t load. This may be due to a browser
      extension, network issues, or browser settings. Please check your
      connection, disable any ad blockers, or try using a different browser.
    </div>
    <script>
      function loadScript(src) {
        return new Promise((resolve, reject) => {
          const script = document.createElement('script');
          script.onload = resolve;
          script.onerror = (event) => {
            console.error('Script load error event:', event);
            document.getElementById('loading-error').style.display = 'block';
            reject(
              new Error(
                `Failed to load script: ${src}, Please contact the service administrator.`
              )
            );
          };
          script.src = src;
          document.body.appendChild(script);
        });
      }

      loadScript('/_fs-ch-1T1wmsGaOgGaSxcX/errors.js')
        .then(() => {
          const script = document.createElement('script');
          script.src = '/_fs-ch-1T1wmsGaOgGaSxcX/script.js?reload=true';
          script.onerror = (event) => {
            console.error('Script load error event:', event);
            const errorMsg = new Error(
              `Failed to load script: ${script.src}. Please contact the service administrator.`
            );
            console.error(errorMsg);
            handleScriptError();
          };
          document.body.appendChild(script);
        })
        .catch((error) => {
          console.error(error);
        });
    </script>
  </body>
</html>

Adding a user agent works:

php -r "
\$ctx = stream_context_create(['http' => ['header' => 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:124.0) Gecko/20100101 Firefox/124.0']]);
\$url = 'https://bandcamp.com/api/mobile/22/band_details?band_id=855335734';
echo file_get_contents(\$url, false, \$ctx);
" | head -5
{"id":855335734,"name":"44 LABEL GROUP","bio_image_id":38431589,"bio_image_width":1500,"bio_image_height":1500,"bio":null,"bandcamp_url":"https://44labelgroup.bandcamp.com","sites":[{"url":"https://44-label.group","title":"44-label.group"}],"discography":[{"item_id":2541678268,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"44025","art_id":211093016,"release_date":"24 Apr 2026 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":437525331,"item_type":"album","artist_name":"UEBERREST","band_name":"44 LABEL GROUP","title":"44024","art_id":1588817083,"release_date":"20 Mar 2026 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1960617134,"item_type":"album","artist_name":"WESTBAM, RICHARD BUTLER","band_name":"44 LABEL GROUP","title":"You Need The Drugs (Kobosil Kartell Mix)","art_id":938693125,"release_date":"12 Dec 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3511759299,"item_type":"track","artist_name":"SOMEWHEN","band_name":"44 LABEL GROUP","title":"Promise","art_id":2649423267,"release_date":"21 Nov 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3695281854,"item_type":"track","artist_name":"LUCIANO, UEBERREST","band_name":"44 LABEL GROUP","title":"Push It (Ueberrest Remix)","art_id":465296125,"release_date":"21 Nov 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":851718225,"item_type":"track","artist_name":"AZZLE 447","band_name":"44 LABEL GROUP","title":"Komm (feat.Juju)","art_id":1542574221,"release_date":"07 Nov 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2781316374,"item_type":"album","artist_name":"KOBOSIL","band_name":"44 LABEL GROUP","title":"BR3ATH3","art_id":2152454253,"release_date":"15 Oct 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":321202568,"item_type":"album","artist_name":"VARIOUS ARTISTS","band_name":"44 LABEL GROUP","title":"SEKTION 5","art_id":1681898946,"release_date":"29 Aug 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2313600780,"item_type":"track","artist_name":"DRAKK, ÖTAK","band_name":"44 LABEL GROUP","title":"Gangstas","art_id":2265997292,"release_date":"22 Aug 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3959706282,"item_type":"track","artist_name":"SOMEWHEN","band_name":"44 LABEL GROUP","title":"Fever Dream","art_id":471991480,"release_date":"15 Aug 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":393578522,"item_type":"track","artist_name":"NEW FRAMES, KOBOSIL","band_name":"44 LABEL GROUP","title":"Staub (Kobosil Glut Mix)","art_id":3199113129,"release_date":"01 Aug 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":176739675,"item_type":"track","artist_name":"PRADA2000","band_name":"44 LABEL GROUP","title":"GoGoGo! (VIP Intro Mix)","art_id":1774662771,"release_date":"18 Jul 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":4004698274,"item_type":"album","artist_name":"UEBERREST","band_name":"44 LABEL GROUP","title":"44014","art_id":1352193883,"release_date":"02 May 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3045865414,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"44012","art_id":197471224,"release_date":"04 Apr 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2982851547,"item_type":"album","artist_name":"KOBOSIL, UEBERREST","band_name":"44 LABEL GROUP","title":"Cryptic (Kobosil Hart Mix)","art_id":3091755548,"release_date":"21 Mar 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":4046782271,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"SURREAL CURVED DREAMS","art_id":2077061274,"release_date":"07 Mar 2025 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":888452135,"item_type":"album","artist_name":"KUKO","band_name":"44 LABEL GROUP","title":"44010","art_id":1455647112,"release_date":"20 Dec 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3773368940,"item_type":"album","artist_name":"SOMEWHEN","band_name":"44 LABEL GROUP","title":"44009","art_id":1426658586,"release_date":"06 Dec 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1505003246,"item_type":"album","artist_name":"UEBERREST","band_name":"44 LABEL GROUP","title":"44008","art_id":2716385477,"release_date":"01 Aug 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2444089164,"item_type":"album","artist_name":"VARIOUS ARTISTS","band_name":"44 LABEL GROUP","title":"SEKTION 4","art_id":2536492089,"release_date":"08 Jul 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1460830661,"item_type":"album","artist_name":"KUKO","band_name":"44 LABEL GROUP","title":"44004","art_id":3202349940,"release_date":"01 Jun 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":4230876817,"item_type":"album","artist_name":"KOBOSIL, UEBERREST","band_name":"44 LABEL GROUP","title":"RADIANCE","art_id":2988423215,"release_date":"17 May 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2785060572,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"44002","art_id":482162361,"release_date":"15 Apr 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":841804271,"item_type":"album","artist_name":"KOBOSIL, KUKO","band_name":"44 LABEL GROUP","title":"EISKALT","art_id":3381587923,"release_date":"01 Mar 2024 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1427662696,"item_type":"album","artist_name":"UEBERREST","band_name":"44 LABEL GROUP","title":"R009","art_id":2868532432,"release_date":"15 Dec 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":717743938,"item_type":"album","artist_name":"KANDER","band_name":"44 LABEL GROUP","title":"R007","art_id":892908061,"release_date":"24 Nov 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2309138143,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"R006","art_id":3354899222,"release_date":"06 Oct 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":4011711910,"item_type":"album","artist_name":"SOMEWHEN","band_name":"44 LABEL GROUP","title":"R005","art_id":4215433136,"release_date":"08 Sep 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":994580270,"item_type":"album","artist_name":"VARIOUS ARTISTS","band_name":"44 LABEL GROUP","title":"SEKTION 3","art_id":939630472,"release_date":"02 Jun 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2319709615,"item_type":"album","artist_name":"KANDER","band_name":"44 LABEL GROUP","title":"R002","art_id":1442391023,"release_date":"13 Apr 2023 09:34:47 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2102570514,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"R001","art_id":2165328584,"release_date":"10 Feb 2023 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3677022500,"item_type":"album","artist_name":"NEW FRAMES","band_name":"44 LABEL GROUP","title":"RNF4","art_id":754906393,"release_date":"09 Dec 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3657542926,"item_type":"album","artist_name":"FRANCK","band_name":"44 LABEL GROUP","title":"RF1","art_id":4253345403,"release_date":"11 Nov 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1281721424,"item_type":"album","artist_name":"KOBOSIL","band_name":"44 LABEL GROUP","title":"RK5","art_id":4195504627,"release_date":"31 Oct 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":764227446,"item_type":"album","artist_name":"VARIOUS ARTISTS","band_name":"44 LABEL GROUP","title":"SEKTION 2","art_id":686485245,"release_date":"02 Jun 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1525833512,"item_type":"album","artist_name":"AIDEN","band_name":"44 LABEL GROUP","title":"RA1","art_id":44645771,"release_date":"07 Apr 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3266737234,"item_type":"album","artist_name":"PARALLX","band_name":"44 LABEL GROUP","title":"RP5","art_id":2887667716,"release_date":"10 Feb 2022 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":591090579,"item_type":"album","artist_name":"AFEM SYKO","band_name":"44 LABEL GROUP","title":"RAS1","art_id":1957038926,"release_date":"02 Dec 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1855740349,"item_type":"album","artist_name":"WALLIS","band_name":"44 LABEL GROUP","title":"RW1","art_id":3785895781,"release_date":"15 Oct 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":891136474,"item_type":"album","artist_name":"IN VERRUF // KOBOSIL","band_name":"44 LABEL GROUP","title":"RR6","art_id":3175857051,"release_date":"01 Oct 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3241715365,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"DOMA","art_id":2550171858,"release_date":"10 Sep 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1113873857,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"RIV4","art_id":3413866653,"release_date":"21 Jul 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":828115805,"item_type":"album","artist_name":"KANDER","band_name":"44 LABEL GROUP","title":"RKR1","art_id":1575282668,"release_date":"14 May 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1005904186,"item_type":"album","artist_name":"RADICAL G // PARALLX","band_name":"44 LABEL GROUP","title":"RR5","art_id":347092734,"release_date":"05 Mar 2021 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":689185807,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"RIK4","art_id":4000535455,"release_date":"04 Dec 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3223136246,"item_type":"album","artist_name":"SOMEWHEN","band_name":"44 LABEL GROUP","title":"RS1","art_id":695156510,"release_date":"04 Sep 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1000192533,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"RIV2","art_id":1368782587,"release_date":"04 Aug 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1498256870,"item_type":"album","artist_name":"VARIOUS ARTISTS","band_name":"44 LABEL GROUP","title":"SEKTION 1","art_id":1058832812,"release_date":"01 Jun 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":883405095,"item_type":"album","artist_name":"NEW FRAMES","band_name":"44 LABEL GROUP","title":"RNF2","art_id":3874306417,"release_date":"24 Jan 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":423126390,"item_type":"album","artist_name":"IN VERRUF","band_name":"44 LABEL GROUP","title":"RIV1","art_id":1240384526,"release_date":"07 Jan 2020 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3683288039,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"RIK2","art_id":1948795596,"release_date":"08 Nov 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2086399965,"item_type":"album","artist_name":"ROSA ANSCHÜTZ // KOBOSIL","band_name":"44 LABEL GROUP","title":"RR4","art_id":492627618,"release_date":"30 Aug 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1096734109,"item_type":"album","artist_name":"PARALLX","band_name":"44 LABEL GROUP","title":"RP4","art_id":3233394611,"release_date":"28 Jun 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1435591195,"item_type":"album","artist_name":"RIKHTER","band_name":"44 LABEL GROUP","title":"RIK1","art_id":110256790,"release_date":"07 Jun 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1242238161,"item_type":"album","artist_name":"KOBOSIL","band_name":"44 LABEL GROUP","title":"RK4","art_id":1039822569,"release_date":"15 Mar 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":1512284701,"item_type":"album","artist_name":"RADICAL G & THE HORRORIST // KOBOSIL","band_name":"44 LABEL GROUP","title":"RR2","art_id":4051683054,"release_date":"28 Jan 2019 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3084836970,"item_type":"album","artist_name":"PARALLX // SOMEWHEN","band_name":"44 LABEL GROUP","title":"RR1","art_id":4183119706,"release_date":"30 Nov 2018 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2758109625,"item_type":"album","artist_name":"NEW FRAMES","band_name":"44 LABEL GROUP","title":"RNF1","art_id":684887811,"release_date":"05 Oct 2018 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2630183085,"item_type":"album","artist_name":"HN42","band_name":"44 LABEL GROUP","title":"RH2","art_id":1879751669,"release_date":"19 Apr 2018 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":193367829,"item_type":"album","artist_name":"PARALLX","band_name":"44 LABEL GROUP","title":"RP1","art_id":555619256,"release_date":"21 Mar 2018 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":86538248,"item_type":"album","artist_name":"PARALLX","band_name":"44 LABEL GROUP","title":"RP2","art_id":1679987569,"release_date":"14 Sep 2017 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":2643858025,"item_type":"album","artist_name":"HN42","band_name":"44 LABEL GROUP","title":"RH1","art_id":3201836046,"release_date":"20 Oct 2016 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":624305619,"item_type":"album","artist_name":"KOBOSIL","band_name":"44 LABEL GROUP","title":"RK2","art_id":886842646,"release_date":"28 Jun 2016 00:00:00 GMT","is_purchasable":true,"band_id":855335734},{"item_id":3856352409,"item_type":"album","artist_name":"KOBOSIL","band_name":"44 LABEL GROUP","title":"RK1","art_id":288833037,"release_date":"20 Apr 2014 00:00:00 GMT","is_purchasable":true,"band_id":855335734}],"location":"Berlin, Germany","header_image_id":null,"shows":[],"navbar_titles":{"m":"// MUSIC //","p":"merch","l":"live streams","a":"// 44 //","v":"video","u":"audio","s":"subscribe","c":"community"},"merch":[],"artists":[]}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions