spicetify/cli · error
cannot enable devtools safely: %q marker not found in offlin
Error message
cannot enable devtools safely: %q marker not found in offline.bnk
What it means
findOfflineBnkDeveloperFlagOffsets locates the "app-developer" marker inside Spotify's offline.bnk to compute byte offsets for the devtools patch. This first error fires when strings.Index cannot find the marker at all in the file content. Without the marker, enabling devtools would corrupt unknown bytes, so the library refuses to patch.
Source
Thrown at src/cmd/devtools.go:20
import (
"bytes"
"fmt"
"log"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/spicetify/cli/src/utils"
)
const offlineBnkDeveloperMarker = "app-developer"
func findOfflineBnkDeveloperFlagOffsets(content string) (int64, int64, error) {
firstLocation := strings.Index(content, offlineBnkDeveloperMarker)
if firstLocation == -1 {
return 0, 0, fmt.Errorf("cannot enable devtools safely: %q marker not found in offline.bnk", offlineBnkDeveloperMarker)
}
secondLocation := strings.LastIndex(content, offlineBnkDeveloperMarker)
if secondLocation == -1 {
return 0, 0, fmt.Errorf("cannot enable devtools safely: %q marker not found in offline.bnk", offlineBnkDeveloperMarker)
}
firstPatchLocation := int64(firstLocation + 14)
secondPatchLocation := int64(secondLocation + 15)
return firstPatchLocation, secondPatchLocation, nil
}
// EnableDevTools enables the developer tools in the Spotify client
func EnableDevTools() {
var filePath string
switch runtime.GOOS {View on GitHub (pinned to 1f13f73616)
Solutions
- Update Spotify to a version whose offline.bnk still contains the app-developer marker, or update spicetify to a version supporting your Spotify build.
- Verify you are patching the correct offline.bnk for the active Spotify installation/profile.
- Check offline.bnk is not empty/corrupted; reinstall Spotify if it is.
- Re-run `spicetify backup restore` then retry enable devtools on a clean state.
Defensive patterns
Strategy: validation
Validate before calling
content, err := os.ReadFile(bnkPath)
if err == nil && !strings.Contains(string(content), "app-developer") {
return fmt.Errorf("offline.bnk lacks devtools marker; spicetify/Spotify version mismatch")
} Try / catch
if err := EnableDevTools(); err != nil {
if strings.Contains(err.Error(), "marker not found") {
// restore backup or update spicetify, don't patch manually
}
return err
} Prevention
- Keep spicetify and Spotify versions compatible; check release notes after Spotify updates.
- Always keep a spicetify backup of offline.bnk before patching.
- Verify file size/content of offline.bnk before patching to catch corruption.
When it happens
Trigger: EnableDevTools -> findOfflineBnkDeveloperFlagOffsets called on an offline.bnk whose content does not contain the literal "app-developer" string (firstIndex == -1).
Common situations: Spotify updated and rewrote offline.bnk without the marker; offline.bnk is empty, zero-length or corrupted; patching the wrong file path (wrong profile/install dir); a Spotify variant (e.g. web-player based builds) that never contained the flag.
Related errors
AI-assisted analysis of spicetify/cli@1f13f73616 (2026-08-31).
Data as JSON: /api/errors/752ec78f542b4462.
Report an issue: GitHub.